pydata-sphinx-theme icon indicating copy to clipboard operation
pydata-sphinx-theme copied to clipboard

When header items stack at narrower widths it doesn't look good

Open drammock opened this issue 3 years ago • 5 comments

notice how the topbar header goes to 2 lines when width is just above the breakpoint. I think it's good that it has the fallback of wrapping when it's too wide (rather than things colliding / cutting off) but to me it looks pretty bad the way it wraps. Is there any improvement to be made here, given that we can't easily know how wide the navbar content is going to be?

foo.webm

drammock avatar Jul 26 '22 14:07 drammock

I agree with your assessment, I wasn't sure how to improve the UI/UX around that but definitely welcome improvements there 👍 (also I renamed the title to I think be a bit more specific, hope that's OK!)

choldgraf avatar Jul 28 '22 11:07 choldgraf

I guess one thing we could do is set the default threshold really low for moving items into a dropdown, thus forcing each site to customize that number such that this issue is avoided on their site?

drammock avatar Jul 28 '22 12:07 drammock

My prior comment may have been a bit cryptic, as I was typing on a phone. What I meant was this: we document that this problem exists, and encourage people to set the threshold for number of navbar items allowed without a "more" dropdown such that the two-line navbar problem doesn't happen on their particular site. One way to encourage / force people to actually do that would be to set the threshold really low by default (e.g., 2), which would presumably drive users to the docs, where they would find the above advice.

drammock avatar Jul 28 '22 14:07 drammock

There is no way to count all elements which are present in the navbar? Or prevent any wrapping of some sections. Otherwise yes having an option to set a threshold would be good.

tupui avatar Jul 28 '22 18:07 tupui

Other things we could try to do:

  • Make the header buttons align to the left by default instead of the middle, so that by default there is more space for the header
  • Somehow improve the stacking behavior so that the buttons to the right stack earlier, since it's more "natural" for those to stack rather than the navigation links.

choldgraf avatar Jul 28 '22 20:07 choldgraf