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

docs: show a warning banner for the latest docs (readthedocs+mkdocs) #5855

Merged

Conversation

stasadev
Copy link
Member

@stasadev stasadev commented Feb 16, 2024

@stasadev
Copy link
Member Author

@bmartinez287 please review this 🙂

@rfay
Copy link
Member

rfay commented Feb 16, 2024

Oh fantastic!

@bmartinez287
Copy link
Collaborator

bmartinez287 commented Feb 16, 2024

Looks good, I am testing an alternative with the announcement block bar.
https://squidfunk.github.io/mkdocs-material/setup/setting-up-the-header/#announcement-bar.
https://squidfunk.github.io/mkdocs-material/customization/#overriding-blocks
We might be able to use an environment variable on the mkdocs.yml file to trigger that block.
It be hard to avoid the flickering all together since the javascript will always load a little bit later.

Copy link
Collaborator

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

That's great!

The below suggested change makes the language a little more explicit, e.g. removing "latest" and emphasising "unreleased", since some people might skim read and see "latest" and think "well good, im using the latest version" without realising the specific meaning here that "latest" implies "unreleased"

docs/content/assets/warning-banner-for-latest.js Outdated Show resolved Hide resolved
docs/content/assets/warning-banner-for-latest.js Outdated Show resolved Hide resolved
@rfay
Copy link
Member

rfay commented Feb 17, 2024

Rebased to get docs test passing.

@rfay rfay changed the title docs: show a warning banner for the latest docs docs: show a warning banner for the latest docs (javascript) Feb 17, 2024
@stasadev stasadev force-pushed the 20240216_stasadev_warning_banner_for_latest_docs branch from 2f51a80 to 85f87b2 Compare February 19, 2024 10:42
@stasadev
Copy link
Member Author

I made it work for PRs as well and moved the warning banner, so now the menu doesn't jump, only the content:

https://ddev--5855.org.readthedocs.build/en/5855/

@bmartinez287
Copy link
Collaborator

Pretty cool, that is better.

@stasadev stasadev force-pushed the 20240216_stasadev_warning_banner_for_latest_docs branch from 85f87b2 to ced1643 Compare February 26, 2024 15:29
@stasadev stasadev changed the title docs: show a warning banner for the latest docs (javascript) docs: show a warning banner for the latest docs (readthedocs+mkdocs) Feb 26, 2024
@stasadev
Copy link
Member Author

stasadev commented Feb 26, 2024

I made it work as it should. No more flickering 🎉

Updated the description.

If this ever breaks, we have an alternative described in the OP.

@bmartinez287
Copy link
Collaborator

Looks great.

Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

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

Thanks!

@@ -46,7 +46,8 @@ There are cases like access to hosting provider integrations that have essential
* **CircleCI**: Maintainers automatically have some access via their GitHub team membership, but should probably get more.
* **developer.apple.com**: Add to the DDEV team there so certificates can be managed.
* **hub.docker.com**: Add user to owners team in DDEV org.
* **Chocolatey**: Add user to [Manage maintainers](https://community.chocolatey.org/packages/ddev/1.22.5/ManagePackageOwners).
* **Chocolatey**: Add user to [Manage maintainers](https://community.chocolatey.org/packages/ddev/ManagePackageOwners).
* **Read the Docs**: Add user to [Maintainers](https://readthedocs.org/dashboard/ddev/users/).
Copy link
Member

Choose a reason for hiding this comment

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

Yay!

@@ -62,7 +62,7 @@ These environments can be extended, version controlled, and shared, so you can t

1. Install Docker with [recommended settings](users/install/docker-installation.md#windows).
2. Install [DDEV for Windows](users/install/ddev-installation.md#windows).
3. Launch your [first project](users/project) and start developing. 🚀
3. Launch your [first project](users/project.md) and start developing. 🚀
Copy link
Member

Choose a reason for hiding this comment

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

I wonder why these weren't caught by links check.

Copy link
Member Author

Choose a reason for hiding this comment

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

I saw the warning in the build only after I fixed the deprecated emoji plugins 🙂.
The link itself works as before (mkdocs gives us some slack).

@rfay
Copy link
Member

rfay commented Feb 26, 2024

@mattstein do you want to take a look?

@rfay rfay merged commit cff220b into ddev:master Feb 26, 2024
12 checks passed
@stasadev stasadev deleted the 20240216_stasadev_warning_banner_for_latest_docs branch February 27, 2024 09:01
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.

None yet

4 participants