Skip to content

Conversation

@olamilekan000
Copy link
Contributor

@olamilekan000 olamilekan000 commented Dec 1, 2025

Summary

change adds a warning banner in the documentation to ensure that there's a clear
distinction between the released and unreleased versions of the doc
image

What Type of PR Is This?

/kind documentation

Related Issue(s)

Fixes 3736

Release Notes

Added sticky warning banner on "main" branch documentation to alert users they're viewing unreleased content.

@kcp-ci-bot kcp-ci-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has signed the DCO. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 1, 2025
@olamilekan000 olamilekan000 force-pushed the add-warning-banner-for-unrelease-doc-version branch from d936f35 to f8614dd Compare December 2, 2025 00:15
@ntnn
Copy link
Member

ntnn commented Dec 2, 2025

I like the header but the orange is a bit krass. Maybe a light blue, lilac or cyan?

@ntnn
Copy link
Member

ntnn commented Dec 2, 2025

/kind documentation

@kcp-ci-bot kcp-ci-bot added kind/documentation Categorizes issue or PR as related to documentation. and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Dec 2, 2025
@olamilekan000 olamilekan000 force-pushed the add-warning-banner-for-unrelease-doc-version branch from f8614dd to ea9033c Compare December 3, 2025 13:07
@olamilekan000 olamilekan000 requested a review from embik December 3, 2025 13:09
@xmudrii
Copy link
Member

xmudrii commented Dec 3, 2025

From Slack: https://kubernetes.slack.com/archives/C09C7UP1VLM/p1764769123353489?thread_ts=1764631722.014269&cid=C09C7UP1VLM

I think the banner is nice, but I find the script is quite complex. I think we should first solve that https://docs.kcp.io/kcp redirects to the latest stable version. Then you can just use that link in the banner, it would always lead to the latest stable version, no need for complex JS code.

I'm pretty sure that https://docs.kcp.io/kcp used to work like that, to lead to the latest stable version. I don't know why/when it broke.

@olamilekan000 olamilekan000 force-pushed the add-warning-banner-for-unrelease-doc-version branch 3 times, most recently from 381a9b9 to 07fd8e9 Compare December 4, 2025 12:24
@olamilekan000
Copy link
Contributor Author

From Slack: https://kubernetes.slack.com/archives/C09C7UP1VLM/p1764769123353489?thread_ts=1764631722.014269&cid=C09C7UP1VLM

I think the banner is nice, but I find the script is quite complex. I think we should first solve that https://docs.kcp.io/kcp redirects to the latest stable version. Then you can just use that link in the banner, it would always lead to the latest stable version, no need for complex JS code.
I'm pretty sure that https://docs.kcp.io/kcp used to work like that, to lead to the latest stable version. I don't know why/when it broke.

This works perfectly fine at the moment.

I think we should first solve that https://docs.kcp.io/kcp redirects to the latest stable version

I think we can focus on the banner?

Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

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

Let's please remove console.log lines, I don't think these are needed.

if (!link) return;

const latestPath = getLatestVersionPath();
console.log("latestPathlatestPath", latestPath)
Copy link
Member

Choose a reason for hiding this comment

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

Nit: I don't think this is needed in the prod.

Copy link
Contributor

Choose a reason for hiding this comment

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

this and should be good to go

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@olamilekan000 olamilekan000 force-pushed the add-warning-banner-for-unrelease-doc-version branch from 07fd8e9 to 748e4e5 Compare December 9, 2025 12:39
@mjudeikis
Copy link
Contributor

/lgtm
/approve

@kcp-ci-bot kcp-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 9, 2025
@kcp-ci-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 8107289cc96546db9ec24234ee39a73156fc6a26

@kcp-ci-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mjudeikis

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kcp-ci-bot kcp-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 9, 2025
@kcp-ci-bot kcp-ci-bot merged commit fc8bd0e into kcp-dev:main Dec 9, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. kind/documentation Categorizes issue or PR as related to documentation. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add version banner warning for unreleased main branch documentation

5 participants