fix(TextInputGroup): updated inline padding of icons#6945
fix(TextInputGroup): updated inline padding of icons#6945mcoker merged 4 commits intopatternfly:v6from
Conversation
|
Preview: https://patternfly-pr-6945.surge.sh A11y report: https://patternfly-pr-6945-a11y.surge.sh |
|
From 8.5.24 working session w/ @lboehling
|
mcoker
left a comment
There was a problem hiding this comment.
Everything looks great! Just a couple of nits on the naming and token used in one spot. Lemme know what you think!
| --#{$text-input-group}__icon--m-status--InsetInlineEnd: var(--pf-t--global--spacer--sm); | ||
| --#{$text-input-group}__icon--InsetInlineStart: var(--pf-t--global--spacer--control--horizontal--default); | ||
| --#{$text-input-group}__icon--m-status--InsetInlineEnd: var(--pf-t--global--spacer--control--horizontal--default); | ||
| --#{$text-input-group}__c-utilities__icon--m-status--InsetInlineEnd: var(--pf-t--global--spacer--control--horizontal--compact); |
There was a problem hiding this comment.
Just a couple of nits on this
- The syntax for this var is flexible since it's a pretty uncommon pattern. Though typically we reserve the
c-[whatever]naming when we reference another component (egc-button). We'll use--[component/BEM element](eg--c-buttonor--utilities) as a general identifier (not necessarily a child or direct child, just in there somewhere) so I wonder if the suggestion below is better? - Also not sure if
--pf-t--global--spacer--control--horizontal--compact)is the right spacer. Reason being, if a person themed their compact control padding, I wouldn't expect this spacing to update? Since it doesn't necessarily need to conform to an outer button/control padding to match other controls, I think we could just use the--spacer--smtoken here. WDYT?
| --#{$text-input-group}__c-utilities__icon--m-status--InsetInlineEnd: var(--pf-t--global--spacer--control--horizontal--compact); | |
| --#{$text-input-group}--utilities--icon--m-status--InsetInlineEnd: var(--pf-t--global--spacer--control--horizontal--compact); |
7cf0c16 to
d4d0bd9
Compare
d4d0bd9 to
59ce58b
Compare
|
@andrew-ronaldson should be fixed now, forgot to update the other instance of the CSS var that was renamed in the latest update |
andrew-ronaldson
left a comment
There was a problem hiding this comment.
sweet moves, ace!
mcoker
left a comment
There was a problem hiding this comment.
Looks awesome, just one nit comment that I think should be pretty straight forward?
| --#{$text-input-group}__main--first-child--not--text-input--MarginInlineStart: calc(var(--pf-t--global--spacer--control--horizontal--plain) / 2); | ||
| --#{$text-input-group}__main--m-icon__text-input--PaddingInlineStart: calc(var(--pf-t--global--spacer--control--horizontal--default) + var(--pf-v6-c-text-input-group__icon--FontSize) + var(--pf-t--global--spacer--gap--text-to-element--default)); | ||
| --#{$text-input-group}--status__text-input--PaddingInlineEnd: var(--pf-t--global--spacer--xl); | ||
| --#{$text-input-group}--status__text-input--PaddingInlineEnd: calc(var(--pf-t--global--spacer--control--horizontal--default) + var(--pf-v6-c-text-input-group__icon--FontSize) + var(--pf-t--global--spacer--gap--text-to-element--default)); |
There was a problem hiding this comment.
This is awesome. But when the close button is present, we adjust the status button's inset from --pf-t--global--spacer--control--horizontal--default to --pf-t--global--spacer--sm with the other change in this PR. That leaves a little too much padding between the status icon and text in the text input.
WDYT about creating a variation of this var that swaps --pf-t--global--spacer--control--horizontal--default with --pf-t--global--spacer--sm? Then it looks like this, with the visual spacer being the text-to-element spacer:
There was a problem hiding this comment.
Pushed, lemme know if that's what you had in mind. FWIW updating the existing var so that it starts as calc(var(--#{$text-input-group}__icon--m-status--InsetInlineEnd)... also worked, though I imagine if a consumer is updating that specific var we wouldn't want that to affect the spacing between status icon and text input.
59ce58b to
a17862c
Compare
|
🎉 This PR is included in version 6.0.0-alpha.217 🎉 The release is available on: Your semantic-release bot 📦🚀 |



Closes #6930
Couple of notes;
The gap between the status icon and utilities is slightly larger now.

This PR:
Staging:

Did we want padding at the end of the utilities, to create more of a visual gap? Right now when the close button is hovered there's not much of a gap:

But if we used the same spacing as the icons it may create too much of a visual gap when the button isn't focused:
