-
Couldn't load subscription status.
- Fork 32
Fix/versioning dropdown #2110
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
base: main
Are you sure you want to change the base?
Fix/versioning dropdown #2110
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.
We indeed should have one rule for all repositories.
The rules should degrade from most explicit to least.
product in frontmatter > product in applicable_to frontmatter > product in docset.yml > legacy url mapping > docset git repository name.
We should warn if frontmatter defines both product and applicable to product. Perhaps we can even get rid of product in frontmatter alltogether? cc @shainaraskas @florent-leborgne
| { | ||
| versioning = applicableTo.ProductApplicability switch | ||
| { | ||
| { ApmAgentAndroid: not null } => VersionsConfiguration.VersioningSystems[VersioningSystemId.ApmAgentAndroid], |
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.
Maybe we should have an exhaustive ProductFromApplicability and have a unit test to ensure all known products are handled.
Are you talking about the following (product>id>cloud-kubernetes and applies_to>deployment>eck)? or are we talking about the we MOSTLY have both of these pieces of information on a page. they don't do the same thing, so I don't think we can deduplicate them. |
I'd like to see this ship in docs-content first to see if it is doing what we want. I'm reviewing this totally blind and unable to see where it might break down. I'd suggest that we keep the legacy page mapping as the "primary" piece of information, as a lot of times we manually ordered that list to have the dropdown work the way we wanted. this only doesn't work in places were we have no mapped pages to fall back on, or where a mapping belongs to an unversioned product. I'd personally probably pick:
|
|
2 cents, maybe that's too simplistic but my current impression is that we're trying to build a complex logic based on unreliable data:
Wouldn't it be simpler to have a specific frontmatter metadata that determines the versioning system of a page/set of page instead of relying on existing metadata initially built for a different purpose to try to guess it? We could do something like
Then look if we can map something to previous versions within the set versioning system. At least the setting is explicit and when a page isn't showing what it should, we just need to set it right explicitly rather than tweak the logic/play with priorities on other metadata. That way, we could also explicitly choose more easily to not show any version selection on certain doc sets based on their very purpose (like fundamentals, or some getting started pages) The simpler the solution is, the more writers can actually understand, control and predict such behaviors without needing a lead or docs-eng. |
|
We need these rules to have
Rule number 2 is the preferred way to be explicit, we always ask folks to include an We need rule number 1 to provide an override but we should keep the tagging at a minimum if We need option 4 for as long as docs-content has pages that would not be covered by rules 1,2,3 In the case of multiple products:
This may be less simplistic to implement but it puts a lot less cognitive overhead for most documentation sets. New projects just have to ensure |
|
@Mpdreamz we might want to chat about this synchronously tomorrow, because a lot of the terms that you're using aren't 100% clear to me (we say product a lot but it might multiple things in our metadata). I also think we differ in opinion about how reliable these data points are, and what to prioritize. I worry that, if I am understanding your order, we'll be breaking more dropdowns than we fix with this change because of how that |
Closes #2018, may solve a portion of #1660
Taking into account feedback and study cases provided by @shainaraskas, this PR handles the following:
Versioning system inference priority refinements
Pages in
docs-contentnow rely primarily on frontmatter metadata before legacy page matching.Question: Should this be applied to all repositories from the get-go, or should we phase this change?
Dropdown rendering
If a page has a versioning system that doesn't warrant version selection, don't render it.