Repository navigation
Fix tagGroup display when showSchemas is configured - #851
Merged
sserrata merged 4 commits intoJun 27, 2024
Merged
Conversation
This commit takes the first tagGroup category's Schema category, adds it to the very end of the sidebarSlice, and deletes the Schema category from all the (now sibling) tagGroup categories. Closes PaloAltoNetworks#836
3 of 4 tasks
|
Visit the preview URL for this PR (updated for commit 776ae5a): (expires Sat, 27 Jul 2024 15:16:48 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
sserrata
approved these changes
Jun 27, 2024
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
groupByTags()function insidebars/index.tsis already generating the Schemas category for bothgroupBy: "tag"andgroupBy: "tagGroup". It seems like the simplest, least disruptive way of accomplishing what I wanted was to utilize the Schemas category aftergroupByTags()was finished going through all the tagGroups.In the case of tagGroups, now, it moves the "Schemas" category (if any) from the first tagGroup category (since all the schema categories are identical anyway) to the end of the sidebar, as a "sibling" to all the tagGroup categories. Then, it discards the "Schemas" category from all of the tagGroup categories.
Motivation and Context
As reported in #836, an extra Schemas category is currently placed inside ever tagGroup category if
showSchemas: trueis configured. This PR aims resolve this.How Has This Been Tested?
Visibly in this PR, I've added a schema object to the Restaurant example API, and configured it with
showSchemas: true. Additionally, I have (locally) tested this out with thetagGrouped API spec that I initially noticed the bug with.Screenshots (if appropriate)
Types of changes
Checklist
I have added tests to cover my changes if appropriate.I couldn't quite figure out where to place a relevant test. None of the existing ones looked like they were applicable to this kind of fix.