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

[Input] Allow customization of prefix-text and suffix-text width #8688

Closed
2 of 6 tasks
Tracked by #7180
macandcheese opened this issue Feb 2, 2024 · 6 comments
Closed
2 of 6 tasks
Tracked by #7180
Assignees
Labels
Application Prototype Lab - APL Issues logged by Application Prototype Lab - APL team members. Calcite (design) Issues logged by Calcite designers. calcite-components Issues specific to the @esri/calcite-components package. design Issues that need design consultation prior to development. design-tokens Issues requiring design tokens. enhancement Issues tied to a new feature or request. estimate - 2 Small fix or update, may require updates to tests. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive p - low Issue is non core or affecting less that 10% of people using the library

Comments

@macandcheese
Copy link
Contributor

macandcheese commented Feb 2, 2024

Check existing issues

Description

The prefix-text and suffix-text functionalities of Input determine their width from the length of the provided string. This is expected, but in a situation where multiple Input are aligned, and the string lengths are different, it can cause visual misalignment.
image

Acceptance Criteria

Css properties for --calcite-input-prefix-text-width and --calcite-input-suffix-text-width are exposed to allow for this customization.
image

Relevant Info

@SkyeSeitz @ashetland - We'll likely want to decide if we "start-align" or "end-align" the suffix-text here. prefix-text seems safe to always "start-align". I suppose we could also decide this based on the alignment property of Input, should we want to.

We have #8154 to track general updates to this functionality, but these enhancements will be useful regardless of visual changes.

Which Component

Input and any Input-based components that accept these options.

Example Use Case

I have multiple Input stacked with varying prefix-text and suffix-text lengths. I'd like these to align.

Priority impact

p4 - not time sensitive

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

Calcite (design)

@macandcheese macandcheese added enhancement Issues tied to a new feature or request. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Feb 2, 2024
@github-actions github-actions bot added Calcite (design) Issues logged by Calcite designers. calcite-components Issues specific to the @esri/calcite-components package. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive labels Feb 2, 2024
@macandcheese macandcheese added the design-tokens Issues requiring design tokens. label Feb 2, 2024
@geospatialem geospatialem added design Issues that need design consultation prior to development. p - low Issue is non core or affecting less that 10% of people using the library estimate - 2 Small fix or update, may require updates to tests. labels Aug 13, 2024
@geospatialem
Copy link
Member

For design expertise to determine support for the above.

@SkyeSeitz
Copy link

@SkyeSeitz @ashetland - We'll likely want to decide if we "start-align" or "end-align" the suffix-text here. prefix-text seems safe to always "start-align". I suppose we could also decide this based on the alignment property of Input, should we want to.

Agreed "start-align" for prefix regardless of alignment. "end-align" for suffix as a default makes sense to me and "start-align" if input alignment is sent to end.

@geospatialem geospatialem added the Application Prototype Lab - APL Issues logged by Application Prototype Lab - APL team members. label Aug 13, 2024
@ashetland ashetland added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Oct 10, 2024
Copy link
Contributor

Installed and assigned for verification.

@DitwanP
Copy link
Contributor

DitwanP commented Oct 10, 2024

Was moved to 3 - installed during design triage in order to verify that this is resolved by #8154. Could also be closed since it looks to essentially be the same thing @geospatialem thoughts?

@geospatialem
Copy link
Member

@DitwanP SGTM! 🚀

@DitwanP
Copy link
Contributor

DitwanP commented Oct 25, 2024

Closing this issue out because it has been addressed in #8154

@DitwanP DitwanP closed this as completed Oct 25, 2024
@DitwanP DitwanP reopened this Oct 25, 2024
@DitwanP DitwanP closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2024
@DitwanP DitwanP removed the 3 - installed Issues that have been merged to master branch and are ready for final confirmation. label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Application Prototype Lab - APL Issues logged by Application Prototype Lab - APL team members. Calcite (design) Issues logged by Calcite designers. calcite-components Issues specific to the @esri/calcite-components package. design Issues that need design consultation prior to development. design-tokens Issues requiring design tokens. enhancement Issues tied to a new feature or request. estimate - 2 Small fix or update, may require updates to tests. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive p - low Issue is non core or affecting less that 10% of people using the library
Projects
None yet
Development

No branches or pull requests

5 participants