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

Improve <calcite-input> suffixes and prefixes #8154

Closed
2 of 5 tasks
hcampos-professional opened this issue Nov 9, 2023 · 17 comments
Closed
2 of 5 tasks

Improve <calcite-input> suffixes and prefixes #8154

hcampos-professional opened this issue Nov 9, 2023 · 17 comments
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Maps SDK for JavaScript Issues logged by ArcGIS SDK for JavaScript team members. ArcGIS Urban Issues logged by ArcGIS Urban team members. calcite-components Issues specific to the @esri/calcite-components package. design Issues that need design consultation prior to development. enhancement Issues tied to a new feature or request. estimate - design - md Medium design effort; 5-10 days of design work estimate - 3 A day or two of work, likely requires updates to tests. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - medium Issue is non core or affecting less that 60% of people using the library ready for dev Issues ready for development implementation.

Comments

@hcampos-professional
Copy link

Check existing issues

Description

When using a <calcite-input> or <calcite-input-number> with a prefix-text or suffix-text, users are finding it difficult to understand that the suffix and prefix are not clickable. Matters complicate further if the clearable property/attribute is set, since the button looks so similar to the suffix and prefix:

CleanShot 2023-11-09 at 16 33 22

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:

image

Acceptance Criteria

  • When prefix-text and/or suffix-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/calcite-components
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Maps SDK for JavaScript

@hcampos-professional hcampos-professional added 0 - new New issues that need assignment. enhancement Issues tied to a new feature or request. needs triage Planning workflow - pending design/dev review. labels Nov 9, 2023
@github-actions github-actions bot added calcite-components Issues specific to the @esri/calcite-components package. p3 - want for upcoming milestone ArcGIS Maps SDK for JavaScript Issues logged by ArcGIS SDK for JavaScript team members. labels Nov 9, 2023
@macandcheese
Copy link
Contributor

macandcheese commented Nov 9, 2023

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 ?

@ashetland ashetland added the design Issues that need design consultation prior to development. label Nov 9, 2023
@Anastasiia-Boleiko
Copy link

The proposal looks great, +1 from the ArcGIS Urban team.
The current number input with a unit looks like:
input with unit
In our case it's fine if a unit is close enough to the input value.

@eriklharper eriklharper changed the title Improve <calicte-input> suffixes and prefixes Improve <calcite-input> suffixes and prefixes Nov 9, 2023
@macandcheese
Copy link
Contributor

macandcheese commented Nov 10, 2023

The proposal looks great, +1 from the ArcGIS Urban team. The current number input with a unit looks like: input with unit In our case it's fine if a unit is close enough to the input value.

I think a persistent "trailing suffix" like shown here (but visible during entry) could be nice to explore.

@brittneytewks brittneytewks added p - medium Issue is non core or affecting less that 60% of people using the library estimate - design - md Medium design effort; 5-10 days of design work labels Nov 16, 2023
@brittneytewks brittneytewks added this to the Design Backlog milestone Nov 16, 2023
@brittneytewks brittneytewks removed the needs triage Planning workflow - pending design/dev review. label Nov 16, 2023
@Anastasiia-Boleiko
Copy link

The current number input with a unit looks like: input with unit
In our case it's fine if a unit is close enough to the input value.

I think a persistent "trailing suffix" like shown here (but visible during entry) could be nice to explore.

Hi there! 👋

Could you please clarify when we can expect the input component such an update? It's important for ArcGIS Urban app for proper planning and prioritization.

@geospatialem geospatialem added the ArcGIS Urban Issues logged by ArcGIS Urban team members. label Dec 6, 2023
@geospatialem
Copy link
Member

Hi there! 👋

Could you please clarify when we can expect the input component such an update? It's important for ArcGIS Urban app for proper planning and prioritization.

@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.

@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Dec 28, 2023
@SkyeSeitz SkyeSeitz added the ready for dev Issues ready for development implementation. label Feb 28, 2024
@github-actions github-actions bot added 0 - new New issues that need assignment. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Feb 28, 2024
Copy link
Contributor

cc @geospatialem, @brittneytewks

@aPreciado88 aPreciado88 added the 1 - assigned Issues that are assigned to a sprint and a team member. label Aug 13, 2024
@hcampos-professional
Copy link
Author

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 action slot of the <calcite-input>, except that slot is currently meant for a <calcite-button> and not a <calcite-select> or <calcite-dropdown>: https://codepen.io/hccampos/pen/mdZXXbP?editors=1000

@aPreciado88 aPreciado88 added 2 - in development Issues that are actively being worked on. 0 - new New issues that need assignment. and removed 1 - assigned Issues that are assigned to a sprint and a team member. 2 - in development Issues that are actively being worked on. labels Aug 19, 2024
@aPreciado88 aPreciado88 removed this from the 2024-08-27 - Aug Release milestone Aug 23, 2024
@aPreciado88 aPreciado88 removed their assignment Aug 23, 2024
@geospatialem geospatialem added the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Aug 28, 2024
@aPreciado88 aPreciado88 self-assigned this Aug 29, 2024
@aPreciado88 aPreciado88 added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Aug 29, 2024
@aPreciado88 aPreciado88 added 2 - in development Issues that are actively being worked on. estimate - 3 A day or two of work, likely requires updates to tests. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Aug 30, 2024
@geospatialem geospatialem removed the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Sep 6, 2024
aPreciado88 added a commit that referenced this issue Sep 12, 2024
…s tokens (#10206)

**Related Issue:**
[#8154](#8154)

## Summary

Add `--calcite-input-prefix-size` and `--calcite-input-suffix-size` css
tokens to allow users to set custom `prefix` and `suffix` widths.
@aPreciado88 aPreciado88 added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Sep 12, 2024
@github-actions github-actions bot assigned geospatialem and DitwanP and unassigned aPreciado88 Sep 12, 2024
Copy link
Contributor

Installed and assigned for verification.

@DitwanP
Copy link
Contributor

DitwanP commented Sep 12, 2024

🍡 Verified on 2.13.0-next.9
https://codepen.io/Ditwan-Price/pen/abgxyNW?editors=1100

@DitwanP DitwanP closed this as completed Sep 12, 2024
@DitwanP DitwanP added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Maps SDK for JavaScript Issues logged by ArcGIS SDK for JavaScript team members. ArcGIS Urban Issues logged by ArcGIS Urban team members. calcite-components Issues specific to the @esri/calcite-components package. design Issues that need design consultation prior to development. enhancement Issues tied to a new feature or request. estimate - design - md Medium design effort; 5-10 days of design work estimate - 3 A day or two of work, likely requires updates to tests. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - medium Issue is non core or affecting less that 60% of people using the library ready for dev Issues ready for development implementation.
Projects
None yet
Development

No branches or pull requests

9 participants