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

Right-hand in-page table of contents on docs pages is hidden below 1450px #1096

Closed
Tracked by #2796
vjwilson opened this issue Sep 28, 2021 · 5 comments
Closed
Tracked by #2796
Assignees
Milestone

Comments

@vjwilson
Copy link

On current PatternFly docs, the in-page table of contents (TOC) is hidden when the browser width is below 1450px.

@media (max-width: 1450px)
.ws-toc {
    display: none;
    visibility: hidden;
}

Often, I keep my browser windows narrow, either to fit them side-by-side on a large monitor, or simply because the resolution I use on my 13-inch MacBook is 1440px wide. So, I rarely see that right-hand side table of contents.

I think this hurts discoverability, and makes it harder to get to the section I need. In general, hiding things to make responsive work is an anti-pattern. (This is the opposite of showing unnecessary things for large widths, like the classic, https://twitter.com/wilto/status/63284673723375616?lang=en )

I'd like to request an enhancement that allows that menu to be visible/toggle-able/accessible somehow at smaller widths.

Here is an example screenshot taken from my 13-inch laptop, with the window as wide as it can go, but still no right-hand TOC visible.
Screen Shot 2021-09-28 at 9 48 51 AM

@mcarrano mcarrano transferred this issue from patternfly/patternfly-org Oct 1, 2021
@evwilkin
Copy link
Member

evwilkin commented Oct 1, 2021

@vjwilson thanks for the suggestion, agreed that this could be a useful addition. We'll send this through design to determine the appearance/interaction and look to tag you for review once it's built out.

@mcarrano mcarrano added this to the 2021.14 milestone Oct 5, 2021
@mcarrano mcarrano self-assigned this Oct 7, 2021
@mcarrano mcarrano assigned maryshak1996 and unassigned mcarrano Oct 27, 2021
@mcarrano mcarrano modified the milestones: 2021.14, 2021.15 Oct 27, 2021
@mcarrano mcarrano modified the milestones: 2021.15, 2021.16 Nov 29, 2021
@maryshak1996
Copy link

Here are is my proposal based on a couple of iterations and conversations with the team @mcarrano : https://marvelapp.com/prototype/7bcja40

@mcarrano
Copy link
Member

mcarrano commented Jan 6, 2022

@maryshak1996 I like this, but can we make this with existing PF components? If not, what are we missing? Do we need something that is like an expandable header? Maybe something like this? https://www.patternfly.org/v4/components/expandable-section#disclosure-variation I had been thinking we would just use a standard dropdown, but I do like the look of what you propose here.

@mcarrano mcarrano modified the milestones: 2021.16, 2022.01 Jan 27, 2022
@maryshak1996
Copy link

Final designs can be found here: https://marvelapp.com/prototype/7bcja40
This design uses the disclosure variant of the expandable component with two visual customizations:

  1. Disclosure background should be light grey, so that it doesn't blend in too much with the rest of the page
  2. We should remove the blue vertical line on the expandable section dropdown, so that we can we can place the TOC inside of it without having a double keyline appearance

@mcarrano
Copy link
Member

Thanks @maryshak1996 . I have opened patternfly/patternfly-org#2843 to begin implementation and will now close this out.

cc @evwilkin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants