-
Notifications
You must be signed in to change notification settings - Fork 51
FileInput - Add 100% width style (HDS-5106)
#3318
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
Conversation
…ase example for testing purposes, add changeset
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| @use "../../mixins/button" as *; | ||
|
|
||
| .hds-form-file-input { | ||
| width: 100%; // we want to prevent the input from overflowing its container |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding max-width made no difference, so I left it out
Updated FileInput to have a width of 100% for consistency.
| <ShwTextH3>States</ShwTextH3> | ||
|
|
||
| <ShwFlex @gap="2rem" as |SF|> | ||
| <ShwGrid @columns={{4}} @gap="2rem" as |SG|> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing this to a Grid allowed the style update to be tested & seen in the example when the browser screen width was reduced. (Let me know if you think it would be better to add a new example.)
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@didoo I changed this part back and added a new "Containers" sub-section.
didoo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a couple of minor comments
| <ShwTextH3>States</ShwTextH3> | ||
|
|
||
| <ShwFlex @gap="2rem" as |SF|> | ||
| <ShwGrid @columns={{4}} @gap="2rem" as |SG|> |
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry, something went wrong.
Co-authored-by: Cristiano Rastelli <[email protected]>
showcase/app/components/page-components/form/file-input/sub-sections/containers.gts
Outdated
Show resolved
Hide resolved
didoo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! 👌
Co-authored-by: Cristiano Rastelli <[email protected]>
📌 Summary
If merged, this PR adds
width: 100%to theFileInputwhich prevents it from overflowing its container when space is limited in layouts (browsers will automatically truncate text) and making it consistent with the styling of other component input widths.Preview: https://hds-showcase-git-hds-5106-file-input-width-update-hashicorp.vercel.app/components/form/file-input
📸 Screenshots
🔗 External links
👀 Component checklist
💬 Please consider using conventional comments when reviewing this PR.
📋 PCI review checklist
Examples of changes to controls include access controls, encryption, logging, etc.
Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.