Skip to content

[W-12011582] add latest version shortcut#7

Open
cheungaryk wants to merge 10 commits intolatestfrom
W-12011582-add-latest-ver-shortcut-gc
Open

[W-12011582] add latest version shortcut#7
cheungaryk wants to merge 10 commits intolatestfrom
W-12011582-add-latest-ver-shortcut-gc

Conversation

@cheungaryk
Copy link
Copy Markdown
Contributor

@cheungaryk cheungaryk commented Dec 6, 2022

ref: W-12011582

If a page with this EOL banner is part of a component that has multiple versions AND the page is not in the latest version, the banner will include an additional sentence with a link to the equivalent page index page of the latest version.

What's not working:

  • not compatible with the current version of Antora which is v3.0.3 due to the lack of some of the variables used. We can't upgrade to v3.1.x due to a bug, so waiting for v3.2.0 to be released (ETA: unknown)
  • the link's URL is not completely functional - it has .adoc at the end that needs to be manually removed (or remove it using JavaScript)
  • if there is no equivalent page in the latest version, it will not redirect to the index page of the latest version like the old banner. There is also no easy way to check for and update such a broken link even with JavaScript.

@cheungaryk
Copy link
Copy Markdown
Contributor Author

@hannanelson I was able to upgrade antora to v3.1.2 and implemented a new built-in variable to construct a link to the latest version for the EOL banners and notes. However, I was not able to directly address the issue where if there is no equivalent page in the latest version, then the link will go to "page not found". It may take some more script magic to make that happen and it sounds very hacky to me.

Note that the above issue doesn't apply to the old EOL banner for the entire version because that one generates the links during the antora build time where antora can check whether an equivalent page exists, but our current implementation generates the links when the page loads, so it's harder to perform that check.

The easiest way to address this seems to be just link the user to the index page of the latest version, that way we don't need to write any extra hacky scripts.

@hannanelson
Copy link
Copy Markdown
Contributor

@cheungaryk - that seems like an acceptable solution to me!

@cheungaryk cheungaryk marked this pull request as ready for review February 8, 2023 16:40
@cheungaryk
Copy link
Copy Markdown
Contributor Author

ready for review. It should look like the following if the banner is applied to an older (as in not latest) version of a product with versions:

Screenshot 2023-02-08 at 8 40 37 AM

if the banner is applied to the latest version of a product, or a product with no version:

Screenshot 2023-02-08 at 8 43 41 AM

This is done by applying include::reuse::partial$eol-banner.adoc[tag=eolFeatureDep] to the intended pages.

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