-
Notifications
You must be signed in to change notification settings - Fork 266
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
Add support for modifying doc links and add support for different links for Rancher Prime #13020
base: master
Are you sure you want to change the base?
Conversation
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.
Took me a while to review it and test it, but no comments. Everything LGTM!
Interesting idea to have an extension that control all customisations to Prime 👍
It's failing on the check-plugins step with https://github.com/rancher/dashboard/actions/runs/12693532930/job/35381326812?pr=13020... probably because you typed |
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.
all gates seem good, so LGTM
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.
There'll need to be some extension site docs at some point. Could do as part of this PR or another?
93ff71c
to
f32d51a
Compare
@richard-cox Will do docs later - if there are no issues with this approach, we can document for others to use. |
Summary
Fixes #12384
Occurred changes and/or fixed issues
Technical notes summary
In order to allow a Prime extension to modify the documentation links, it needs to know:
Currently this metadata is not available to extensions. In order to make that available and for it to be available to built-in extensions, this requires a change to the way built-in extensions are loaded - they are no longer loaded immediately, but instead are recorded where they used to be initialised and now they get initialised in the same place as external extensions. This is much more consistent. At this point we have version information, so we extend the extension interface to add
environment
information.For built-in extensions, we also allow them to indicate that they should not load, in this case they are hidden - this allows the Prime extension to be hidden when not applicable.
The actual mechanism to change the documentation links is done via the
clean-html
directive - it ensures forA
links that the newlinkInterceptors
can modify URLs. We also wire this into theCommunityLinks
component, which renders links but does not use theclean-html
directive.Areas or cases that should be tested
This PR adds two e2e tests which check the two different ways in which the documentation links can be intercepted and verifies that these are correct for Prime.
Checklist