8000 feat(nav): added tokens, new design spec by mattnolting · Pull Request #6033 · patternfly/patternfly · GitHub
[go: up one dir, main page]

Skip to content

feat(nav): added tokens, new design spec#6033

Merged
mcoker merged 7 commits intopatternfly:v6from
mattnolting:chore-nav-tokens
Jan 3, 2024
Merged

feat(nav): added tokens, new design spec#6033
mcoker merged 7 commits intopatternfly:v6from
mattnolting:chore-nav-tokens

Conversation

@mattnolting
Copy link
Collaborator
@mattnolting mattnolting commented Nov 3, 2023

Fixes #6000

@patternfly-build
Copy link
Collaborator
patternfly-build commented Nov 3, 2023

@mattnolting mattnolting force-pushed the chore-nav-tokens branch 3 times, most recently from ad945cd to 2c2e3dd Compare November 9, 2023 14:36
@mattnolting mattnolting marked this pull request as ready for review November 9, 2023 14:36
@srambach
Copy link
Member
srambach commented Nov 9, 2023

In pages, you can see that we've got a large spacer on the inline-start of the page sidebar AND on the navigation. I think the padding should be removed from the page sidebar, WDYT?

@mattnolting
Copy link
Collaborator Author

In pages, you can see that we've got a large spacer on the inline-start of the page sidebar AND on the navigation. I think the padding should be removed from the page sidebar, WDYT?

@srambach Yep, I agree 👍

@srambach srambach linked an issue Nov 13, 2023 that may be closed by this pull request
@andrew-ronaldson
Copy link
Collaborator

Agree with the comments above on the spacer

Copy link
Member
@srambach srambach left a comment

Choose a reason for hiding this comment

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

Couple of minor things, but looks really good! Maybe you can walk us through the handlebars helpers sometime?

{{#if nav-link--text}}
{{> nav-link}}
{{/if}}
{{#if @partial-block}}
Copy link
Member

Choose a reason for hiding this comment

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

Just curious about the reason to put the partial-block inside a conditional

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Great question, the conditional allows for additional content in the nav__item. Without the conditional, partial content is required, which then requires a closing tag

{{#> nav-item nav-link--text='my-content'}}{{/nav-item}}

vs

{{> nav-item nav-link--text='my-content'}})

@lboehling
Copy link

this is looking great 🎉, thank you @mattnolting!! a few of comments --

  • I agree with the spacing comments above. can you remove the left and right padding from main nav sections, so it just has the top/bottom padding? like this
Screenshot 2023-11-15 at 10 22 11 AM
  • Can you remove the right padding from nested the nav section so it extends full width on the right like this?
Screenshot 2023-11-15 at 10 23 02 AM
  • Can we bump up group header text to body-md (14px)? In the designs I also had it set to small (12px) but i think that it reads better larger now that i see it in build! I'll need to update the design for this too.

  • The horizontal sub nav is showing within the page content area. Should it show below the masthead or should I update design to make it look better when placed in the page section?

Screenshot 2023-11-15 at 10 28 42 AM

@mattnolting
Copy link
Collaborator Author

@lboehling

I agree with the spacing comments above. can you remove the left and right padding from main nav sections, so it just has the top/bottom padding? like this

Done. Thanks @srambach 👍

Can you remove the right padding from nested the nav section so it extends full width on the right like this?

Done.

Screenshot 2023-11-16 at 11 38 03 AM

Can we bump up group header text to body-md (14px)? In the designs I also had it set to small (12px) but i think that it reads better larger now that i see it in build! I'll need to update the design for this too.

Done.

Screenshot 2023-11-16 at 11 38 46 AM

The horizontal sub nav is showing within the page content area. Should it show below the masthead or should I update design to make it look better when placed in the page section?

Screenshot 2023-11-16 at 11 26 45 AM

@lboehling I think it would be great to see both examples. The example you're referring to is controlled by page rather than nav, so we'd need to consider how main/subnav is presented within page context. I'd also like to see nav/subnav is the masthead in both mobile and desktop formats.

Screenshot 2023-11-16 at 11 47 25 AM

Screenshot 2023-11-16 at 11 43 33 AM

Should scroll-buttons have interaction states (hover/focus/active) other than text color?

Should scroll-buttons have a box-shadow when the list exceeds the available space?

Something like this:

Screenshot 2023-11-16 at 11 55 43 AM

@mattnolting mattnolting force-pushed the chore-nav-tokens branch 2 times, most recently from 274a6eb to 95e394b Compare November 16, 2023 17:13
@mattnolting mattnolting force-pushed the chore-nav-tokens branch 3 times, most recently from 39cba3e to 2100343 Compare November 30, 2023 20:16
@mattnolting mattnolting changed the base branch from v6-old to v6 December 13, 2023 19:06
@mattnolting mattnolting force-pushed the chore-nav-tokens branch 3 times, most recently from 40177a7 to ce99f2b Compare December 13, 2023 19:13
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.

LGTM, the only thing I'd like to look at before merging is the button enhancement to have its own class to mirror/flip its icon, since that's adding a feature to the react button. IIRC, last we spoke about it we wanted to try and use <Icon shouldMirrorRTL> anywhere there isn't a core class we can target to apply a mixin and you can pass the icon to something.

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.

Oh forgot to leave this comment - the new button vars you've introduced are not initially defined in the button component. Not sure if that's on purpose or not, but at a minimum the border-radius vars need to be added back since the button has lost its rounded corners https://patternfly-pr-6033.surge.sh/components/button

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.

Looks like a change to the inline button padding snuck through - was that intentional? Also it would be great to fix the display property, though it works as it is now, too.

Comment on lines +262 to +265
display: var(--#{$button}--Display, initial);
flex: var(--#{$button}--Flex, initial);
align-items: var(--#{$button}--AlignItems, initial);
justify-content: var(--#{$button}--JustifyContent, initial);
Copy link
Contributor

Choose a reason for hiding this comment

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

"initial" for the value of display is technically "inline", although it doesn't appear to be break anything, looks like the browser won't allow it to be a span. Should probably be "revert" though if you want to use whatever the browser default is.

Screenshot 2024-01-03 at 9 45 44 AM

Same for the others, but less important since they're ignored until you make it a flex element.

Comment on lines +4 to +6
--#{$button}--PaddingRight: var(--pf-t--global--spacer--lg);
--#{$button}--PaddingRight: var(--pf-t--global--spacer--md);
--#{$button}--PaddingBottom: var(--pf-t--global--spacer--sm);
--#{$button}--PaddingLeft: var(--pf-t--global--spacer--lg);
--#{$button}--PaddingLeft: var(--pf-t--global--spacer--md);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if this was intentional, but the design for button uses large spacers for the inline padding

Screenshot 2024-01-03 at 9 48 32 AM

@@ -304,6 +303,10 @@

padding-inline: var(--#{$nav}__scroll-button--button--InlinePadding);
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd say this should probably modify --#{$button}--PaddingLeft and --#{$button}--PaddingRight. We pretty much always style each side of padding/margin, unless we're updating all sides (usually to "0"). If we do want to change that and style inline/block as a single declaration/value, this would need to be --PaddingInline. We used to style the inline/block sides with like padding: var(--component--PaddingY) var(--component--PaddingX); but stopped, thought I don't remember why?

--#{$button}--start-end--Radius--BorderRadius: 0;
--#{$button}--end-start--Radius--BorderRadius: var(--#{$nav}__scroll-button--BorderRadius);
--#{$button}--end-end--Radius--BorderRadius: 0;
button {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious - why are you targeting button instead of the button component class? Here, L298, and L353.

@mcoker mcoker merged commit 536ef83 into patternfly:v6 Jan 3, 2024
@patternfly-build
Copy link
Collaborator

🎉 This PR is included in version 6.0.0-alpha.50 🎉

The release is available on:

Your semantic-release bot 📦🚀

mattnolting added a commit to mattnolting/patternfly that referenced this pull request Jan 4, 2024
mattnolting added a commit to mattnolting/patternfly that referenced this pull request Jan 4, 2024
mattnolting added a commit to mattnolting/patternfly that referenced this pull request Jan 4, 2024
mattnolting added a commit to mattnolting/patternfly that referenced this pull request Jan 4, 2024
mattnolting added a commit to mattnolting/patternfly that referenced this pull request Jan 4, 2024
mattnolting added a commit to mattnolting/patternfly that referenced this pull request Jan 4, 2024
mattnolting added a commit to mattnolting/patternfly that referenced this pull request Jan 4, 2024
mattnolting added a commit to mattnolting/patternfly that referenced this pull request Jan 4, 2024
mattnolting added a commit to mattnolting/patternfly that referenced this pull request Jan 9, 2024
mattnolting added a commit to mattnolting/patternfly that referenced this pull request Jan 11, 2024
mattnolting added a commit to mattnolting/patternfly that referenced this pull request Jan 11, 2024
mattnolting added a commit to mattnolting/patternfly that referenced this pull request Jan 16, 2024
mattnolting added a commit to mattnolting/patternfly that referenced this pull request Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consume tokens in: Navigation

7 participants

0