Skip to content

Conversation

rossnelson
Copy link
Collaborator

Summary

  • Improved combobox input sizing behavior for better flexibility
  • Added right padding for improved visual spacing

Implementation Details

Instead of using the newer field-sizing: content CSS property (which isn't supported by stylelint), this uses a combination of:

  • min-width: 0 to allow the input to shrink below its content width
  • width: auto for natural sizing
  • flex: 1 1 auto to allow flexible growth and shrinking within the flex container
  • pr-2 (padding-right) for better visual spacing

This approach provides similar benefits to field-sizing: content while maintaining compatibility with our current tooling.

Test Plan

[ ] Test combobox behavior with various content lengths
[ ] Verify input expands/contracts appropriately
[ ] Check multiselect mode still works correctly
[ ] Confirm visual spacing looks good in different states

- Set min-width: 0 and width: auto for flexible sizing
- Use flex: 1 1 auto to allow natural growth/shrink
- Add right padding (pr-2) for better visual spacing
Copy link

vercel bot commented Sep 8, 2025

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

Project Deployment Preview Comments Updated (UTC)
holocene Ready Ready Preview Comment Sep 8, 2025 4:35pm

- Add autoWidth prop (defaults to false for backward compatibility)
- When enabled, dynamically adjusts input width based on content
- Uses hidden span element to measure text width
- Maintains original size-based behavior when autoWidth is false
- Add right padding for improved visual spacing
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.

1 participant