-
Notifications
You must be signed in to change notification settings - Fork 479
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 "collapse/expand" functionality #2078
Conversation
- Added .vscode to .gitignore
- Changed placeholder to indicate the shortcut use - Added the change in `CHANGELOG.md` - Made the suggested edits in `.gitignore`
- Changed placeholder to indicate the shortcut use - Added the change in `CHANGELOG.md` - Made the suggested edits in `.gitignore`
Merge branch 'JuliaDocs:master' into development
- Adding padding to menu's element on-hover
- Adding collapse/expand funcitonality to individual article blocks - Adding collapse/expand all functionality
- Complied scss into css
I really like this! It makes these long docstring lists readable. And the open/close animation feels pretty smooth. A couple of thoughts though. What do you think about the following:
|
https://www.mathworks.com/help/matlab/ref/sin.html
Agree.
For document strings, we can modify the collapsed style, the cursor style when the mouse is selected (③), and also add hint text to highlight that this is a collapsed area that can be clicked to interact with.
Maybe collapse by default for automatically generated doc str.
I would say that even though I've done it many times, building julia's documentation is still a bit complicated. Maybe try building the documentation for Documenter.jl first. |
Thanks!
The thing is when in responsive mode the side-menu button will be the last.
I think we can do that, but the problem then would be when a large name comes it will mess up the design.
Personally I would want them to be expanded, but I am fine with either.
I tried but had some issues in generating one. I removed some parts from the julia library to mitigate the errors and was successfully able to build a partial working site. The video I have attached above is the same site I built locally. |
The thing is we don't have much space in the navbar or the docstring title on smaller devices. It is much likely to break the UI on smaller devices when we have text + icons combination.
Yeah, this is a good idea. |
That just hopped on the other side though, so it's not a problem anymore 🙂 #2076
I didn't realize that it was already showing the Julia manual 🤦 I'm happy to look into doing the full build though. The errors might be due to some changes we've had on master here.
Let's leave them expanded for now then. Adding a per-block option is a good idea. We could also have a per-page option via an at-meta block. But let's do those in a follow-up PR -- let's not make this PR too complicated.
I tend agree with this. I think we're kinda forced to go with icons right now.
That is fair. I feel that maybe we should follow Matlab's lead here though and have the collapsed icon be
Yeah, some hover and cursor stuff might be worth trying out. |
… into issue-1393
It auto-closed the PR when I synced my fork. I have reopened the PR. Sorry for this! |
- Added `>` as a indication instead of `^` for articles - Changes in `collpase.js` - Changed cursor to pointer when hovering over articles
|
@mortenpi If possible can you do this and check if everything works fine or are there any changes needed? |
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.
Awesome, this is great! Sorry for the delay, but I think this is nearly good to go if you're done with it.
- Just some minor suggestions in other comments.
- Could you add a CHANGELOG entry for this?
In principle, the JS code seems to have some duplication (e.g. the expand/collapse strings), so it could probably be refactored a bit to make it a bit cleaner. But that's pretty minor and not very important here, so more than happy to merge as is.
Here's a full Julia manual build: http://mortenpi.eu/juliadocs-demos/pr-2078-julia-manual-demo/ |
- Updated title strings as per the feedback
Thanks a lot for iterating on this @Hetarth02! |
Recording.2023-03-18.163946.mp4