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
Show per page documentation #13376
Show per page documentation #13376
Conversation
We discussed this in a call earlier today, but leaving a comment here as well for transparency.
|
Looks generally good to me, but for some reason, it doesn't pick up the OS docs on my fedora system. |
Are we happy with just Logs and Services for the initial implementation? Can always add other links later. |
"To see OS specific documentation, you need to use also ws from this PR."
No, I'll add all of them (by "all" I of course mean the best I can do, but someone may also have some suggestions. There is no limit on how many and which docs we have on each page) |
|
I feel the if it goes from most-to-least specific you have items jump around a lot, depending if that page has specific help or not. But I don't have any super-strong feelings about the order in general. |
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.
Very nice! I'm glad that making the Help menu dynamic per-page is reasonably straightforward!
"docs": [ | ||
{ | ||
"name": "Services", | ||
"url": "https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/managing_systems_using_the_rhel_8_web_console/managing-services-in-the-web-console_system-management-using-the-rhel-8-web-console" |
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.
I'm a bit sceptical that this is a stable link. Did you talk to Vendula about that? I think she had a solution for that.
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.
I did talk to her and this indeed is a stable link. It is constructed from chapters and sections IDs.
Went through the documentation and put related chapters to related pages. Also wrote tests. Ready for review. (running tests to see, if they work on all OSes, or if there are some surprises). |
This is useful for validating PRs like cockpit-project#13376
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.
This looks amazing, thanks! Just some nitpicks.
# DOCUMENTATION_URL is only in Fedora | ||
# RHEL is tracked in rhbz#1789984 | ||
if "fedora" in m.image: | ||
expected = "Fedora documentation" + expected |
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.
Curious that this works -- so wait_collected_text()
ignores all space? Like this it will look for "documentationWeb Console", which is confusing. Could this get a space? Likewise in teh "".join()
above?
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.
The method is already implemented like that and we use it on a few places (also in podman).
It literally just picks all text from all matching elements. It does not add any spaces or anything if text does not contain it.
Tested again with all the new links. Works great, thanks! |
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.
Cheers! 👍
Yes I did, I wanted to tested it today. |
Needs to be skipped on rhel-8-2-distropkg (totally forgot we introduced this in a meantime) |
To see OS specific documentation, you need to use also ws from this PR.
Followup: