Skip to content

Collapse inactive navigation menus#365

Merged
grobie merged 2 commits intomasterfrom
hide-inactive-menus
Apr 2, 2016
Merged

Collapse inactive navigation menus#365
grobie merged 2 commits intomasterfrom
hide-inactive-menus

Conversation

@grobie
Copy link
Member

@grobie grobie commented Mar 30, 2016

screenshot from 2016-03-29 21-33-55

@juliusv
Copy link
Member

juliusv commented Mar 30, 2016

Now that the collapsed top-level items are directly under each other, it's visually more obvious that their texts are not properly left-aligned, because the various font-awesome icons have different widths. Could you add width: 20px; to https://github.com/prometheus/docs/blob/master/static/docs.css#L92-L94?

I guess I like it otherwise. It breaks my single-plage Ctrl-F-ability though, which I use a lot. But maybe that's worth it.

@brian-brazil
Copy link
Contributor

Being able to search within a page is important for documentation.

@beorn7
Copy link
Member

beorn7 commented Mar 30, 2016

For me, the too-long side bar was always very annoying. So I like this change.
Perhaps add a site-map for menu findability?

@juliusv
Copy link
Member

juliusv commented Mar 30, 2016

What I like about this is that lower sections like "Best Practices" aren't so easily overlooked anymore. I've heard once or twice that people never noticed that section...

@beorn7 What exactly do you mean with a site-map?

@beorn7
Copy link
Member

beorn7 commented Mar 30, 2016

"A site map (or sitemap) is a list of pages of a web site accessible to crawlers or users. It can be either a document in any form used as a planning tool for Web design, or a Web page that lists the pages on a Web site, typically organized in hierarchical fashion." (Wikipedia)

@grobie
Copy link
Member Author

grobie commented Mar 30, 2016

  • the current menu is a huge issue on mobile
  • My current approach is a performance penalty for users on slow connections, just to see the items of another menu, they have to load a new page. I'll change the implementation to be javascript only (e.g. it's essentially a no-op for people who deactivate javascript).
  • The behavior will become more smooth, my quickly being able to click around in all menu items until opening the page one is interested in.
  • If people feel strongly someone can add a keyboard shortcut to expand all menus.

@juliusv
Copy link
Member

juliusv commented Mar 30, 2016

@beorn7 Ah, I thought you meant Ctrl-F-style searchability for users. Ok.

static/docs.css Outdated
}

.side-nav ul {
display: none;
Copy link
Member

Choose a reason for hiding this comment

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

You're using tabs for indentation here, while the rest of the file uses two spaces. Same below.

@juliusv
Copy link
Member

juliusv commented Mar 30, 2016

👍 IMO after CSS fixes.

@grobie grobie force-pushed the hide-inactive-menus branch from 787eb99 to c2a8e60 Compare April 2, 2016 05:15
Use javascript to hide all inactive menu items and only show one active
menu item at a time.
@grobie grobie force-pushed the hide-inactive-menus branch 3 times, most recently from 6eb1a43 to 26063c1 Compare April 2, 2016 17:40
@grobie grobie merged commit e84fc14 into master Apr 2, 2016
@grobie grobie deleted the hide-inactive-menus branch April 2, 2016 17:42
juliusv added a commit that referenced this pull request Apr 4, 2016
This got broken in #365
juliusv added a commit that referenced this pull request Apr 4, 2016
This got broken in #365
@juliusv juliusv mentioned this pull request Apr 4, 2016
aylei pushed a commit to aylei/docs that referenced this pull request Oct 28, 2019
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.

4 participants