Closed jgibson02 closed 3 months ago
This would probably be best implemented as a content-end
slot alongside a description string prop.
We should also have the ability to provide a value to be displayed in the input when the combobox is closed. In this spatial reference case, it could display the WKID or some other shorter representation of the spatial reference.
In our case, we bumped into this while working on a Timezone picker where we have a long name with the IANA code and the UTC offset, but we don't want to display all that information in the input itself, since it would make the input too large.
Designs for a description
prop and a content-end
slot are ready to go in this Figma file. Also outlined is a proposed value-short
prop to address the needs in this comment. cc @jcfranco
cc @geospatialem, @brittneytewks
A round of feedback has resulted in some fine-tuning to do on the abbreviated value prop and its behaviors.
Revised designs and full context with related issues in epic #6720 are available in this Figma file.
Designs include:
description
propcontent-end
slotPossible names:
text-label-short
text-label-abbreviation
text-label-abbreviated
text-label-abbr
Notes for docs:
cc @jcfranco @SkyeSeitz @macandcheese
cc @geospatialem, @brittneytewks
Although text-label-short
is less characters (always a plus), its role may be a bit ambiguous? text-label-abbreviated
or text-label-abbreviation
comes with perhaps more clarity, imo.
Although
text-label-short
is less characters (always a plus), its role may be a bit ambiguous?text-label-abbreviated
ortext-label-abbreviation
comes with perhaps more clarity, imo.
Added a couple more options to the list above.
Installed and assigned for verification.
🍡 Verified on 2.11.0-next.12
Reopening issue to correct a couple small misses during design review. Design spec has been updated. cc @jcfranco
Installed and assigned for verification.
🍡 Verified on 2.11.0-next.21
Description
Provide a subtitle/description prop for displaying a secondary label on a combobox-item
Acceptance Criteria
Relevant Info
Which Component
combobox-item
Example Use Case
In ArcGIS Velocity, we have a spatial reference selector which has ~9000 items, and users often are familiar with choosing a spatial reference by either the text label (e.g. "GCS WGS 1984") or by its numeric WKID (e.g. "4326"), so we used the
subtitle
prop that calcite-reactMenuItem
s provide to display the numeric WKID on the menuitem, and filtering automatically filters against that subtitle as well.Due to a bug in calcite-react where scrolling while using the
appendToBody
andvirtualized
props together will cause the dropdown to close, we are looking to switch to using calcite-components combobox instead, but not having this subtitle is a serious UX drawback.