Real-Dev-Squad / website-status

Shows a roadmap of the ongoing projects being done
https://status.realdevsquad.com/
MIT License
21 stars 145 forks source link

Add search based filtering for task title #790

Closed vinit717 closed 9 months ago

vinit717 commented 9 months ago

Issue:

Description:

Implement a task title search functionality to add the task in the dependsOn field

Anything you would like to inform the reviewer about:

Dev Tested:

Images/video of the change:

https://github.com/Real-Dev-Squad/website-status/assets/111434418/c7f3497b-596a-4146-9cf3-9e22e5670227

image image image

Follow-up Issues (if any)

vercel[bot] commented 9 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
status-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 11, 2023 10:50am
vinit717 commented 9 months ago

Reason for not able to test setSearchTerm Testing an internal state variable very much goes against the philosophy behind react-testing-library. That lib is focused on the user, and what the user can see. The user has no concept of a state variable. Instead of testing that, think of the changes the user would see, and test for that. How is the UI updated? What different markup or styling is displayed? Consider how to test from the user's perspective https://testing-library.com/docs/guiding-principles/ https://testing-library.com/docs/queries/about/#priority

apurvkhare commented 9 months ago

After clicking save the name/description does not get updated immediately, the transition from previous to updated name/description is not smooth and also the dependencies shows - no dependencies before the loading... is rendered

vinit717 commented 9 months ago

no dependencies before the loading... is rendered

After clicking save the name/description does not get updated immediately, the transition from previous to updated name/description is not smooth and also the dependencies shows - no dependencies before the loading... is rendered

https://github.com/Real-Dev-Squad/website-status/assets/111434418/bc47170a-15ab-45eb-9fe4-dee15626d835

As for saving for name/description, it is an API issue which is a patch request taking some time to update the request and for no dependencies, it is because it first takes the id of the task then it makes a call no it neither fetching nor loading state is their

For API performance, I have created the issue below

for unnecessary API call, I have created the issue below

apurvkhare commented 9 months ago

@vinit717 APIs will always take time, even if you optimize. There are two ways to handle this.

  1. Optimistic update - update the UI immediately and rollback if the API fails
  2. Loading - skeleton or spinner or any graceful transitional css

And regarding dependencies what I meant is that when you do add some dependency and try to save - before it shows loading it shows 'no dependencies' briefly. If this is getting fixed by the above mentioned bugs then fine.