8000 chore(tokens): updated components to use semantic spacer tokens by thatblindgeye · Pull Request #6507 · patternfly/patternfly · GitHub
[go: up one dir, main page]

Skip to content

chore(tokens): updated components to use semantic spacer tokens#6507

Merged
mcoker merged 18 commits intopatternfly:v6from
thatblindgeye:iss6292_semanticSpacers
Jul 26, 2024
Merged

chore(tokens): updated components to use semantic spacer tokens#6507
mcoker merged 18 commits intopatternfly:v6from
thatblindgeye:iss6292_semanticSpacers

Conversation

@thatblindgeye
Copy link
Contributor
@thatblindgeye thatblindgeye commented Apr 2, 2024

Closes #6292 , #6465

@thatblindgeye thatblindgeye changed the base branch from main to v6 April 2, 2024 15:21
@thatblindgeye thatblindgeye changed the title Iss6292 semantic spacers chore(tokens): updated components to use semantic spacer tokens Apr 2, 2024
@patternfly-build
Copy link
Collaborator
patternfly-build commented Apr 2, 2024

@thatblindgeye thatblindgeye force-pushed the iss6292_semanticSpacers branch from 0589ad1 to 6871fb9 Compare April 15, 2024 19:31
@thatblindgeye thatblindgeye marked this pull request as ready for review April 15, 2024 19:31
@thatblindgeye thatblindgeye linked an issue Apr 15, 2024 that may be closed by this pull request
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.

Awesome! As mentioned offline, I just had questions around

  • the multiplication/division of the tokens get large/small variations
  • the use of the tokens within the layouts to create space between things like icon/text and other gaps/margins

@thatblindgeye thatblindgeye force-pushed the iss6292_semanticSpacers branch 2 times, most recently from 30c1de4 to 95805d9 Compare May 1, 2024 12:34
@thatblindgeye thatblindgeye requested a review from mcoker May 1, 2024 12:36
@thatblindgeye thatblindgeye force-pushed the iss6292_semanticSpacers branch from 95805d9 to 07e5341 Compare May 1, 2024 19:56
@thatblindgeye thatblindgeye force-pushed the iss6292_semanticSpacers branch from 4e95c85 to add995b Compare May 30, 2024 13:07
@thatblindgeye thatblindgeye force-pushed the iss6292_semanticSpacers branch from add995b to 98859f5 Compare June 12, 2024 12:37
@thatblindgeye thatblindgeye requested a review from lboehling June 12, 2024 12:37
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.

Left some comments! Most are what we reviewed together. Also this PR has changed in scope since we first added tokens, and is a lot of stuff to keep track of in a single PR. I'm good with it if you want to keep it in this PR, or separate into multiple PRs, or get this to a point to merge with the intent to follow up in separate PRs... however you'd like to handle it 👍

--#{$text-input-group}__utilities--child--MarginInlineStart: var(--pf-t--global--spacer--xs);
--#{$text-input-group}__utilities--c-button--PaddingInlineEnd: var(--pf-t--global--spacer--xs);
--#{$text-input-group}__utilities--c-button--PaddingInlineStart: var(--pf-t--global--spacer--xs);
--#{$text-input-group}__utilities--child--MarginInlineStart: calc(var(--pf-t--global--spacer--control--horizontal--plain) / 2);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know if we have a spacer for this. --pf-t--global--spacer--gap--action-to-action--plain mayyy work, since I think the intention is we'll have plain actions here, but we have other things, too. IMO that might be alright, but we could err on the safe side and just continue to use --pf-t--global--spacer--xs. @lboehling wdyt? This is the gap used for the buttons and badge inside of the text input group on the right in this example https://patternfly-react-v6.surge.sh/components/search-input#match-with-navigable-options. Technically, I think you can put any kind of thing there you want.

Screenshot 2024-06-13 at 8 40 28 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted to t-shirt size for now

Comment on lines +45 to +48
--#{$tree-view}__node-toggle--PaddingBlockStart: var(--pf-t--global--spacer--control--vertical--default);
--#{$tree-view}__node-toggle--PaddingInlineEnd: var(--pf-t--global--spacer--control--horizontal--default);
--#{$tree-view}__node-toggle--PaddingBlockEnd: var(--pf-t--global--spacer--control--vertical--default);
--#{$tree-view}__node-toggle--PaddingInlineStart: var(--pf-t--global--spacer--control--horizontal--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 don't know that this needs to use a semantic spacer? My guess is the size of this box for the toggle icon just needs to match the tree view node padding. Similar to the table, if someone were to theme the semantic control/action spacer, they probably don't intend for this box to change shape, and if it did, it could cause the node box to extend out of the parent node.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted

@thatblindgeye thatblindgeye force-pushed the iss6292_semanticSpacers branch from 98859f5 to e618af8 Compare June 14, 2024 13:14
@thatblindgeye thatblindgeye force-pushed the iss6292_semanticSpacers branch 2 times, most recently from 28ca469 to 296fe48 Compare July 2, 2024 19:02
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.

There are a few changes to color tokens - are these intended in this PR? Just checking...

Comment on lines +156 to +165

// Compact/Spacious spacers - TO BE DELETED ONCE FIGMA IS UPDATED
--pf-t--global--spacer--action--vertical--spacious: var(--pf-t--global--spacer--md);
--pf-t--global--spacer--action--horizontal--spacious: var(--pf-t--global--spacer--xl);
--pf-t--global--spacer--action--vertical--compact: var(--pf-t--global--spacer--xs);
--pf-t--global--spacer--action--horizontal--compact: var(--pf-t--global--spacer--md);
--pf-t--global--spacer--action--horizontal--plain--compact: var(--pf-t--global--spacer--xs);
--pf-t--global--spacer--control--vertical--compact: var(--pf-t--global--spacer--xs);
--pf-t--global--spacer--control--horizontal--compact: var(--pf-t--global--spacer--md);
--pf-t--global--spacer--control--horizontal--spacious: var(--pf-t--global--spacer--lg);
Copy link
Member

Choose a reason for hiding this comment

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

Looks like these have made it to the big time!

@thatblindgeye thatblindgeye force-pushed the iss6292_semanticSpacers branch from 296fe48 to 5e28a07 Compare July 3, 2024 13:27
@thatblindgeye
Copy link
Contributor Author

@srambach removed a couple of lines related to Badge color/background that Evan removed in another PR, so should no longer be needed here. The other color token should be correct, assuming you mean the --#{$button}--m-plain--Color: var(--pf-t--global--icon--color--regular); change.

@lboehling The only token I didn't remove from the local token file was --pf-t--global--spacer--action--horizontal--plain--compact: var(--pf-t--global--spacer--xs);. Is there an alternative you prefer we use or should this one be added to Figma?

position: absolute;
inset-block-start: 50%;
inset-inline-start: var(--#{$text-input-group}__icon--InsetInlineStart);
font-size: var(--#{$text-input-group}__icon--FontSize);
Copy link
Member

Choose a reason for hiding this comment

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

This is a non-spacer change so if that's just a rebase thing, it's ok.

@thatblindgeye thatblindgeye force-pushed the iss6292_semanticSpacers branch from 5e28a07 to 90246ba Compare July 15, 2024 14:54
@thatblindgeye thatblindgeye force-pushed the iss6292_semanticSpacers branch from 568f249 to d845e52 Compare July 24, 2024 17:32
// Main
--#{$text-input-group}__main--first-child--not--text-input--MarginInlineStart: var(--pf-t--global--spacer--xs);
--#{$text-input-group}__main--m-icon__text-input--PaddingInlineStart: var(--pf-t--global--spacer--xl);
--#{$text-input-group}__main--first-child--not--text-input--MarginInlineStart: calc(var(--pf-t--global--spacer--control--horizontal--plain) / 2);
Copy link
Member

Choose a reason for hiding this comment

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

padding-block-start: var(--#{$text-input-group}__main--first-child--not--text-input--PaddingBlockStart); and padding-block-end: var(--#{$text-input-group}__main--first-child--not--text-input--PaddingBlockEnd); on line 158-9 are undefined - should it they defined here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Originally those padding-inlines were margins for the label group, but since we have the block on line ~163 for the padding on label group, removing the padding properties on lines 158-9.

@thatblindgeye thatblindgeye force-pushed the iss6292_semanticSpacers branch from d845e52 to dcfe185 Compare July 25, 2024 13:35
@mcoker
Copy link
Contributor
mcoker commented Jul 26, 2024

Pushed a fix for the action--horizontal--plain token

Here's the visual regression report https://drive.google.com/file/d/16seRrrSUEh3vW8tkMNGkHEuhPP_5lxrR/view?usp=sharing

@mcoker mcoker force-pushed the iss6292_semanticSpacers branch from bf264b9 to 6b296fb Compare July 26, 2024 18:25
@mcoker
Copy link
Contributor
mcoker commented Jul 26, 2024

Fixed a couple of bugs reported by @srambach. The wizard close button position shifted, and the toggle button/icon in the complex form demo with field groups shifted. Both can be verified as fixed in the shiny new visual regression report.

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!!! Thanks for working through this @thatblindgeye, expanding and helping build out the needed semantic spacers, and keeping the PR up to date all this time. You rock!!

Opened a follow up for text input group -#6930

@mcoker mcoker merged commit 7655b90 into patternfly:v6 Jul 26, 2024
@patternfly-build
Copy link
Collaborator

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

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

Suc 4AB2 cessfully merging this pull request may close these issues.

Menu toggle - inline spacing should match form control Use semantic spacer tokens

6 participants

0