feat(password-input): new xs size#22112
Conversation
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22112 +/- ##
==========================================
- Coverage 95.05% 95.05% -0.01%
==========================================
Files 538 539 +1
Lines 45031 45155 +124
Branches 6473 6553 +80
==========================================
+ Hits 42805 42922 +117
- Misses 2097 2104 +7
Partials 129 129
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
xs size
|
@Rory-McDonald |
Oh yeah I think you are right, it's coming from the password manager on Microsoft edge.. My bad! |
alina-jacob
left a comment
There was a problem hiding this comment.
Hi @maradwan26, thanks for working on this!
I think the password toggle's button width is intentionally set at 40px to give the consistent padding from right side. The current implementation seems a bit tight..

Maybe we will eventually re-visit the adoption of a fluid ghost icon only button for Password input, similar to Number input. But till then, i think the 8px padding shown in the spec will be needed!
Let me confirm and get back!
|
As discussed in Tuesday's intake call, we've decided to stick to what the original code intended to do, until a design spec for password-input is finalized. |
dbb3bfa


Closes #21786
Partially addresses #21969
Adds
xssize to PasswordInput in React and Web Components.Changelog
New
xssize and updated storybook controls and tests accordinglyChanged
cds--layout--size-${size}class from the input field to the field wrapper so that both the input and toggle visibility button can use the tokens<input>field not having enough padding in some sizes, causing text to overflow into the toggle password visibiity buttonsizeprop only vertically stretches/compresses the button but the width is always 40px (example). Soxs = 40x24sm = 40x32,.... The issue description says to just follow the same approach used currently in code since the design spec is TBD, but I applied an equal height & width for all sizes anyway in the meantime until the spec is finalized, as it seems this was the intended behaviour here, the selectors just didn't work.Removed
cds--btn--icon-onlyclass to the fluid variant, andcds--btnto default variantcds--toggle-password-tooltipsince it's not needed on the buttonxlsize option from Storybook since it is not supported.cds--text-input--invalid + .cds--text-input--password__visibility__toggle, these aren't adjacent siblings)Testing / Reviewing
xs,sm,md, andlgshould render as expectedPR Checklist
As the author of this PR, before marking ready for review, confirm you: