Skip to content

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

AyushPatiTripathi
Copy link

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.

Screenshot From 2025-06-18 14-29-55

@AyushPatiTripathi
Copy link
Author

@ulgens please have a look on this new PR focuing on the original issue

@ulgens
Copy link
Member

ulgens commented Jun 18, 2025

@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.

@AyushPatiTripathi
Copy link
Author

@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 .

@ulgens ulgens self-requested a review June 18, 2025 10:13
Copy link
Member

@ulgens ulgens left a 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 ... %})

@ulgens
Copy link
Member

ulgens commented Jun 18, 2025

@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.

@AyushPatiTripathi AyushPatiTripathi force-pushed the ticket-2904-docs-warning-link branch from 22f0551 to 830c779 Compare June 18, 2025 10:30
@AyushPatiTripathi AyushPatiTripathi force-pushed the ticket-2904-docs-warning-link branch from 781378c to c3f2315 Compare June 18, 2025 10:39
@AyushPatiTripathi
Copy link
Author

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.
Let me know if this aligns with what you'd like to see.

@AyushPatiTripathi AyushPatiTripathi requested a review from ulgens June 20, 2025 15:47
@ulgens
Copy link
Member

ulgens commented Jun 20, 2025

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants