feat: Better suggestions in product edition (UI/UX) + debounce feature #4351
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi everyone,
In a product edition, we provide some suggestions for categories, labels…
The current implementation triggers a request for every single letter.
To improve this, the app will now show a loader because the results will appear with a delay.
A video of the change: Video.webm
Just in case it's not clear, let's say you write "ABC" : you will see the suggestions for "A", then "B", then "C".
To be less confusing for the user, I have added a ProgressBar which is visible until the correct suggestions are visible (here "C").
Also, in some cases, the request may take a really long time, and in that case, if that's an intermediate case (eg: A or B), it won't be displayed.
Furthermore, I have added a cache, which may require fewer requests to the server.
Clearly, this is just a UI improvement, but we should implement a debounce-like mechanism to minimize the number of requests to the server.
EDIT: The debounce feature is implemented! (@see #4351 (comment))