Skip to content
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

adding header links to sidebar on mobile #1211

Merged
merged 27 commits into from
Dec 12, 2024

Conversation

thisisjofrank
Copy link
Collaborator

@thisisjofrank thisisjofrank commented Nov 29, 2024

Add the 'top navigation' links to the sidebar on mobile

Add the mobile nav to the examples and API reference pages

Add a Scroll to top button to the API reference

@thisisjofrank thisisjofrank marked this pull request as ready for review December 11, 2024 13:05
.doc .toc :not(.documentNavigation) > a {
@apply text-xl !important;
.ddoc .z-50 {
z-index: 49 !important;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for this hack, I can't edit the z-50 on the reference doc that is generated

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you isolate it instead? May be a little cleaner. https://tailwindcss.com/docs/isolation

@philhawksworth
Copy link
Member

This is great as it solves the immediate problem of the inability to navigate some parts of the top-level hierarchy on mobile, but I'm not quite sure about the behaviour in the API reference part of the site.

It feels of to me that the sub sections (deno, web, node) appear in the same format as additional top-level nav items in the sidebar when in that section.

If those secondary nav items appear in the sidebar, then I think they need to be visually distinct from the top-level nav items.

Screenshot 2024-12-11 at 17 26 03

It may be that the solution is also desirable anyway — to make the visual treatment of the top-level nav items in the sidebar a little different and contained from the other items.

Astro have a good treatment of the same thing in their upcoming docs release that we might take some inspiration from:

Screenshot 2024-12-11 at 17 29 26

@josh-collinsworth
Copy link
Contributor

@philhawksworth @thisisjofrank I pushed a commit to stylize the "section picker" per Phil's feedback. I think it's in pretty ok shape, but I haven't tested it extensively. If you'd like to change it (or just blow the commit away) feel free.

@thisisjofrank
Copy link
Collaborator Author

@josh-collinsworth I love this, looks super nice. We should apply it to the mobile sidebar on the homepage too, which somehow doesn't seem to be getting the styles. Can take a look tomorrow if you've no time.

@thisisjofrank thisisjofrank changed the title initial commit, adding header links to sidebar on mobile adding header links to sidebar on mobile Dec 12, 2024
Copy link
Member

@philhawksworth philhawksworth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Going to make things feel far simpler

@thisisjofrank thisisjofrank merged commit 0e12b28 into main Dec 12, 2024
5 checks passed
@thisisjofrank thisisjofrank deleted the add-header-links-in-sidebar branch December 12, 2024 15:11
@thisisjofrank thisisjofrank restored the add-header-links-in-sidebar branch December 12, 2024 15:49
thisisjofrank added a commit that referenced this pull request Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants