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

how to show "you not reading the most recent version of this documentation" if I read old doc #480

Closed
larrycai opened this issue Mar 24, 2023 · 7 comments · Fixed by #494
Labels
enhancement New feature or request good first issue Good for newcomers javascript Things concerning Javascript code

Comments

@larrycai
Copy link

this is common pattern for doc system, to show hints that you are reading the old doc

Like https://sphinx-rtd-theme.readthedocs.io/en/1.1.1/ , then I got notes

You are not reading the most recent version of this documentation. [1.2.0](https://sphinx-rtd-theme.readthedocs.io/en/1.2.0/) is the latest version available.

Do we possible to have this feature in header/footer already

@randombenj
Copy link
Member

Great idea! I don't think that this should be too hard to implement, first we need to fix some bugs in the upcoming release.

@randombenj randombenj added enhancement New feature or request good first issue Good for newcomers javascript Things concerning Javascript code labels Mar 27, 2023
@reglim
Copy link
Contributor

reglim commented Apr 12, 2023

Ok, so I did that, and it's certainly possible, even though it might be a bit tricky to manage the iframe height:

image

So I thought maybe it'd make more sense to just pop up a banner and let it disappear again like this:

image

@randombenj @larrycai What do you think?

@randombenj
Copy link
Member

randombenj commented Apr 12, 2023

Yes! I would propose to show the banner, and the user has to explicitly click the x to close it.

@reglim
Copy link
Contributor

reglim commented Apr 12, 2023

@randombenj Fair, I can do that 👍

reglim added a commit that referenced this issue Apr 12, 2023
When the user is not on the latest version of a documentation, a warning
banner pops up. I had to restructure the MessageBannerProvider a bit for
that to work, but I think it's cleaner now.

Fixes: #480
@larrycai
Copy link
Author

Looks perfect, will u release it as 0.3.1? so I can easily to use container image like ghcr.io/docat-org/docat:0.3.1

@larrycai
Copy link
Author

I tested, it works as expected (no link to latest is ok for me)

BTW: in the help, there is no version for docat, little bit tricky to know which version is used.

@reglim
Copy link
Contributor

reglim commented Apr 13, 2023

@larrycai We're aware of that, there's a plan to add that as part of #427

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers javascript Things concerning Javascript code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants