Skip to content

Conversation

@tompsota
Copy link
Contributor

@tompsota tompsota commented Sep 2, 2022

What: Closes #7526

I think that this PR could close also #7710 - all demos now use DashboardWrapper and number of cards was increased so it is easier to see the sticky behavior.

@patternfly-build
Copy link
Collaborator

patternfly-build commented Sep 2, 2022

Copy link
Contributor

@nicolethoen nicolethoen left a comment

Choose a reason for hiding this comment

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

So this is a little confusing, i'll admit - but I think the issue here is actually asking to make sure that the page demos match the Dashboard wrapper - not use the dashboard wrapper. That's because we want consumers to be able to use the example code to build their own page, and they cannot see the code in the dashboard wrapper.

To avoid obfuscating the solution, we need to just update the existing demos so that they match the dashboard wrapper without importing the wrapper. You could even copy/paste a lot of the code from the dashboard wrapper to make it easier.

@tompsota
Copy link
Contributor Author

tompsota commented Sep 9, 2022

So this is a little confusing, i'll admit - but I think the issue here is actually asking to make sure that the page demos match the Dashboard wrapper - not use the dashboard wrapper. That's because we want consumers to be able to use the example code to build their own page, and they cannot see the code in the dashboard wrapper.

To avoid obfuscating the solution, we need to just update the existing demos so that they match the dashboard wrapper without importing the wrapper. You could even copy/paste a lot of the code from the dashboard wrapper to make it easier.

Yeah I refactored the demos too much probably 😆 should be better now

@tompsota tompsota force-pushed the masthead_dashboard_wrapper branch 2 times, most recently from 49da3a0 to ab97662 Compare September 12, 2022 07:52
Copy link
Collaborator

@wise-king-sullyman wise-king-sullyman left a comment

Choose a reason for hiding this comment

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

This looks great!

Copy link
Member

@mcarrano mcarrano left a comment

Choose a reason for hiding this comment

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

These look good. Thanks @tompsota !

Copy link
Collaborator

@mmenestr mmenestr left a comment

Choose a reason for hiding this comment

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

LGTM also!

Copy link
Contributor

@tlabaj tlabaj left a comment

Choose a reason for hiding this comment

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

LGTM. Great work

Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

This looks great. I don't think any of my comments are blockers, they all look like pre-existing issues. Though they be great to fix! And most of the comments apply to all of these demos, and probably the DashboardWrapper, too. I can open new issues if you'd like, just lemme know.

);

const pageNav = (
<Nav onSelect={onNavSelect} aria-label="Nav">
Copy link
Contributor

@mcoker mcoker Sep 29, 2022

Choose a reason for hiding this comment

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

Suggested change
<Nav onSelect={onNavSelect} aria-label="Nav">
<Nav onSelect={onNavSelect}>

I think we want this aria-label to be "Global", otherwise the rotor reads this as "Nav navigation". "Global" is the default, so if we want to update, you could remove this entirely.

aria-label={ariaLabel || (variant === 'tertiary' ? 'Local' : 'Global')}

If so, we should update the main dashboard nav label, too -

<Nav onSelect={this.onNavSelect} aria-label="Nav">

This also matches the <PageToggleButton>'s aria-label. Those labels should probably match.

<PageToggleButton variant="plain" aria-label="Global navigation">


const sidebar = <PageSidebar nav={pageNav} />;

const mainContainerId = 'main-content-page-layout-tertiary-nav';
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a nit, but all of these use this string. Maybe we make it more generic, like 'main-content'?

Comment on lines 292 to 293
Body text should be Overpass Regular at 16px. It should have leading of 24px because <br />
of its relative line height of 1.5.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit and out of scope, but we should update this (and anywhere else it exists) to be generic text. We don't use Overpass anymore, no need for a line break, and the font-size/line-height stuff could change. I can open a new issue if you'd like, just lemme know.

}
}}
>
<PageSection variant={PageSectionVariants.light}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably good to add isWidthLimited here, especially since the card gallery below is limited. Not necessary if the content is short enough, but that's likely what the <br /> in the current content is for - to keep the text from spanning too wide on the screen.

Comment on lines 279 to 281
isTertiaryNavWidthLimited
isBreadcrumbWidthLimited
isTertiaryNavGrouped
Copy link
Contributor

Choose a reason for hiding this comment

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

it doesn't look like tertiary nav is defined in any of these demos.

Suggested change
isTertiaryNavWidthLimited
isBreadcrumbWidthLimited
isTertiaryNavGrouped
isBreadcrumbWidthLimited

Also having is[...]Grouped without defining the thing that goes in it will create an empty page group section

const isGrouped = isTertiaryNavGrouped || isBreadcrumbGrouped || additionalGroupedContent;
const group = isGrouped ? (
<PageGroup {...groupProps}>
{isTertiaryNavGrouped && nav}
{isBreadcrumbGrouped && crumb}
{additionalGroupedContent}
</PageGroup>
) : null;

@tompsota
Copy link
Contributor Author

tompsota commented Sep 30, 2022

This looks great. I don't think any of my comments are blockers, they all look like pre-existing issues. Though they be great to fix! And most of the comments apply to all of these demos, and probably the DashboardWrapper, too. I can open new issues if you'd like, just lemme know.

@mcoker I updated the demo based on your comments. I also agree that this should be fixed in other demos and in DashboardWrapper. @nicolethoen what do you think about creating a separate issue for that??

@nicolethoen
Copy link
Contributor

I also agree that this should be fixed in other demos and in DashboardWrapper. @nicolethoen what do you think about creating a separate issue for that??

I agree - go for it!

Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

Nice, thanks @tompsota!! 🏆

@tlabaj tlabaj merged commit dd3f70b into patternfly:main Sep 30, 2022
@patternfly-build
Copy link
Collaborator

Your changes have been released in:

  • @patternfly/react-catalog-view-extension@4.92.22
  • @patternfly/react-code-editor@4.82.22
  • @patternfly/react-console@4.92.22
  • @patternfly/react-core@4.247.1
  • @patternfly/react-docs@5.102.26
  • @patternfly/react-inline-edit-extension@4.86.22
  • demo-app-ts@4.202.3
  • @patternfly/react-log-viewer@4.87.17
  • @patternfly/react-table@4.110.22
  • @patternfly/react-topology@4.88.22
  • @patternfly/react-virtualized-extension@4.88.22

Thanks for your contribution! 🎉

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.

Chore: Page - Update Masthead to match Dashboard Wrapper

9 participants