Stream: contributing

Topic: docs: function aliases


view this post on Zulip Georges Boris (Dec 29 2024 at 12:46):

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:

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:

view this post on Zulip Anthony Bullard (Dec 29 2024 at 13:40):

I did not change the search logic at all.

view this post on Zulip Sam Mohr (Dec 29 2024 at 13:53):

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

view this post on Zulip Sam Mohr (Dec 29 2024 at 13:57):

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

view this post on Zulip Sam Mohr (Dec 29 2024 at 13:58):

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

view this post on Zulip Anthony Bullard (Dec 29 2024 at 15:00):

I really want to generate those once and lazy load them on focus of the search input

view this post on Zulip Anthony Bullard (Dec 29 2024 at 15:01):

Just haven’t had time to do it yet

view this post on Zulip Anthony Bullard (Dec 29 2024 at 15:03):

We can also bring in the module docs as well if lazy loaded and then have them hidden but searched through

view this post on Zulip Anthony Bullard (Dec 29 2024 at 15:06):

There is a lot you can do with a little more tooling and time

view this post on Zulip Georges Boris (Dec 30 2024 at 18:13):

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(?).

view this post on Zulip Anton (Dec 30 2024 at 18:15):

Docs for the roc repo?

view this post on Zulip Georges Boris (Dec 30 2024 at 18:16):

Yeah - I want to run the docs for the builtins locally so I can test changes on how they're built.

view this post on Zulip Georges Boris (Dec 30 2024 at 18:16):

e.g. adding the empty case for the search bar.

view this post on Zulip Anton (Dec 30 2024 at 18:17):

To generate the full website: https://github.com/roc-lang/roc/blob/main/www/README.md

view this post on Zulip Georges Boris (Dec 30 2024 at 18:18):

perfect! that was it - thank you


Last updated: Jul 05 2025 at 12:14 UTC