8000 feat(Wizard): apply tokens by srambach · Pull Request #6251 · patternfly/patternfly · GitHub
[go: up one dir, main page]

Skip to content

feat(Wizard): apply tokens#6251

Merged
mcoker merged 10 commits intopatternfly:v6from
srambach:5742-tokens-for-wizard
Feb 14, 2024
Merged

feat(Wizard): apply tokens#6251
mcoker merged 10 commits intopatternfly:v6from
srambach:5742-tokens-for-wizard

Conversation

@srambach
Copy link
Member

Fixes #5742

Uses the link button for styling the wizard nav links, although there are a few overrides.

There is now a line above the footer in all cases; no shadow when sticky. (per design)

There's a TODO to calculate an offset but I think that can wait for another day...

@patternfly-build
Copy link
Collaborator
patternfly-build commented Jan 25, 2024

@srambach srambach linked an issue Jan 25, 2024 that may be closed by this pull request
@srambach srambach requested review from a team, mattnolting, mcoker and thatblindgeye and removed request for a team January 31, 2024 18:17
Copy link
Contributor
@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

This is a followup/docs thing I noticed, but some examples need to be updated to either include the toggle icon for the second step or make that second step not have substeps:

image

--#{$wizard}__nav-link--before--TranslateX: calc(-100% - var(--#{$pf-global}--spacer--sm));
--#{$wizard}__nav-link--m-current--before--BackgroundColor: var(--#{$pf-global}--active-color--100);
--#{$wizard}__nav-link--m-current--before--Color: var(--#{$pf-global}--Color--light-100);
--#{$wizard}__nav-link--before--Top: var(--#{$pf-global}--spacer--form-element);
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need a todo to replace with a token form element spacer?

// Close
--#{$wizard}__close--Top: calc(var(--#{$pf-global}--spacer--lg) - var(--#{$pf-global}--spacer--form-element));
--#{$wizard}__close--Top: calc(var(--pf-t--global--spacer--lg) - var(--#{$pf-global}--spacer--form-element));
--#{$wizard}__close--Right: 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Would we want to update this from 0? Right now at < xl viewports the button is right up against the edge of the wizard header, which it may just be the context of the example as it would look fine in the context of an actual page most likely.

image

@andrew-ronaldson
Copy link
Collaborator

Screenshot 2024-02-08 at 12 01 08 PM
The selected step needs the action/plain/clicked/ background change, please and thanks

@srambach srambach force-pushed the 5742-tokens-for-wizard branch from e20569d to 1dd48a1 Compare February 12, 2024 20:01
@srambach srambach force-pushed the 5742-tokens-for-wizard branch from 1d4085c to 5be043f Compare February 13, 2024 22:20
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.

  • in page wizards - only the content should scroll, header and footer should be sticky (though they don't need to be position sticky necessarily)
  • step number background disappears on hover/focus in dark mode
  • disabled step text color changes slightly on hover in dark mode

--#{$wizard}__nav-link--before--TranslateX: calc(-100% - var(--#{$pf-global}--spacer--sm));
--#{$wizard}__nav-link--m-current--before--BackgroundColor: var(--#{$pf-global}--active-color--100);
--#{$wizard}__nav-link--m-current--before--Color: var(--#{$pf-global}--Color--light-100);
--#{$wizard}__nav-link--before--Top: var(--#{$pf-global}--spacer--form-element); // TODO form element spacer
Copy link
Contributor

Choose a reason for hiding this comment

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

Figure out a way to get this to align with an existing token

--#{$wizard}__footer--child--MarginBottom: var(--pf-t--global--spacer--sm);
--#{$wizard}__footer-cancel--MarginLeft: calc(var(--pf-t--global--spacer--2xl) - var(--#{$wizard}__footer--child--MarginRight));

@media screen and (min-width: $pf-v5-global--breakpoint--xl) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Take out any sort of inset changes that are switching between md and lg spacers at the xl breakpoint, and just use the lg/24px inset across viewports.

&.pf-m-disabled {
--#{$wizard}__nav-link--Color: var(--#{$wizard}__nav-link--m-disabled--Color);

pointer-events: none;
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to keep this for when the item is a.pf-m-disabled

--#{$wizard}__toggle--m-expanded--BorderBottomColor: var(--#{$pf-global}--BorderColor--100);
--#{$wizard}--m-in-page__toggle--xl--PaddingLeft: calc(var(--#{$pf-global}--spacer--xl) + var(--#{$wizard}__nav-link--before--Width) + var(--#{$pf-global}--spacer--sm));
--#{$wizard}__toggle--BackgroundColor: var(--pf-t--global--background--color--primary--default);
--#{$wizard}__toggle--ZIndex: var(--pf-t--global--Zindex--xs);
Copy link
Contributor

Choose a reason for hiding this comment

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

Toggle has a box shadow that isn't showing because it's behind the wizard nav - increasing the z-index on the toggle gets it to show. It's worth noting that v5 has this same z-index setup and the box shadow on the toggle does show, so I'm wondering if something else has changed the stacking order of toggle + nav on mobile?

Copy link
Contributor

Choose a reason for hiding this comment

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

Confirmed this is pre-existing - it happens when the drawer is in the main section. It's probably best fixed by assigning a z-index to the main section that's lower than the toggle, which should keep the toggle on top of all children in the main section, regardless their z-index. However, the main section has no z-index on purpose so its children (like menus) that have z-indexes can pop out on top of the footer. I'm not sure how to get around that.

Another option could be to use a border instead of a shadow on the toggle, similar to the update I think we made for the wizard footer. There is already a border in place of the shadow on the toggle when the nav is expanded. wdyt @lboehling? It would look like this:

This is the current shadow:
Screenshot 2024-02-13 at 9 48 45 PM

With a border instead:
Screenshot 2024-02-13 at 9 51 07 PM

And the pre-existing border when the nav is expanded:
Screenshot 2024-02-13 at 9 49 59 PM

@mcoker mcoker mentioned this pull request Feb 14, 2024
@mcoker mcoker merged commit 157d54b into patternfly:v6 Feb 14, 2024
@patternfly-build
Copy link
Collaborator

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

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.

Consume tokens: Wizard

5 participants

0