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

MNT: Update Matplotlib and pydata sphinx theme #92

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented May 16, 2024

I didn't test, so we'll see how the build goes.

@QuLogic QuLogic force-pushed the theme-updates branch 3 times, most recently from be804a9 to 5335822 Compare May 31, 2024 00:07
@QuLogic
Copy link
Member Author

QuLogic commented May 31, 2024

OK, managed to get it building; however there are some differences in the result:

  • Links are now underlined:
    • The header links are underlined on hover.
    • Body links are always underlined.
  • The social links are different:
    • slightly smaller in the header, and
    • gone in the footer.
  • The primary highlight colour seems to be misconfigured:
    • The header links are purple on hover instead of blue.
    • The main heading is not blue any more.
    • The body text link hover colour is purple instead of orange.
    • The Try on Binder button is purple on hover instead of white.
    • The quicklinks are black on hover for Reference and Documentation, but purple for the others
    • Some footer links are blue instead of white (without hover).
  • The header links are centred.
  • There's a slight change in spacing between Stable and Development links in the footer.

@timhoffm
Copy link
Member

timhoffm commented May 31, 2024

Since we‘re based on pydata-sphinx-theme, we should follow most of their design decisions. The more we customize, the more we have maintenance on future updates. For example, the underlining is a conscious accessibility decision. Additionally, the same changes apply to our main docs, and we want consistency between them.

We should simply accept most of the changes. The only things to watch out for are css changes on their side that affect custom elements on our side in a negative way ( parts of the primary highlight color).

Copy link
Member

@melissawm melissawm left a comment

Choose a reason for hiding this comment

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

Hi folks - passing by 😄

One thing to consider is that the landing page will look different from the rest of the docs with the customizations (in fact, it already does. For example, link highlights on hover are in orange for the landing page but purple for the rest of the pages).

For the other things, a couple of changes to the landing.css file should fix most of it. I am happy to push a commit here if that's easier. I also recommend adding

html_theme_options = {
    "back_to_top_button": False,
}

to conf.py to turn off the back to top button in the landing pages. Cheers!

@QuLogic QuLogic force-pushed the theme-updates branch 2 times, most recently from d71ff19 to c7f6d79 Compare August 16, 2024 04:20
@QuLogic
Copy link
Member Author

QuLogic commented Aug 16, 2024

So I think I actually misunderstood some of the style; I thought we had set blue/orange for links to follow our default colour cycle, but it turns out that was just the default from pydata-sphinx-theme. So the change to purple-on-hover should be expected, and is consistent with our latest doc builds.

  * The quicklinks are black on hover for Reference and Documentation, but purple for the others

These were because colours were set on a but not a:visited, and formerly, it seems that those were inherited; fixed here.

  * Some footer links are blue instead of white (without hover).

Same as above; fixed here.

  * The Try on Binder button is purple on hover instead of white.

Similarly, this is because the theme/Sphinx started setting colour on a:hover instead of inheriting it, so we need to also override that ourselves.

Did that here and here.

* There's a slight change in spacing between Stable and Development links in the footer.

Fixed here plus here.

I also recommend adding

html_theme_options = {
    "back_to_top_button": False,
}

to conf.py to turn off the back to top button in the landing pages. Cheers!

Done.

@QuLogic QuLogic marked this pull request as ready for review August 16, 2024 04:25
@timhoffm timhoffm merged commit 0cfe99f into matplotlib:main Aug 16, 2024
3 checks passed
@QuLogic QuLogic deleted the theme-updates branch August 16, 2024 05:29
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.

3 participants