Skip to content

Added Out-Of-Date Documentation Header for v1.24 #16457

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 4 commits into
base: release-1.24
Choose a base branch
from

Conversation

sbegin0
Copy link
Contributor

@sbegin0 sbegin0 commented May 7, 2025

Description

Added a warning header to all docs pages warning user that this version is out-of-date with an option to go to /latest

Reviewers

  • Ambient
  • Docs
  • Installation
  • Networking
  • Performance and Scalability
  • Extensions and Telemetry
  • Security
  • Test and Release
  • User Experience
  • Developer Infrastructure
  • Localization/Translation

Added a warning header to all docs pages warning user that this version is out-of-date with an option to go to /latest
@sbegin0 sbegin0 requested a review from a team as a code owner May 7, 2025 19:24
@istio-testing istio-testing added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 7, 2025
dhawton
dhawton previously requested changes May 7, 2025
Copy link
Member

@dhawton dhawton left a comment

Choose a reason for hiding this comment

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

This branch is not served on any documentation site.

@craigbox
Copy link
Contributor

craigbox commented May 8, 2025

It will be - that's the point of the exercise. We will regenerate and re-copy the archives to the current site in order to get these changes to apply.

@dhawton
Copy link
Member

dhawton commented May 8, 2025

It will be - that's the point of the exercise. We will regenerate and re-copy the archives to the current site in order to get these changes to apply.

Gotcha.. sorry.. I didn't know that was the plan.

@dhawton dhawton dismissed their stale review May 8, 2025 07:58

letting Craig run this

Copy link
Contributor

@craigbox craigbox left a comment

Choose a reason for hiding this comment

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

Last fix requests left inline.

Will the lint ever pass? Don't think so, but it should never be a problem as this header is only added when building in archive mode.
The archive pages are not linted, so I think a mass update to those won't cause a problem.

Alternatively we can detect that we're in archive mode and disable link checking.

@dhawton for thoughts

Comment on lines 160 to 161
<!-- Archived Documentation Header -->
{{ $archiveVersion := "v1.24" }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Not needed any more...

Comment on lines 162 to 163
{{ if eq .Section "docs" }}
<div class="archive-warning-banner" role="alert"
Copy link
Contributor

Choose a reason for hiding this comment

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

...but you do need a check that you're in archive mode (.Site.Data.args.archive), else this will show up on latest and preliminary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see. Then, we'll be able to copy/paste these changes to all applicable branches, and upon a new release, the header will change automatically. Smart.

Comment on lines 164 to 165
style="background-color: #fff3cd; color: #664d03; padding: 1rem; border-bottom: 1px solid #ffecb5; text-align: center;">
<p style="margin-bottom: 0; margin-top: 0;">⚠️ This documentation is for an older version (<strong>{{ .Site.Data.args.version }}</strong>) and is no longer updated.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please move all the styles into an assets/sass/misc/_archive.scss and add an input for archive to assets/sass/_all.scss

Comment on lines 163 to 164
<p>⚠️ This documentation is for an older version (<strong>{{ .Site.Data.args.version }}</strong>) and is no longer updated.
<a href="/latest{{ .RelPermalink | safeURL }}">Read the latest version</a>.</p>
Copy link
Contributor

@craigbox craigbox May 20, 2025

Choose a reason for hiding this comment

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

sorry for adding yet another hoop but perhaps we should internationalise this text?
Throw the strings in i18n/en.toml and use {{ i18n }} to refer to them. (Plenty of examples to check; look at one that uses %s so you can leave the version part out)

Did you check what happens with this redirect when you're on an archive page that's non-English?

@sbegin0 sbegin0 requested a review from a team as a code owner May 20, 2025 17:46
@istio-testing istio-testing added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 20, 2025
@istio-testing
Copy link
Contributor

@sbegin0: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
lint_istio.io_release-1.24 f8bcd97 link true /test lint

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@craigbox
Copy link
Contributor

@wilsonwu @Andygol Could you guys please help with translations for

[archive_banner_text]
other = "⚠️ This documentation is for an older version (<strong>%s</strong>) and is no longer updated."

[archive_banner_link]
other = "Read the latest version."

@Andygol
Copy link
Contributor

Andygol commented May 21, 2025

[archive_banner_text]
other = "⚠️ This documentation is for an older version (<strong>%s</strong>) and is no longer updated."

[archive_banner_link]
other = "Read the latest version."

@craigbox 🇺🇦 Ukrainian translation 👇

[archive_banner_text]
other = "⚠️ Це документація для (застарілої) версії (<strong>%s</strong>), яка вже не підтримується."

[archive_banner_link]
other = "Читати останню версію."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/docs size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants