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

v5: Adjust docs sidebar and navbar #31119

Merged
merged 9 commits into from
Sep 25, 2020
Merged

v5: Adjust docs sidebar and navbar #31119

merged 9 commits into from
Sep 25, 2020

Conversation

mdo
Copy link
Member

@mdo mdo commented Jun 19, 2020

Some tweaks to ideally improve navigating across our documentation on narrow devices. This PR removes the navbar scroll that I had implemented and replaces it with our classic collapsing navbar, but with a slight twist. I've added column classes to stack the nav across two columns on mobile devices so that the opened nav isn't too tall.

Still need to adjust the menu toggles (missing some styles, tap targets could be larger, etc), but hoping to get some initial feedback from the team on overall direction. Also wondering if I should do more to condense the subnav (search, version picker, and sidebar toggle) on mobile views.

Any thoughts, feedback, or examples of other patterns would be appreciated!

/cc @twbs/css-review

Preview: https://deploy-preview-31119--twbs-bootstrap.netlify.app/

@patrickhlauke
Copy link
Member

patrickhlauke commented Jun 19, 2020

like this, particularly since small screen doesn't necessarily always mean "mobile user with touch" (it could, for instance, still be a mouse user on desktop, but with high magnification/zoom; or a user on mobile, but with a paired bluetooth mouse). and the horizontal scrolling without scrollbar is unusable for these users, currently.

@alecpl
Copy link
Contributor

alecpl commented Jun 20, 2020

I'd like search/version/toggle in a single line. Maybe the version selector could be visually integrated with the search input (and does not need the "Bootstrap" label, only version number). Maybe the icon should be different than the main menu icon (folder tree, hierarchy?).

btw, on the home page (not docs, the main page) I propose to make .masthead-followup-icon in the same line with the following h2. And smaller bottom padding/margin on #content.

@mdo mdo marked this pull request as ready for review September 16, 2020 04:10
@mdo mdo requested a review from a team as a code owner September 16, 2020 04:10
@mdo
Copy link
Member Author

mdo commented Sep 16, 2020

Rebased to bring this up to speed with the latest main changes, added @alecpl's suggestion for subnav layout all on one line with a cheeky d-none trick, and tweaked the homepage masthead padding (more to come on this later I think).

Ready for review!

@ffoodd
Copy link
Member

ffoodd commented Sep 16, 2020

I like it!

I agree with @alecpl about the two icons, there's so much lines stacking here… Not sure about a solution though, I just noticed that felt strange.

@mdo
Copy link
Member Author

mdo commented Sep 16, 2020

Yeah the stacked bars is a little odd. How about this? Just pushed a commit for it—icon flips between the expand/collapse icons from Bootstrap Icons.

Screen Shot 2020-09-16 at 11 20 20 AM

@ffoodd
Copy link
Member

ffoodd commented Sep 17, 2020

@mdo Nice, IMHO much better!

@mdo
Copy link
Member Author

mdo commented Sep 17, 2020

Rebased and conflicts resolved.

Ready for review!

Copy link
Member

@MartijnCuppens MartijnCuppens left a comment

Choose a reason for hiding this comment

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

Neat improvement!

@XhmikosR XhmikosR self-requested a review September 25, 2020 15:45
@mdo
Copy link
Member Author

mdo commented Sep 25, 2020

Thanks for the reviews fam! This will be a nice little addition to Alpha 2 :D.

@mdo mdo merged commit 7427946 into main Sep 25, 2020
@mdo mdo deleted the docs-nav-tweaks branch September 25, 2020 16:35
olsza pushed a commit to olsza/bootstrap that referenced this pull request Oct 3, 2020
* Hide the docs nav on mobile, redesign it for two columns on narrow devices

* Tweak spacing on ToC

* Redesign sidebar and subnav

* Revamp subnav mobile layout so everything's on one line

* Tighten up masthead a little

* Switch the icon for the subnav and do a little icon toggling

* Fix mobile overflow since we changed guters stuff

* Add the widths

* make the subnav icon purple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants