-
-
Notifications
You must be signed in to change notification settings - Fork 310
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: sort on function names in the docs #6526
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for you contribution @gunnarahlberg, I like where this is going!
I failed to specify this in the issue but I think the sort button should be placed above Utf8ByteProblem
(and under Str
). This would follow UX best principles to put controls close to where they affect change. Otherwise if you're looking at the list for Inspect
you are very likely to miss the Sort button all the way at the top.
Can you also try to make the Sort button stand out from the other items in the list? It's functionality is very different compared to the other links/buttons so we should visually indicate that.
100% I was thinking something similar to what you said in your comment What about the cargo/rust stuff? It's literally my first time I do anything in Rust, all help is welcome. Should there be specific js files per feature? |
Awesome, thank you @gunnarahlberg :)
That all looks good!
Good point! Having separate files probably leads to a slight additional delay per file. Feel free to combine both in script.js |
@Anton-4 - I suggest that we instead of one sort button per section have just one sort button What do you think? Would it be ok with you if the sort button happens once and sorts all the sections? Like this |
Hmm, is there no way to only show the sort button in the expanded view, after you've clicked on e.g. |
Oh, good idea, I didn't think about that before, let's try it out wouldn't be much trouble |
The sorting of the entries is added, with styling that mimics neighbours. Attributes are sorted by javasrcipts native comparison. Example: Str concat and contains are after UTF8ByteProblem and UTF8Problem This is related to the roc-lang#6494
The toolbar has a search box and a sort button Changed the presentation for the search input
@gunnarahlberg do you intend to change the behaviour so that Sort is only displayed in the expanded view? We might need to detect when links under Also, I think there are some formatting things for CI. Otherwise this is looking really useful. 👍 |
Yes there is a change needed like that, I’ve been on vacation for a while honestly I got it to work but not to be pretty 😥 e.g. it always looks wrong no matter how I place it |
Ok i have this idea that might work We show a sort button to the right of the section title when the section is expanded Some of the font awesome icons are used in this docs. Maybe this icon works, what do you think? arrow down a-z the classic solid is free others are nicer but requires a license |
Regarding icons and licenses, my preference is (and I know we aren't doing this consistently, but I'm working on changing the other place we use an icon):
|
Sounds good! |
Thank you for your contribution! Sometimes PRs end up staying open for a long time without activity, which can make the list of open PRs get long and time-consuming to review. To keep things manageable for reviewers, this bot automatically closes PRs that haven’t had activity in 60 days. This PR hasn’t had activity in 30 days, so it will be automatically closed if there is no more activity in the next 30 days. Keep in mind that PRs marked |
The sorting of the entries is added, with styling that mimics neighbours.
Attributes are sorted by javasrcipts native comparison. Example: Str concat and contains are after UTF8ByteProblem and UTF8Problem
This is related to the #6494
I saw the list in the ticket. This PR ticks some of the boxes