🐛 Fix PageSidebar structure and spacing of perpective selector above nav #1185
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.
Fixes #1163
As part of the PF5 upgrade we failed to wrap the children of
<PageSidebar>
in<PageSidebarBody>
as mentioned in the release notes:Also, the padding at the top of the page sidebar body element has been moved to the top of the nav element in PF5, so our custom styles for the perspective selector broke. This fixes that CSS to restore the styles established in #251 (based on design guidelines here).
Note that we may still want to follow up and check if these design guidelines are still the best practice, since the context selector component is deprecated and I can't find equivalent guidelines in the new menu docs for a menu at the top of the nav like ours. It would be nice to find a solution that is supported by the PF components without these custom styles.
It's the little things 😄 ✨
Note: the diff is best viewed with "hide whitespace" checked in the diff viewer settings. The only change to the JSX was nesting things under
<PageSidebarBody>
.