Skip to content

refactor: remove redirect while typing#408

Closed
MatteoGabriele wants to merge 16 commits intonpmx-dev:mainfrom
MatteoGabriele:refactor/remove-redirect-on-typing
Closed

refactor: remove redirect while typing#408
MatteoGabriele wants to merge 16 commits intonpmx-dev:mainfrom
MatteoGabriele:refactor/remove-redirect-on-typing

Conversation

@MatteoGabriele
Copy link
Copy Markdown
Member

Personally, I think that redirecting while typing creates different issues:

  • The input loses focus, which might interrupt the typing experience
  • The search input animation is a little jarring, in my opinion, even if I do not have motion sensitivity (or maybe I do)
  • It's more predictable

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 1, 2026 0:14am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 1, 2026 0:14am
npmx-lunaria Ignored Ignored Feb 1, 2026 0:14am

Request Review

@danielroe danielroe changed the title refactor(home): remove redirect while typing refactor: remove redirect while typing Jan 30, 2026
Comment thread app/pages/index.vue Outdated

const isMobile = useIsMobile()

const debouncedNavigate = debounce(() => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about instead using a trailing rather than leading debounce? it would likely have the same effect....

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danielroe, do you want me to try anything in particular for this one? Maybe I didn't fully understand your comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, I fixed that in a separate PR: #526

does that fix any of the issues you were trying to fix here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: I have encountered the missing letter again when typing. It's hard to reproduce, but it's out there somewhere. just FYI

- Use main's debounced search implementation
@MatteoGabriele
Copy link
Copy Markdown
Member Author

There are too many updates, and my changes no longer make sense in this PR.
I will close it for now. Maybe we can discuss whether to keep the transition, particularly if it worsens the typing experience, such as missing letters or other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants