gleam-lang / language-tour

👩🏽‍💻 Learn Gleam in your browser
https://tour.gleam.run/
73 stars 55 forks source link

Add a Search Bar #93

Open Pi-Cla opened 2 months ago

Pi-Cla commented 2 months ago

It would be cool if we could add a search bar to the language tour (and potentially the rest of the website) to quickly look things up since the language tour currently serves as a de facto reference to the core language.

lpil commented 2 months ago

What would this give that the content page does not?

Pi-Cla commented 2 months ago

What would this give that the content page does not?

Hmm... let me try to explain what my brain is feeling. My brain is the type of brain that is used to searching things up via grepping. It likes being able to type text into a bar and being able to see answers. It does not like having to spend the extra effort to go through a whole table of contents.

This is just a subjective feeling, but this is the reason why I want to see this through. (I am interested in implementing this myself)

lpil commented 2 months ago

It likes being able to type text into a bar and being able to see answers

I do this today by using the browser's search on the contents, or the everything page if I want to be on that page. What would be the difference there?

Not trying to be a pain, just always on the lookout for efficient solutions seeing as we have so little developer-time and just answering all the issues and PRs takes most my day at the moment.

xxKeefer commented 1 month ago

I feel this is related to this issue for the website. long term it would be nice if the these search bars being discussed were the same solution but perhaps that's more heavy duty than what's required here.

I agree though that the control + F on the everything page is probably sufficient but the link to the everything page is kind of hidden. Maybe it would be nice to have a button link thing in the top right of the tour near the theme switcher that links to the everything page?

lpil commented 1 month ago

There's not enough space there on mobile to add a link. Some more involved design work would need to be done.