Skip to content
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

🐛 Fix PageSidebar structure and spacing of perpective selector above nav #1185

Merged
merged 2 commits into from
Jul 21, 2023

Conversation

mturley
Copy link
Collaborator

@mturley mturley commented Jul 21, 2023

Fixes #1163

As part of the PF5 upgrade we failed to wrap the children of <PageSidebar> in <PageSidebarBody> as mentioned in the release notes:

PageSidebar API has been updated. The nav property has been renamed to children. Any content passed to the property should be wrapped in PageSidebarBody.

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 😄 ✨

Screenshot 2023-07-21 at 12 07 14 PM

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>.

Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
Copy link
Contributor

@gildub gildub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks

@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (aaa75e3) 44.10% compared to head (7476d05) 44.10%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1185   +/-   ##
=======================================
  Coverage   44.10%   44.10%           
=======================================
  Files         177      177           
  Lines        4501     4501           
  Branches     1007     1007           
=======================================
  Hits         1985     1985           
  Misses       2505     2505           
  Partials       11       11           
Flag Coverage Δ
unitests 44.10% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
client/src/app/layout/SidebarApp/SidebarApp.tsx 26.66% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mturley
Copy link
Collaborator Author

mturley commented Jul 21, 2023

Marking as draft to revisit based on feedback from PF slack

@mturley
Copy link
Collaborator Author

mturley commented Jul 21, 2023

Marking ready again -- suggestions will have to wait for newer PF5 versions

@mturley mturley marked this pull request as ready for review July 21, 2023 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PF5 Regression] Spacing at the top of the nav bar is asymmetrical
2 participants