Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add search box to recipe list #428

Merged
merged 2 commits into from
Dec 18, 2024
Merged

Add search box to recipe list #428

merged 2 commits into from
Dec 18, 2024

Conversation

LucasPickering
Copy link
Owner

@LucasPickering LucasPickering commented Dec 18, 2024

Description

Describe the change. If there is an associated issue, please include the issue link (e.g. "Closes #xxx"). For UI changes, please also include screenshots.

Add a search box to the bottom of the recipe list, to make it easy to jump between recipes. The behavior I went with is: whenever the text changes, immediately jump to the first recipe in the list whose name contains the query (comparison is caseless). I want to test this out myself to see if it's annoying or good. Some potential changes:

  • Filter instead of search (so we hide items that don't match)
  • Add a debounce, or don't search until the user hits Enter
  • Instead of exiting on Enter, jump to the next match
  • Match on ID as well
  • Add persistence

Known Risks

What issues could potentially go wrong with this change? Is it a breaking change? What have you done to mitigate any potential risks?

This behavior may be bad, so I'm going to mitigate by testing myself in practice.

QA

How did you test this?

Added unit tests

Checklist

  • Have you read CONTRIBUTING.md already?
  • Did you update CHANGELOG.md?
    • Only user-facing changes belong in the changelog. Internal changes such as refactors should only be included if they'll impact users, e.g. via performance improvement.
  • Did you remove all TODOs?
    • If there are unresolved issues, please open a follow-on issue and link to it in a comment so future work can be tracked

Right now it selects the first recipe that contains the query in its name (caseless). This is subject to change though, I need to play with it more.
@LucasPickering LucasPickering enabled auto-merge (rebase) December 18, 2024 01:30
@LucasPickering LucasPickering merged commit a296e91 into master Dec 18, 2024
15 checks passed
@LucasPickering LucasPickering deleted the recipe-search branch December 18, 2024 01:34
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.

1 participant