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

GH-36590: [Docs] Support Pydata Sphinx Theme 0.14.0 #36591

Merged
merged 31 commits into from
Sep 27, 2023

Conversation

AlenkaF
Copy link
Member

@AlenkaF AlenkaF commented Jul 10, 2023

Preview: http://crossbow.voltrondata.com/pr_docs/36591/

Rationale for this change

The Pydata Sphinx Theme that we use for our documentation has been pinned due to bigger changes in the theme layout. It needs to be unpinned and our layout needs to be updated.

What changes are included in this PR?

Update of the Pydata Sphinx Theme and changes to our layout/structure:

  • dark/light mode
  • top menu bar
  • search button in the top right navigation bar
  • drop down from the theme layout in the top right navigation bar
  • version warnings bar from the theme layout
  • main landing page and the landing page for the dev docs

⚠️ Needs an update of the versions.json

Are these changes tested?

Yes, locally. Will also add docs preview via GitHub actions.

Are there any user-facing changes?

No.

@AlenkaF
Copy link
Member Author

AlenkaF commented Jul 10, 2023

@github-actions crossbow submit preview-docs

@github-actions
Copy link

Revision: 67c8e5e

Submitted crossbow builds: ursacomputing/crossbow @ actions-12e0914bc0

Task Status
preview-docs Github Actions

@AlenkaF
Copy link
Member Author

AlenkaF commented Jul 10, 2023

Screenshot 2023-07-10 at 13 09 58

docs/source/_static/theme_overrides.css Outdated Show resolved Hide resolved
docs/source/conf.py Show resolved Hide resolved
@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Jul 10, 2023
"image_light": "_static/arrow.png",
"image_dark": "_static/arrow-dark.png",
},
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
Copy link
Member

Choose a reason for hiding this comment

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

How does this differ from the default?

Copy link
Member Author

Choose a reason for hiding this comment

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

@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jul 11, 2023
@AlenkaF
Copy link
Member Author

AlenkaF commented Jul 11, 2023

I have played around with the logo a bit because it is not clearly visible if located on the top navbar. It might make sense to keep it on the left side bar as is (see picture below).

Regarding the navigation bar dropdown, the picture here is an example without extra index page for the supported environments section but using header_links_before_dropdown to organise all languages and cookbooks in a dropdown link named More. I find that it doesn't really make a difference though I like it better if the menu item is titled Supported environments and not More.

Screenshot 2023-07-11 at 11 14 14

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels Jul 11, 2023
@jorisvandenbossche
Copy link
Member

Regarding the navigation bar dropdown, the picture here is an example without extra index page for the supported environments section but using header_links_before_dropdown to organise all languages and cookbooks in a dropdown link named More. I find that it doesn't really make a difference though I like it better if the menu item is titled Supported environments and not More.

Yes, if we do this, we should certainly ensure we can call it something more informative than "More". But assume for a moment we can do that (it might require an upstream change, though). In that case, for me the biggest difference is when you go for example to the Python section of the docs. With this dropdown, the left sidebar should now only show links relevant to Python, not all other languages?

I have played around with the logo a bit because it is not clearly visible if located on the top navbar. It might make sense to keep it on the left side bar as is (see picture below).

Yes, it's indeed not very big .. Putting the logo on the sidebar gives a bit strange effect for the top navbar though, I find (with the navigation items being above the logo).
Another option might be to make the navbar or navbar img a bit larger, which I think is something that numpy did (https://github.com/numpy/numpy/blob/0febb4c40e98dc6fe35c7bcd672d0a6c438cd5c8/doc/source/_static/numpy.css#L3-L8)

@AlenkaF
Copy link
Member Author

AlenkaF commented Jul 11, 2023

With this dropdown, the left sidebar should now only show links relevant to Python, not all other languages?

Oh, that is true! Will use the dropdown then and see what can be done with the title of the button.

Another option might be to make the navbar or navbar img a bit larger ...

Yes, I think that would be a good option also.

@AlenkaF
Copy link
Member Author

AlenkaF commented Jul 11, 2023

Yes, if we do this, we should certainly ensure we can call it something more informative than "More". But assume for a moment we can do that (it might require an upstream change, though)

Opened an issue for it: pydata/pydata-sphinx-theme#1386

@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jul 11, 2023
@AlenkaF
Copy link
Member Author

AlenkaF commented Jul 11, 2023

@github-actions crossbow submit preview-docs

@AlenkaF
Copy link
Member Author

AlenkaF commented Jul 11, 2023

Screenshot 2023-07-11 at 14 23 24

@github-actions
Copy link

Revision: 8b40a3e

Submitted crossbow builds: ursacomputing/crossbow @ actions-21674461bf

Task Status
preview-docs Github Actions

@12rambau
Copy link

I have played around with the logo a bit because it is not clearly visible if located on the top navbar. It might make sense to keep it on the left side bar as is (see picture below).

If you needed another rational for not putting the logo in the left sidebar, it will be invisible on small screen where the left sidebar is hidden by default. I was just passing by, I'll see what we can do with @AlenkaF issue in the theme itself.

@AlenkaF
Copy link
Member Author

AlenkaF commented Jul 12, 2023

Thank you @12rambau for the information about the left sidebar and the issue in the theme (more of a feature request really)!
Regarding the logo, we increased the header height and it works very well 👍

@AlenkaF
Copy link
Member Author

AlenkaF commented Jul 12, 2023

Regarding the custom colors in our theme_overrides.css

--pst-color-active-navigation: 215, 70, 51;
--pst-color-link-hover: 215, 70, 51;
--pst-color-headerlink: 215, 70, 51;
/* Use normal text color (like h3, ..) instead of primary color */
--pst-color-h1: var(--color-text-base);
--pst-color-h2: var(--color-text-base);
/* Use softer blue from bootstrap's default info color */
--pst-color-info: 23, 162, 184;

The css color styles used currently are quite different then what the theme used before, see color variables for version 0.8 vs new color variables structure.

Currently the theme uses primary and secondary theme colors that are meant to complement one another visually across the whole theme (light and dark separately) plus some extra like "info", "warning", "success", ... but much less then in the old version of the theme.

Comparing the custom colors we have set in Apache Arrow to the colors in the new theme:

  • active navigation is red rgb(215, 70, 51) in our custom css and is light blue / primary rgb(69, 157, 185) in the new pydata sphinx theme
  • link hover is is also red rgb(215, 70, 51) currently and is orange/secondary rgb(238, 144, 64) in the new theme
  • I am not sure about the headerlink color. It is also defined to red currently, but am not sure how to match it with the new theme
  • h1 and h2 color is black rgb(51, 51, 51) currently and is light blue / primary rgb(69, 157, 185) in the new pydata sphinx theme
  • info color is light blue rgb(23, 162, 184) currently and is almost identical to the primary light blue rgb(69, 157, 185) in the new theme

What I suggest is to remove all css variables from our custom css and maybe change the secondary theme color to our current red rgb(215, 70, 51).

@jorisvandenbossche
Copy link
Member

Regarding colors, now we are updating it, it might be worth to directly check with the latest development version of the theme, as I know the colors are being overhauled (https://pydata-sphinx-theme.readthedocs.io/en/latest/user_guide/install.html#development-version).
(and for example, I think in the theme the h1 and h2 headers are now also black, like we did on our side)

@jorisvandenbossche
Copy link
Member

@github-actions crossbow submit preview-docs

@github-actions
Copy link

Revision: 125215b

Submitted crossbow builds: ursacomputing/crossbow @ actions-4ab7e303d8

Task Status
preview-docs Github Actions

docs/source/conf.py Outdated Show resolved Hide resolved
@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting change review Awaiting change review labels Sep 25, 2023
jorisvandenbossche added a commit to apache/arrow-site that referenced this pull request Sep 25, 2023
Pydata sphinx theme is currently [pinned to version
`0.8`](https://github.com/apache/arrow/blob/7b14b2b2712bc483cd7d14bbc6c38e26d27074ac/docs/requirements.txt#L8)
. The PR that updates the theme is ready to be merged:
apache/arrow#36591. Before we can do that we
need to update the `versions.json` file as the new theme needs extra
data to construct a version switcher and a versions warning.

This change should not affect the existing documentation.

---------

Co-authored-by: Joris Van den Bossche <[email protected]>
@jorisvandenbossche
Copy link
Member

OK, let's give this a go on the development docs, so we still have some time to fine tune before the 14.0 release. Thanks a lot Alenka!

@jorisvandenbossche jorisvandenbossche merged commit 7dc9f69 into apache:main Sep 27, 2023
12 checks passed
@jorisvandenbossche jorisvandenbossche removed the awaiting merge Awaiting merge label Sep 27, 2023
@AlenkaF AlenkaF deleted the update-pydata-theme branch September 27, 2023 15:05
@conbench-apache-arrow
Copy link

After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit 7dc9f69.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

etseidl pushed a commit to etseidl/arrow that referenced this pull request Sep 28, 2023
Preview: http://crossbow.voltrondata.com/pr_docs/36591/

### Rationale for this change

The Pydata Sphinx Theme that we use for our documentation has been pinned due to bigger changes in the theme layout. It needs to be unpinned and our layout needs to be updated.

### What changes are included in this PR?

Update of the Pydata Sphinx Theme and changes to our layout/structure:

- dark/light mode
- top menu bar
- search button in the top right navigation bar
- drop down from the theme layout in the top right navigation bar
- version warnings bar from the theme layout
- main landing page and the landing page for the dev docs

⚠️ Needs an update of the [versions.json](https://github.com/apache/arrow-site/blob/AlenkaF-patch-1/docs/_static/versions.json)

### Are these changes tested?

Yes, locally. Will also add docs preview via GitHub actions.

### Are there any user-facing changes?

No.

* Closes: apache#32451
* Closes: apache#36590

Lead-authored-by: AlenkaF <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
jorisvandenbossche pushed a commit that referenced this pull request Oct 11, 2023
…default (small) on smaller screens (#38148)

### Rationale for this change

The Sphinx theme we have been using (PyData Sphinx Theme) has been pinned to an older version for a while now and with the #36591 we have updated the code and are now using version 0.14.0 for the dev docs.

This PR fixes bugs we have encountered after the PR updating the theme has been merged.

### What changes are included in this PR?

- Have default header size for smaller screens and keep it increased for bigger screens.

* Closes: #38209

Authored-by: AlenkaF <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
raulcd pushed a commit that referenced this pull request Oct 12, 2023
…default (small) on smaller screens (#38148)

### Rationale for this change

The Sphinx theme we have been using (PyData Sphinx Theme) has been pinned to an older version for a while now and with the #36591 we have updated the code and are now using version 0.14.0 for the dev docs.

This PR fixes bugs we have encountered after the PR updating the theme has been merged.

### What changes are included in this PR?

- Have default header size for smaller screens and keep it increased for bigger screens.

* Closes: #38209

Authored-by: AlenkaF <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
llama90 pushed a commit to llama90/arrow that referenced this pull request Oct 12, 2023
…eight default (small) on smaller screens (apache#38148)

### Rationale for this change

The Sphinx theme we have been using (PyData Sphinx Theme) has been pinned to an older version for a while now and with the apache#36591 we have updated the code and are now using version 0.14.0 for the dev docs.

This PR fixes bugs we have encountered after the PR updating the theme has been merged.

### What changes are included in this PR?

- Have default header size for smaller screens and keep it increased for bigger screens.

* Closes: apache#38209

Authored-by: AlenkaF <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
AlenkaF added a commit that referenced this pull request Oct 18, 2023
### Rationale for this change

Broken link on the [arrow/README.md](https://github.com/apache/arrow/blob/main/README.md?plain=1#L102) after the landing page for the dev docs has been changed in #36591.
### What changes are included in this PR?

Update the link.

Authored-by: AlenkaF <[email protected]>
Signed-off-by: AlenkaF <[email protected]>
JerAguilon pushed a commit to JerAguilon/arrow that referenced this pull request Oct 23, 2023
Preview: http://crossbow.voltrondata.com/pr_docs/36591/

### Rationale for this change

The Pydata Sphinx Theme that we use for our documentation has been pinned due to bigger changes in the theme layout. It needs to be unpinned and our layout needs to be updated.

### What changes are included in this PR?

Update of the Pydata Sphinx Theme and changes to our layout/structure:

- dark/light mode
- top menu bar
- search button in the top right navigation bar
- drop down from the theme layout in the top right navigation bar
- version warnings bar from the theme layout
- main landing page and the landing page for the dev docs

⚠️ Needs an update of the [versions.json](https://github.com/apache/arrow-site/blob/AlenkaF-patch-1/docs/_static/versions.json)

### Are these changes tested?

Yes, locally. Will also add docs preview via GitHub actions.

### Are there any user-facing changes?

No.

* Closes: apache#32451
* Closes: apache#36590

Lead-authored-by: AlenkaF <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
JerAguilon pushed a commit to JerAguilon/arrow that referenced this pull request Oct 23, 2023
…eight default (small) on smaller screens (apache#38148)

### Rationale for this change

The Sphinx theme we have been using (PyData Sphinx Theme) has been pinned to an older version for a while now and with the apache#36591 we have updated the code and are now using version 0.14.0 for the dev docs.

This PR fixes bugs we have encountered after the PR updating the theme has been merged.

### What changes are included in this PR?

- Have default header size for smaller screens and keep it increased for bigger screens.

* Closes: apache#38209

Authored-by: AlenkaF <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
JerAguilon pushed a commit to JerAguilon/arrow that referenced this pull request Oct 23, 2023
### Rationale for this change

Broken link on the [arrow/README.md](https://github.com/apache/arrow/blob/main/README.md?plain=1#L102) after the landing page for the dev docs has been changed in apache#36591.
### What changes are included in this PR?

Update the link.

Authored-by: AlenkaF <[email protected]>
Signed-off-by: AlenkaF <[email protected]>
loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
Preview: http://crossbow.voltrondata.com/pr_docs/36591/

### Rationale for this change

The Pydata Sphinx Theme that we use for our documentation has been pinned due to bigger changes in the theme layout. It needs to be unpinned and our layout needs to be updated.

### What changes are included in this PR?

Update of the Pydata Sphinx Theme and changes to our layout/structure:

- dark/light mode
- top menu bar
- search button in the top right navigation bar
- drop down from the theme layout in the top right navigation bar
- version warnings bar from the theme layout
- main landing page and the landing page for the dev docs

⚠️ Needs an update of the [versions.json](https://github.com/apache/arrow-site/blob/AlenkaF-patch-1/docs/_static/versions.json)

### Are these changes tested?

Yes, locally. Will also add docs preview via GitHub actions.

### Are there any user-facing changes?

No.

* Closes: apache#32451
* Closes: apache#36590

Lead-authored-by: AlenkaF <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
…eight default (small) on smaller screens (apache#38148)

### Rationale for this change

The Sphinx theme we have been using (PyData Sphinx Theme) has been pinned to an older version for a while now and with the apache#36591 we have updated the code and are now using version 0.14.0 for the dev docs.

This PR fixes bugs we have encountered after the PR updating the theme has been merged.

### What changes are included in this PR?

- Have default header size for smaller screens and keep it increased for bigger screens.

* Closes: apache#38209

Authored-by: AlenkaF <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
### Rationale for this change

Broken link on the [arrow/README.md](https://github.com/apache/arrow/blob/main/README.md?plain=1#L102) after the landing page for the dev docs has been changed in apache#36591.
### What changes are included in this PR?

Update the link.

Authored-by: AlenkaF <[email protected]>
Signed-off-by: AlenkaF <[email protected]>
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
Preview: http://crossbow.voltrondata.com/pr_docs/36591/

### Rationale for this change

The Pydata Sphinx Theme that we use for our documentation has been pinned due to bigger changes in the theme layout. It needs to be unpinned and our layout needs to be updated.

### What changes are included in this PR?

Update of the Pydata Sphinx Theme and changes to our layout/structure:

- dark/light mode
- top menu bar
- search button in the top right navigation bar
- drop down from the theme layout in the top right navigation bar
- version warnings bar from the theme layout
- main landing page and the landing page for the dev docs

⚠️ Needs an update of the [versions.json](https://github.com/apache/arrow-site/blob/AlenkaF-patch-1/docs/_static/versions.json)

### Are these changes tested?

Yes, locally. Will also add docs preview via GitHub actions.

### Are there any user-facing changes?

No.

* Closes: apache#32451
* Closes: apache#36590

Lead-authored-by: AlenkaF <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
…eight default (small) on smaller screens (apache#38148)

### Rationale for this change

The Sphinx theme we have been using (PyData Sphinx Theme) has been pinned to an older version for a while now and with the apache#36591 we have updated the code and are now using version 0.14.0 for the dev docs.

This PR fixes bugs we have encountered after the PR updating the theme has been merged.

### What changes are included in this PR?

- Have default header size for smaller screens and keep it increased for bigger screens.

* Closes: apache#38209

Authored-by: AlenkaF <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
### Rationale for this change

Broken link on the [arrow/README.md](https://github.com/apache/arrow/blob/main/README.md?plain=1#L102) after the landing page for the dev docs has been changed in apache#36591.
### What changes are included in this PR?

Update the link.

Authored-by: AlenkaF <[email protected]>
Signed-off-by: AlenkaF <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Docs] Support Pydata Sphinx Theme 0.14.0 [Docs] Enable dark mode on documentation site
9 participants