Hey folks - I noticed that the new docs don't accept the search aliases we used to accept on the previous version (we did accept them, right? am I crazy?) Was this an intended change or a regression when working on the new design? ( looks great btw! :heart_eyes: )
I just noticed the footer with Tip: Some names differ from other languages
but that did not grab my attention enough tbh. I just noticed that after starting to write this message.
Suggestions:
Make it so the search bar handles "not found" results with a proper message + link to the "some names differ" page. Right now when searching for "fold" the search bar doesn't give me any feedback that the search happened and found no results.
I'd love this as an actual feature for enhanced search (find functions by aliases, tags, etc.), but I think this is way more complex and discussion-prone than just enhancing the UX of the search bar :grinning_face_with_smiling_eyes:
Maybe we could do the alias thing just for the functions listed under /different-names
?
If the suggestion sounds good I'd love to help out by working on it - if someone could just point me to the place in the codebase where I could make the change! :blush:
I did not change the search logic at all.
I think this could be a good change, but now that @Anthony Bullard has spoiled us with his approach to design communication (#contributing > New docs template), I think it'd be great if you could post a first draft here before making a PR so we can align on how it should look/work as a team
Seems like we add search results as static but hidden HTML nodes to all docs pages here: https://github.com/roc-lang/roc/blob/723e35f11e1b1744c77cde77e42ed2b48fff12a6/crates/docs/src/lib.rs#L534
And then we expose them based on the query here: https://github.com/roc-lang/roc/blob/723e35f11e1b1744c77cde77e42ed2b48fff12a6/crates/docs/src/static/search.js#L109
I really want to generate those once and lazy load them on focus of the search input
Just haven’t had time to do it yet
We can also bring in the module docs as well if lazy loaded and then have them hidden but searched through
There is a lot you can do with a little more tooling and time
Hey folks (@Anthony Bullard, @Sam Mohr ?)
How can I run/build the docs website locally so I can try a solution? I'm not that used to rust projects. I've downloaded the repo, I'm in a dev shell with everything set up - so I think I'm just missing the actual command to run the docs cargo(?).
Docs for the roc repo?
Yeah - I want to run the docs for the builtins locally so I can test changes on how they're built.
e.g. adding the empty case for the search bar.
To generate the full website: https://github.com/roc-lang/roc/blob/main/www/README.md
perfect! that was it - thank you
Last updated: Jul 05 2025 at 12:14 UTC