-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Issue #12290 - Docs using Furo Theme W/ Dark Mode #12326
Changes from 9 commits
6bd0be6
278d375
2f8a057
69baa7d
43f344e
1f3db44
2785983
8b6a972
68b486e
18d7a3d
6e3a9e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Updated Sphinx theme to use Furo instead of Flask, enabling Dark mode theme. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<style> | ||
.logo {text-align: center;} | ||
</style> | ||
|
||
<a class="logo" href="{{ pathto('contents') }}"> | ||
<img src="{{ pathto('_static/pytest1.png', 1) }}" width="70%" height="70%" text="Pytest Logo"/> | ||
</a> |
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,4 @@ | ||||||||||||
<style> | ||||||||||||
ul {list-style: none;} | ||||||||||||
li {margin: 5px 0}; | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CSS syntax nit, and because the theme measurements are all in
Suggested change
|
||||||||||||
</style> | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
(To widen the trainings & events sidebar. At 46em the width becomes |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,7 @@ | |
# | ||
# The full version, including alpha/beta/rc tags. | ||
# The short X.Y version. | ||
import os | ||
import shutil | ||
import sys | ||
from textwrap import dedent | ||
from typing import TYPE_CHECKING | ||
|
||
|
@@ -65,7 +63,6 @@ | |
# Add any Sphinx extension module names here, as strings. They can be extensions | ||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. | ||
extensions = [ | ||
"pallets_sphinx_themes", | ||
"pygments_pytest", | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.autosummary", | ||
|
@@ -140,10 +137,6 @@ | |
# output. They are ignored by default. | ||
# show_authors = False | ||
|
||
# The name of the Pygments (syntax highlighting) style to use. | ||
pygments_style = "sphinx" | ||
|
||
|
||
# A list of ignored prefixes for module index sorting. | ||
# modindex_common_prefix = [] | ||
|
||
|
@@ -216,12 +209,9 @@ | |
|
||
# -- Options for HTML output --------------------------------------------------- | ||
|
||
sys.path.append(os.path.abspath("_themes")) | ||
html_theme_path = ["_themes"] | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
html_theme = "flask" | ||
html_theme = "furo" | ||
|
||
# Theme options are theme-specific and customize the look and feel of a theme | ||
# further. For a list of options available for each theme, see the | ||
|
@@ -266,18 +256,24 @@ | |
|
||
html_sidebars = { | ||
"index": [ | ||
"slim_searchbox.html", | ||
"sidebar/brand.html", | ||
"sidebar/search.html", | ||
"sidebar/scroll-start.html", | ||
"sidebarintro.html", | ||
"globaltoc.html", | ||
"links.html", | ||
"sourcelink.html", | ||
"sidebar/scroll-end.html", | ||
"style.html", | ||
], | ||
"**": [ | ||
"slim_searchbox.html", | ||
"sidebar/brand.html", | ||
"sidebar/search.html", | ||
"sidebar/scroll-start.html", | ||
"globaltoc.html", | ||
"relations.html", | ||
"links.html", | ||
"sourcelink.html", | ||
"sidebar/scroll-end.html", | ||
"style.html", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh wow, this is a bad way to do things. See https://pradyunsg.me/furo/customisation/injecting/#css-or-js for the guidance from the theme for how to inject CSS. |
||
], | ||
} | ||
|
||
|
@@ -337,10 +333,6 @@ | |
) | ||
] | ||
|
||
# The name of an image file (relative to this directory) to place at the top of | ||
# the title page. | ||
latex_logo = "img/pytest1.png" | ||
|
||
# For "manual" documents, if this is true, then toplevel headings are parts, | ||
# not chapters. | ||
# latex_use_parts = False | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samjirovec @The-Compiler @nicoddemus @bluetech this makes bullet lists in the change log invisible. Well, globally, really. There are plenty of examples @ https://docs.pytest.org/en/latest/changelog.html#new-features and in the events widget too. What was the intention here?
Oh, @ferdnyc already called out this problem in #12326 (comment)...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, to be honest I got as far as realizing that the missing bullets were intentional and explicit in the PR's local CSS, and immediately dropped it. Since it was clearly not a bug or an unexpected change, I assumed the decision to hide list markers was an aesthetic choice (possibly discussed elsewhere) for the new-theme look of the docs.
If that wasn't the case, and it was actually "snuck in" with the new theme (not in a malicious sense, just meaning that it wasn't explicitly stated in the PR/commit texts, and probably flew under people's radar), then I should've made a bigger fuss. With such sweeping changes completely transforming the appearance of the docs, it's easy to overlook a difference like that. My bad for not following up on it better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From discussions, I don't think people realized the extent of the effect of this choice and the lack of granularity. Also, many might not be qualified to spot these problems easily. Thanks for trying to warn people, though :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not recall any discussion regarding intentionally hiding those bullet points... I personally would prefer them on.
Perhaps we can follow up another PR enabling them back? That would be a place for anybody who remembers that decision to voice that, but otherwise I suspect indeed this just flew under the radar, or was something that looked better on the old theme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, as #12581