strapi / strapi-starter-gatsby-catalog

Strapi Starter Gatsby Catalog
strapi-starter-gatsby-catalog-strapijs.vercel.app
MIT License
28 stars 16 forks source link

Search bar #1

Closed markkaylor closed 3 years ago

markkaylor commented 3 years ago

Hey @remidej I get what you're saying. I'm not sure I see the advantage of using a query string though. Maybe you have an idea there?

My initial idea was to put the search results on it owns page /search-results but I think that would require a context provider and I was trying to avoid that...

Since the search input is on every page, I think the route will have to change during the onChange event but maintaining focus on the input will be difficult.

Also having the search results on their own page means if the user deletes the search input they are left with a blank page, which might also be a weird UX.

Sorry for the long reply :grimacing:

remidej commented 3 years ago

@markkaylor you make some fair points 🙂 Let's keep it that way, especially since the results are nicely separated from the rest of the content