Skip to content

Conversation

@KristinLBradley
Copy link
Contributor

@KristinLBradley KristinLBradley commented Oct 21, 2025

📌 Summary

If merged, this PR adds width: 100% to the FileInput which 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

image

🔗 External links


👀 Component checklist

💬 Please consider using conventional comments when reviewing this PR.

📋 PCI review checklist
  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
  • If applicable, I've worked with GRC to document the impact of any changes to security controls.
    Examples of changes to controls include access controls, encryption, logging, etc.
  • If applicable, I've worked with GRC to ensure compliance due to a significant change to the in-scope PCI environment.
    Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.

…ase example for testing purposes, add changeset
@vercel
Copy link

vercel bot commented Oct 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
hds-showcase Ready Ready Preview Oct 22, 2025 6:10pm
hds-website Ready Ready Preview Oct 22, 2025 6:10pm

@use "../../mixins/button" as *;

.hds-form-file-input {
width: 100%; // we want to prevent the input from overflowing its container
Copy link
Contributor Author

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|>
Copy link
Contributor Author

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.

Copy link
Contributor Author

@KristinLBradley KristinLBradley Oct 22, 2025

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.

@KristinLBradley KristinLBradley marked this pull request as ready for review October 22, 2025 00:27
@KristinLBradley KristinLBradley requested a review from a team as a code owner October 22, 2025 00:27
Copy link
Contributor

@didoo didoo left a 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.

Co-authored-by: Cristiano Rastelli <[email protected]>
didoo
didoo previously approved these changes Oct 22, 2025
Copy link
Contributor

@didoo didoo left a comment

Choose a reason for hiding this comment

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

Nice! 👌

@KristinLBradley KristinLBradley merged commit 18a2d08 into main Oct 22, 2025
16 checks passed
@KristinLBradley KristinLBradley deleted the hds-5106-file-input-width-update branch October 22, 2025 18:25
@hashibot-hds hashibot-hds mentioned this pull request Oct 22, 2025
aklkv pushed a commit that referenced this pull request Oct 26, 2025
@didoo didoo added this to the [email protected] milestone Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants