Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

DOC: Restore banner indicating docs are unreleased#26219

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

QuLogic
Copy link
Member

PR summary

This was dropped when switching to the pydata-sphinx-theme. They have a method of adding an announcement, but because it's a pure text substitution, we can't have it automatically search like our old banner.

While the theme also supports loading from an http resource, that would mean writing some JavaScript instead of automatically creating this div at build time.

So override the theme component, and create the search link at build time.

I'm only a bit annoyed that the announcement overlays the normal navigation bar. I'm not sure it's really possible to avoid that without wrapping both in their own stickydiv, but that would require overriding the entire theme layout, and that's a bit too much for my taste.

PR checklist

story645 and rcomer reacted with hooray emojistory645 reacted with eyes emoji
@QuLogicQuLogic added this to thev3.8.0 milestoneJun 29, 2023
@QuLogicQuLogicforce-pushed therestore-unreleased-banner branch from45c932f to4eed16fCompareJune 29, 2023 06:29
@QuLogic
Copy link
MemberAuthor

I'm only a bit annoyed that the announcement overlays the normal navigation bar. I'm not sure it's really possible to avoid that without wrapping both in their own stickydiv, but that would require overriding the entire theme layout, and that's a bit too much for my taste.

For this bit, I've added in a shift to the normal navigation bar based on its minimum height from CSS. This won't work everywhere (i.e., if text is wrapped), but is a bit better than nothing.

@melissawm
Copy link
Member

There is an un-merged implementation of this in the pydata-sphinx-theme:pydata/pydata-sphinx-theme#1335

I have actually copy-pasted a previous solution also from the pydata-sphinx-theme here:napari/napari-sphinx-theme#132

Ultimately the napari team is going in another direction but I just wanted to point out existing implementations in case this helps.

@QuLogicQuLogicforce-pushed therestore-unreleased-banner branch from4eed16f to999e291CompareJune 29, 2023 19:35
@QuLogic
Copy link
MemberAuthor

I was aware of the pydata-sphinx-theme PR; I'm hoping we can migrate to it once it's been released. Ithink we won't have a reason to put an announcement on the devdocs, so I think it's okay to steal that space to make the warning.

Anyway, we already have peopleconfused about unreleased features, so it's probably best to restore this sooner rather than later.

melissawm reacted with thumbs up emoji

@QuLogicQuLogic marked this pull request as ready for reviewJune 29, 2023 23:34
@@ -0,0 +1,11 @@
{% set header_classes = ["bd-header-announcement", "container-fluid"] %}
{%- if '+' in release %}
Copy link
Member

@ksundenksundenJul 5, 2023
edited
Loading

Choose a reason for hiding this comment

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

Do we have access to all variables from conf.py here? if so would it be better to dois_release_build here?

is_release_build=tags.has('release')# noqa

@QuLogic
Copy link
MemberAuthor

@tacaswell also noted that we may want to do announcements on releases, and this doesn't quite allow that, but I think I can make a small tweak to fix that.

This was dropped when switching to the pydata-sphinx-theme. They have amethod of adding an announcement, but because it's a pure textsubstitution, we can't have it automatically search like our old banner.While the theme also supports loading from an http resource, that wouldmean writing some JavaScript instead of automatically creating this divat build time.So override the theme component, and create the search link at buildtime.
@QuLogicQuLogicforce-pushed therestore-unreleased-banner branch from999e291 todf5d59aCompareJuly 6, 2023 00:06
@QuLogic
Copy link
MemberAuthor

OK, should work in all 3 cases: release build, unreleased build, and an announcement.

@greglucasgreglucas merged commitc0d9c98 intomatplotlib:mainJul 16, 2023
@QuLogicQuLogic deleted the restore-unreleased-banner branchJuly 17, 2023 17:18
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ksundenksundenksunden approved these changes

@greglucasgreglucasgreglucas approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
v3.8.0
Development

Successfully merging this pull request may close these issues.

4 participants
@QuLogic@melissawm@ksunden@greglucas

[8]ページ先頭

©2009-2025 Movatter.jp