Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(PasswordInput): updated size props #10612

Merged

Conversation

sstrubberg
Copy link
Member

@sstrubberg sstrubberg commented Feb 1, 2022

REF 10295

  • Added FeatureFlag ternary for PasswordInput size prop based on guidance provided by design. REF
  • Removed the defaultProps object and moved them to default params. REF
  • Updated the public snappy and other tests because i moved the defaultProps.

Testing

  • Make sure Toggle Password Visibility story is behaving correctly in the v11 & v10 storybooks and that size props are accurately reflected according to the design guidance.

@netlify
Copy link

netlify bot commented Feb 1, 2022

✔️ Deploy Preview for carbon-react-next ready!

🔨 Explore the source changes: 70f8310

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/6206b0ebb3ed4f0008b6fccb

😎 Browse the preview: https://deploy-preview-10612--carbon-react-next.netlify.app

@netlify
Copy link

netlify bot commented Feb 1, 2022

✔️ Deploy Preview for carbon-elements ready!

🔨 Explore the source changes: 70f8310

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/6206b0eb1cc7e30007d6cd88

😎 Browse the preview: https://deploy-preview-10612--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Feb 1, 2022

✔️ Deploy Preview for carbon-components-react ready!
Built without sensitive environment variables

🔨 Explore the source changes: 70f8310

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/6206b0eb1061400007bdbdc5

😎 Browse the preview: https://deploy-preview-10612--carbon-components-react.netlify.app

onClick = () => {},
onTogglePasswordVisibility,
placeholder,
size = 'md',
Copy link
Contributor

Choose a reason for hiding this comment

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

sorry, last thing. I thought md was just for v11? Would we need a ternary here for v10 sizes: small & large?

Copy link
Member Author

Choose a reason for hiding this comment

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

derp, good call. Should I go empty string since there was no default in v10?

Copy link
Member Author

@sstrubberg sstrubberg Feb 2, 2022

Choose a reason for hiding this comment

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

I guess we can also wait to see if Percy finishes out. Md might already be default since before it was just asking for a string.

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 think there are any styles for md in v10/v11 since there are no styles for ${prefix}--text-input--md in /styles or /components so I guess in a way the default is md size wise, it's just never called out specifically?

Copy link
Member Author

Choose a reason for hiding this comment

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

@abbeyhrt Totally. That's what I was assuming as well. The fact the Percy didn't yell at me for setting md is pretty telling, i think. @joshblack can we get some confirmation on these assumptions?

Copy link
Contributor

@abbeyhrt abbeyhrt Feb 10, 2022

Choose a reason for hiding this comment

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

Personally, I would go for an empty for the size prop since md doesn't have any meaning but it's also something we can change later on since it wouldn't break anything.

Copy link
Contributor

@jnm2377 jnm2377 left a comment

Choose a reason for hiding this comment

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

Both of the stories seem to be working as expected, so approving :)

Copy link
Contributor

@abbeyhrt abbeyhrt left a comment

Choose a reason for hiding this comment

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

Stories look good!

@sstrubberg sstrubberg enabled auto-merge (squash) February 10, 2022 18:43
@sstrubberg sstrubberg merged commit 7558fe0 into carbon-design-system:main Feb 11, 2022
@jnm2377 jnm2377 mentioned this pull request Feb 14, 2022
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants