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

Combobox, truncate long single-select values #7923

Closed
2 of 4 tasks
Tracked by #6661
ashetland opened this issue Oct 2, 2023 · 6 comments
Closed
2 of 4 tasks
Tracked by #6661

Combobox, truncate long single-select values #7923

ashetland opened this issue Oct 2, 2023 · 6 comments
Assignees
Labels
2 - in development Issues that are actively being worked on. c-combobox Issues that pertain to the calcite-combobox and related components 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. enhancement Issues tied to a new feature or request. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive ready for dev Issues ready for development implementation.

Comments

@ashetland
Copy link
Contributor

ashetland commented Oct 2, 2023

Check existing issues

Description

When in selection-mode="single" Combobox should truncate long values. This would also help Calcite Input Time Zone where the item labels can be quite long.

Truncated long values should use title attribute to display the full text. This would leave calcite-tooltip available for additional context and configurations.

Acceptance Criteria

See Figma file. Values populated by long item labels are truncated based on available width inside the input field.

Relevant Info

cc @jcfranco

Which Component

Combobox, Calcite Input Time Zone

Example Use Case

No response

Priority impact

p4 - not time sensitive

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-react
  • @esri/eslint-plugin-calcite-components

Esri team

Calcite (design)

@ashetland ashetland 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. c-combobox Issues that pertain to the calcite-combobox and related components labels Oct 2, 2023
@github-actions github-actions bot added impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive Calcite (design) Issues logged by Calcite designers. calcite-components Issues specific to the @esri/calcite-components package. labels Oct 2, 2023
@ashetland ashetland added design Issues that need design consultation prior to development. ready for dev Issues ready for development implementation. and removed Calcite (design) Issues logged by Calcite designers. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive calcite-components Issues specific to the @esri/calcite-components package. labels Oct 2, 2023
@github-actions github-actions bot added the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Oct 2, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2023

cc @geospatialem, @brittneytewks

@geospatialem geospatialem added this to the 2024 April Priorities milestone Nov 22, 2023
@geospatialem geospatialem removed needs triage Planning workflow - pending design/dev review. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. labels Nov 22, 2023
@Elijbet Elijbet self-assigned this Mar 27, 2024
@Elijbet Elijbet added 1 - assigned Issues that are assigned to a sprint and a team member. 2 - in development Issues that are actively being worked on. and removed 0 - new New issues that need assignment. 1 - assigned Issues that are assigned to a sprint and a team member. labels Mar 27, 2024
@github-actions github-actions bot added calcite-components Issues specific to the @esri/calcite-components package. Calcite (design) Issues logged by Calcite designers. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive labels Mar 27, 2024
@eriklharper
Copy link
Contributor

Truncated long values should use html label to display the full text. This would leave calcite-tooltip available for additional context and configurations.

Curious about the "why" behind this? <label>s are normally used to give names to form fields, not be used for arbitrary pieces of text, in this case being the name of the selected item inside a combobox.

@eriklharper
Copy link
Contributor

Also, I left a note in the Figma file, but the linked Codepen is using a very old version of Calcite (1.8.0). As of the current version (2.7 at the time of writing this) truncation is present since this was added as part of the new selection-display property introduced in 1.11: #7912

@ashetland
Copy link
Contributor Author

Truncated long values should use html label to display the full text. This would leave calcite-tooltip available for additional context and configurations.

Curious about the "why" behind this? <label>s are normally used to give names to form fields, not be used for arbitrary pieces of text, in this case being the name of the selected item inside a combobox.

Womp womp, updated this to title attribute

@ashetland
Copy link
Contributor Author

Also, I left a note in the Figma file, but the linked Codepen is using a very old version of Calcite (1.8.0). As of the current version (2.7 at the time of writing this) truncation is present since this was added as part of the new selection-display property introduced in 1.11: #7912

Yep, the only thing left is the title attribute

@ashetland
Copy link
Contributor Author

Text truncation is currently working as of v2.7.1. Using the title attribute was added to this issue after it was opened, but we're going to hold off on that for the time being for the following reasons:

  1. This is currently mitigated by opening the Combobox dropdown to reveal the full text of the selected item
  2. We'd like to take a more holistic look at a system-wide configurable text-overflow behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - in development Issues that are actively being worked on. c-combobox Issues that pertain to the calcite-combobox and related components 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. enhancement Issues tied to a new feature or request. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive ready for dev Issues ready for development implementation.
Projects
None yet
Development

No branches or pull requests

4 participants