refactor: remove redirect while typing#408
refactor: remove redirect while typing#408MatteoGabriele wants to merge 16 commits intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
…om/MatteoGabriele/npmx.dev into refactor/remove-redirect-on-typing
…om/MatteoGabriele/npmx.dev into refactor/remove-redirect-on-typing
|
|
||
| const isMobile = useIsMobile() | ||
|
|
||
| const debouncedNavigate = debounce(() => { |
There was a problem hiding this comment.
what about instead using a trailing rather than leading debounce? it would likely have the same effect....
There was a problem hiding this comment.
But we don't actually redirect unless the user presses Enter or clicks "Search".
This makes the experience less unexpected in my opinion, since people might be trying to remember things while typing.
PS: For the trim, I just remembered that v-model has a .trim modifier built in.
There was a problem hiding this comment.
@danielroe, do you want me to try anything in particular for this one? Maybe I didn't fully understand your comment
There was a problem hiding this comment.
no, I fixed that in a separate PR: #526
does that fix any of the issues you were trying to fix here?
There was a problem hiding this comment.
The focus issue seems to be resolved with your PR. 👍
There’s also a UX preference question around whether the animation should exist at all, which is more subjective. If you’d prefer, we can close this PR and keep the animation as-is.
There was a problem hiding this comment.
Update: I have encountered the missing letter again when typing. It's hard to reproduce, but it's out there somewhere. just FYI
…om/MatteoGabriele/npmx.dev into refactor/remove-redirect-on-typing
- Use main's debounced search implementation
|
There are too many updates, and my changes no longer make sense in this PR. |
Personally, I think that redirecting while typing creates different issues: