-
-
Notifications
You must be signed in to change notification settings - Fork 997
Add link to latest documentation in version warning banner #2102
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
base: main
Are you sure you want to change the base?
Add link to latest documentation in version warning banner #2102
Conversation
@ulgens please have a look on this new PR focuing on the original issue |
@AyushPatiTripathi Why did you prefer the static link over the dynamic one? This won't work with local development env and any non-prod testing env. |
@ulgens thanks for pointing it out your are right i initially chose the static link for simplicity but i agreeit breaks compatibility with local and staging envirnments . i will update to use a relative link (/en/stable/) so it works across all envirnments . |
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.
Can you please minimize the diff, clean the conflicts and use a dynamic URL {% url ... %}
)
@AyushPatiTripathi Can you please share what is your plan with this implementation? I think it will be easier to move forward with a plan, otherwise it's hard to understand what is the goal with the changes. |
22f0551
to
830c779
Compare
781378c
to
c3f2315
Compare
The goal is to enhance the UX by making the warning alert (which appears when users are not on the latest version of the documentation) more actionable. Currently, the alert notifies users but doesn't help them navigate directly to the stable version. I proposed adding a clickable link within the alert that takes users straight to the stable docs version, making it easier for them to upgrade — especially first-time visitors or newcomers. I have minimize the diff and update the implementation using a dynamic {% url %} tag as suggested. |
for more information, see https://pre-commit.ci
@AyushPatiTripathi Thanks for the updates; the code looks better now. I'll try to review it on the weekend. Meanwhile, can you please update the screenshot in the PR description? |
Ticket: [#2904]
Before (Current Behavior)
The warning banner at the top of the documentation pages only notifies the user that they’re viewing an outdated version, without offering a direct link to the latest version.
After (Proposed Enhancement)
The warning banner now includes a clickable link that takes the user directly to the latest documentation version, providing:
Better user experience by reducing friction.
A simple, visible, and actionable way to access the updated docs.
Implementation Notes
Updated docs.html to include an anchor tag in the warning banner.
Used Django template syntax to dynamically resolve the correct "latest" version link.