8000 feat(Panel): consumed Penta tokens by thatblindgeye · Pull Request #6160 · patternfly/patternfly · GitHub
[go: up one dir, main page]

Skip to content

feat(Panel): consumed Penta tokens#6160

Merged
mcoker merged 2 commits intopatternfly:v6from
thatblindgeye:panelPenta
Dec 21, 2023
Merged

feat(Panel): consumed Penta tokens#6160
mcoker merged 2 commits intopatternfly:v6from
thatblindgeye:panelPenta

Conversation

@thatblindgeye
Copy link
Contributor

Work towards #5711

Right now this just updates vars to use tokens since the Drawer designs in Figma aren't totally 1:1 for what a Panel is.

Should we remove the bordered and raised styling for a panel, and follow more closely the inline, full page Drawer designs? That looks to have no border and always has a box shadow around it, but I'm not sure if we would always want the panel to have a box shadow.

@thatblindgeye thatblindgeye requested review from a team, andrew-ronaldson, mattnolting and mcoker and removed request for a team December 19, 2023 15:52
// scrollable
--#{$panel}--m-scrollable__main--MaxHeight: #{pf-size-prem(300px)};
--#{$panel}--m-scrollable__main--Overflow: auto;
--#{$panel}--m-scrollable__footer--BoxShadow: 0 #{pf-size-prem(-5px)} #{pf-size-prem(4px)} #{pf-size-prem(-4px)} #{rgba($pf-v5-color-black-1000, .16)}; // insets the shadow so it doesn't show on left/right sides
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a token we want to use for this hardcoded rgba?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure we'll even want a box-shadow there? If so, @andrew-ronaldson do you want to pick a palette color to replace it since this color will go away, and then @thatblindgeye we can put in a todo or follow up issue so we don't lose this?

Copy link
Contributor

Choose a reason for hiding this comment

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

fwiw, with our box shadow tokens we're just using black (rgba(0 0 0 / 16%))

@patternfly-build
Copy link
Collaborator
patternfly-build commented Dec 19, 2023

@andrew-ronaldson
Copy link
Collaborator

Looks like there is some dark theme tokens shenanigans.
Screenshot 2023-12-19 at 12 38 43 PM

@thatblindgeye
Copy link
Contributor Author

@andrew-ronaldson ah that should be covered by the Drawer portion of the linked issue. This PR only covers the Panel component. There are some Toolbar examples that use a panel to contain Menu components where the text isn't working properly in Dark mode, but that should be resolved by the Menu penta work.

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.

This looks good other than that variable you called out.

// scrollable
--#{$panel}--m-scrollable__main--MaxHeight: #{pf-size-prem(300px)};
--#{$panel}--m-scrollable__main--Overflow: auto;
--#{$panel}--m-scrollable__footer--BoxShadow: 0 #{pf-size-prem(-5px)} #{pf-size-prem(4px)} #{pf-size-prem(-4px)} #{rgba($pf-v5-color-black-1000, .16)}; // insets the shadow so it doesn't show on left/right sides
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure we'll even want a box-shadow there? If so, @andrew-ronaldson do you want to pick a palette color to replace it since this color will go away, and then @thatblindgeye we can put in a todo or follow up issue so we don't lose this?

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, though I do think the raised variation should use the floating background token.

Is there a design for panel? I didn't see it in figma.

--#{$panel}--m-raised--BackgroundColor: var(--#{$pf-global}--BackgroundColor--100);
--#{$panel}--m-raised--BoxShadow: var(--pf-t--global--box-shadow--md);
--#{$panel}--m-raised--ZIndex: var(--pf-t--global--Zindex--sm);
--#{$panel}--m-raised--BackgroundColor: var(--pf-t--global--background--color--primary--default);
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe the intention for this variation is to act as a panel that would float on top of other stuff, like a dropdown or whatever. Assuming that's true, we'll want to use the floating background color token.

The v5 panel was using the floating background color but only in dark theme since that's where it was added -

--#{$panel}--m-raised--BackgroundColor: var(--#{$pf-global}--BackgroundColor--300);

// scrollable
--#{$panel}--m-scrollable__main--MaxHeight: #{pf-size-prem(300px)};
--#{$panel}--m-scrollable__main--Overflow: auto;
--#{$panel}--m-scrollable__footer--BoxShadow: 0 #{pf-size-prem(-5px)} #{pf-size-prem(4px)} #{pf-size-prem(-4px)} #{rgba($pf-v5-color-black-1000, .16)}; // insets the shadow so it doesn't show on left/right sides
Copy link
Contributor

Choose a reason for hiding this comment

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

fwiw, with our box shadow tokens we're just using black (rgba(0 0 0 / 16%))

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.

reviewed w/ @srambach and updated the box shadow and raised background color

@mcoker mcoker merged commit e3c142b into patternfly:v6 Dec 21, 2023
@patternfly-build
Copy link
Collaborator

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

The release is available on:

Your semantic-release bot 📦🚀

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.

6 participants

0