-
Notifications
You must be signed in to change notification settings - Fork 77
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
Improve <calcite-input> suffixes and prefixes #8154
Comments
We may need to explore ways of making the prefix visually distinct from the input content. Suffix doesn’t suffer from the same issue in default alignment but will if alignment is set to end. It may still be nice to offer way to set the width of these via css property to ensure consistent widths, either when prefix/suffix or both are used. You might still end up with the “width stagger” depending on set up. Could you add some mockups of these other states to add to the proposed design, and possibly some explorations of focus area? Would clicks on the inert suffix / prefix focus the input ? |
@Anastasiia-Boleiko Thanks for reaching out, relayed on your note to the design team. Designers will be prioritizing efforts for a future milestone late next week (dev work would be in a separate milestone). Stay tuned for additional updates in the future. |
Another related pattern that appeared in some internal proposals is to have the suffix be a "dropdown" (or at least clickable) to allow users to select units, for example. If the suffix needs to be clickable or an actual select/dropdown, it may speak in favor of the current design where it already looks clickable. That being said, the UI could be achievable by using the |
Installed and assigned for verification. |
🍡 Verified on |
Check existing issues
Description
When using a
<calcite-input>
or<calcite-input-number>
with aprefix-text
orsuffix-text
, users are finding it difficult to understand that the suffix and prefix are not clickable. Matters complicate further if theclearable
property/attribute is set, since the button looks so similar to the suffix and prefix:Another issue is that, when multiple inputs are placed next to each other, the suffixes and prefixes won't necessarily have the same with, which doesn't look great.
After some internal discussions, a proposal was floated: placing the suffix and/or prefix inside of the input itself. Here is a mockup of the proposal:
Acceptance Criteria
prefix-text
and/orsuffix-text
are specified, they should appear inside of the input instead of inside a bordered container.Relevant Info
No response
Which Component
<calcite-input>
<calcite-input-*>
Example Use Case
The use case we're exploring at the moment is displaying multiple numerical values of a tool stacked vertically, each value with its unit displayed as a
suffix-text
. In this scenario, having all the suffixes with different widths and having the units appear clickable is not desirable.Priority impact
p3 - want for upcoming milestone
Calcite package
Esri team
ArcGIS Maps SDK for JavaScript
The text was updated successfully, but these errors were encountered: