-
Notifications
You must be signed in to change notification settings - Fork 29
Combine applies_to badges with the same key #1900
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?
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.
Pull Request Overview
This PR combines applies_to badges with the same key into a single badge to reduce redundancy in the UI. The combined badge shows the lifecycle closest to the current version and combines tooltip text from all lifecycles.
- Combines multiple applies_to badges with identical keys into a single badge display
- Implements primary applicability selection logic that prioritizes available versions over future ones
- Modifies tooltip text to include combined information from all lifecycles
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
ApplicableToViewModel.cs | Adds badge combination logic and primary applicability selection |
ApplicabilityRenderer.cs | Implements combined tooltip text generation and primary selection |
ApplicabilityItem.cs | Updates record structure to support primary applicability |
ApplicableToComponent.cshtml | Updates template to use primary applicability |
Test files | Updates test expectations for combined badge behavior |
ApplicabilityMappings.cs | Minor formatting change |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…ector utility class - Created new ApplicabilitySelector class in Elastic.Documentation.AppliesTo namespace - Removed duplicated GetPrimaryApplicability method from ApplicabilityRenderer and ApplicableToViewModel - Updated both classes to use the new utility class - Improves code reusability and reduces duplication
- Moved ApplicabilitySelector from Elastic.Documentation to Elastic.Markdown.Myst.Components - Added missing using statements for AllVersions and SemVersion - All tests now pass successfully
…o domain layer - Changed parameter from VersioningSystem to SemVersion currentVersion - Moved ApplicabilitySelector back to Elastic.Documentation.AppliesTo namespace - Updated callers to pass versioningSystem.Current - Simplified interface and improved domain separation - All tests pass successfully
Part of #1709
Changes
Follow-ups