dwavesystems / dwave-ocean-sdk

Installer for D-Wave's Ocean tools
https://docs.ocean.dwavesys.com
Apache License 2.0
416 stars 155 forks source link

Update doc-build tools to support new ``pydata-sphinx-theme`` & switch from obsolete ``sphinx-panels`` #274

Closed JoelPasvolsky closed 1 year ago

JoelPasvolsky commented 1 year ago

I'll open this WIP now but will continue after my PTO. I've fixed the worst of the backwards incompatibilities but still need to

Notice that the theme now supports dark mode. A future PR can set a different color scheme more suitable for dark mode. I can also turn off the mode's availability until then. image

JoelPasvolsky commented 1 year ago

Looks like I might need to also either update CircleCI to use a new Python version to run doc builds or use an earlier version of Sphinx

arcondello commented 1 year ago

It's configured here: https://github.com/dwavesystems/dwave-ocean-sdk/blob/180ec75f6fcda0d7515f8977d8b07eb9e1406afb/.circleci/config.yml#L134

What does RTD currently use?

arcondello commented 1 year ago

Looks like it used 3.8 by default, but it is configurable.

JoelPasvolsky commented 1 year ago

Looks like it used 3.8 by default, but it is configurable.

Yes, I actually recently made a PR to move to this configuration

arcondello commented 1 year ago

Then yes! We can use whatever version you need :laughing:

arcondello commented 1 year ago

So most of this is bike shedding but...

For comparison two images (found here)

New Docs

image

Old Docs

image

Comments

1) I don't love that the links are underlined. E.g. image image 2) I prefer the old pink inline code to the orange 3) I don't love the new python syntax coloring 4) The code link is using green rather than blue E.g. image image 5) This isn't int he example image, but the bar at the top has weird coloring when I mouse over. E.g. image

JoelPasvolsky commented 1 year ago
  1. I don't love that the links are underlined. E.g.

It's simple to remove the link underlining (a {text-decoration: none;} as a theme override) but I believe they added the underline to help people with visual impairments recognize hyperlinks so I propose to keep that.

  1. I prefer the old pink inline code to the orange

I restored the previous color (--inline-code-pink: rgb(232, 62, 140);) based on the original pydata_sphinx_theme==0.8.0 code. Again, I believe the added backgrounding is to help with visual impairments, so I left that. image

  1. I don't love the new python syntax coloring

Apparently they are using GitHub code block style now. I don't think we want to try restyling that ourselves

  1. The code link is using green rather than blue E.g.

Ha, I figured out how to fix that to my huge surprise: --pst-color-inline-code-links: var(--dwave-color-ocean-blue); image

  1. This isn't int he example image, but the bar at the top has weird coloring when I mouse over. E.g.

I don't know how to change that one :shrug:

arcondello commented 1 year ago

All makes sense to me, thanks

JoelPasvolsky commented 1 year ago

@randomir & @arcondello, see this rendering and let me know if I should go ahead and merge this commit into my branch. (After editing it, of course.)

arcondello commented 1 year ago

I personally prefer it, though I would take a 2x3 or 3x3 subset of the packages to highlight.

JoelPasvolsky commented 1 year ago

I personally prefer it, though I would take a 2x3 or 3x3 subset of the packages to highlight.

It's nicely flexible, we could build off something like this:

image

JoelPasvolsky commented 1 year ago

I personally prefer it, though I would take a 2x3 or 3x3 subset of the packages to highlight.

Another option to consider is the use of tabs for (default) clean look and (alternative tab) full list of packages:

image

arcondello commented 1 year ago

Another option to consider is the use of tabs for (default) clean look and (alternative tab) full list of packages

I'd even say the first tab could be boxes and the second tab a list.

JoelPasvolsky commented 1 year ago

The updated docset can be seen here