astropy / astropy-sphinx-theme

Standalone version of the Astropy sphinx theme
BSD 3-Clause "New" or "Revised" License
4 stars 15 forks source link

Polish up astropy top menubar styling #9

Closed kakirastern closed 3 years ago

kakirastern commented 5 years ago

Based on observations of top menubar rendering generated on RTD.

Fixes #12.

astrofrog commented 5 years ago

@kakirastern - two quick requests:

kakirastern commented 5 years ago

Sure, give me a day or two and I will get back to you with some more commits as per your requests...

kakirastern commented 5 years ago

Hi @astrofrog Please check and let me know if further tweaking is required... I have increased the font size from 110% to 120%, and the spacing between items from 10px to 15px.

astrofrog commented 5 years ago

It looks like the submenu font is still larger than the main menu font:

Screenshot 2019-05-06 at 14 17 15

And it would be nice if the drop-down arrow was closer to the 'About' word that to the 'Get Help' one. Is that easy to do?

kakirastern commented 5 years ago

Sorry, I probably should use px in indicate font size instead... And wait, the part about the drop-down arrow should be easy to fix. Give me a couple of hours. Will be more careful this time.

kakirastern commented 5 years ago

So this is what I got locally after tweaking:

Screenshot 2019-05-06 21 43 23

astrofrog commented 5 years ago

Unfortunately it looks truncated to me now:

Screenshot 2019-05-06 at 15 08 46

This is with Safari and Firefox. Also, the top bar items seem a bit low in terms of vertical alignment - is there any way to center them vertically?

I like the horizontal spacing and the position of the arrow now though!

kakirastern commented 5 years ago

Hey @astrofrog, just would like to check with you: Is the image you got from a local build or giles or RTD? If it is a local build then it would look "more normal" after rendering. If it's a giles or RTD rendering it means I will need to do some massaging.

But yes, I can align the top bar items so that they are centered in the topbar. Will work on it now.

astrofrog commented 5 years ago

It was from a local build

kakirastern commented 5 years ago

So this is what I got on a local build to an approximate likeness of the RTD rendering (the items are now more vertically-centered):

Screenshot 2019-05-06 22 46 30

But we should be careful and check with either giles or RTD for the actual topbar...

kakirastern commented 5 years ago

In the RTD rendering the spacing between items in the dropdown menu would be smaller...

kakirastern commented 5 years ago

Is there any way we can get a giles version of the top bar with the configurations in this branch to check the rendering? Or if your machine produces reliable spacing between dropdown menu items (unlike mine), I can simply go ahead to fix the height of the dropdown menu to accommodate the changes effected in this PR...

kakirastern commented 5 years ago

Hi @astrofrog... I trust your computer more than mine, so I just changed the dropdown box height from 125px to 155px. Try it on your machine and see if the dropdown menu still looks "truncated".

kakirastern commented 4 years ago

Added a new commit as per user suggestion, as made in #12.

astrofrog commented 4 years ago

@kakirastern - I now no longer see any buttons when the project toolbar is enabled (I think they are pushed below the top bar).

Screenshot 2019-07-20 at 15 36 09

The vertical alignment is also incorrect when the toolbar is not enabled:

Screenshot 2019-07-20 at 15 35 51
astrofrog commented 4 years ago

Ah the lack of buttons happens disappears if I make the window larger, but they are not visible with the default Chrome window size on my computer.

kakirastern commented 4 years ago

Yeah, I think too many buttons got crammed into the topbar... Maybe I could tweak the font size/spacings a bit and see if I can get a better fit. But it will take a few days.

So in summary, I am thinking I will approach the problem via:

  1. Fixing the font size to a smaller one
  2. Changing (reducing) the topbar element size
  3. Tweaking the topbar element spacing

Or, do you have any other suggestions?

astrofrog commented 4 years ago

I think we might want to consider ways of making the interface responsive, that is on smaller screens, we could switch to a drop-down menu for all those menu buttons? I've been playing around with libraries like Material UI and Vuetify to see what those could offer.

kakirastern commented 4 years ago

Yeah, that's a great idea. Right now the sphinx theme has been set up in a way that is hard to change details in an easily and readily deployable manner. Looks like we might run into some issues such as the ones we are encountering or break something like we (or I) did last time sooner or later. I am checking out both Material UI and Vuetify now. I particularly like what Vuetify can do for Astropy...

astrofrog commented 4 years ago

@kakirastern - since you mentioned it on Slack, I'll also mention it here for the record - Bootstrap 4 is also an option and might be easier to use with the kind of templating we need for Sphinx (https://getbootstrap.com/docs/4.3/getting-started/introduction/)

astrofrog commented 4 years ago

It might be worth investigating whether this bootstrap theme would be a good starting point, with a little tweaking of colors/logo/etc. This is used by the seaborn package for example.

kakirastern commented 4 years ago

Sure, I will work on it a bit more. Might take a bit longer than a few days though since I might need to make a lot of changes. Looks like the theme has been modified this year in March 2019 so it is a good sign.

kakirastern commented 4 years ago

Will open a separate PR regarding a new-bootstrap-based sphinx theme soon.

eteq commented 3 years ago

closed at request of author - last SHA was ee4189313ea85b3288887a248b88b16e8f37ba42