patternfly-react icon indicating copy to clipboard operation
patternfly-react copied to clipboard

Page - updates to allow for section grouping

Open mcoker opened this issue 1 year ago • 0 comments

https://github.com/patternfly/patternfly/pull/6766

Updates the page sections to support multiple page body elements. This is for when you have multiple adjacent section blocks that will have the same background color (defined by the parent section) and reduced spacing between them compared to adjacent top-level page sections.

  • Add .pf-[v]-c-page__main-body to wrap the children of all top-level page sections (except __main-group) by default. Currently it's only added when used with isWidthLimited https://github.com/patternfly/patternfly-react/blob/d893997916429aa3543bab34dc4b28566ba49874/packages/react-core/src/components/Page/PageSection.tsx#L130-L131
    • Here are all of the top level page sections. Just a reminder, don't need __main-group https://github.com/srambach/patternfly/blob/d65a0dc98cd7e995b2d6249473e639a317e180a3/src/patternfly/components/Page/page.scss#L263-L269
  • Add isWidthLimited support for all of the page sections ^ except __main-group
  • Allow for multiple __main-body elements to be used within the sections except __main-group
  • While we're here, we should be able to remove support for __main-nav - that was previously used with tertiary navigation, which has since been removed.

mcoker avatar Jun 17 '24 15:06 mcoker