MultiSelector: add showTooltip to list the selected options on the trigger
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 70/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- frontend
Línea de trabajo
Start at the ui-common MultiSelector wrapper and inspect how it uses useMergedValue, resolves option labels, merges refs, and forwards onOpenChange; then check the existing Tooltip API. Add the opt-in trigger tooltip under the conditions in the proposal, and verify it lists all selected labels while staying closed for an open listbox, disabled state, and renderTrigger.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
When a MultiSelector trigger has more selections than it shows, the rest collapse into +N (after three labels in triggerDisplay="labels", after maxBadges badges in "badges"), and long labels are cut off by the ellipsis. The user cannot tell which options are selected without opening the listbox.
Astryx MultiSelector offers no hook for this: +N is fixed text, formatValue returns a string and is not called for "badges", and renderTrigger replaces the whole field. Consumers who wrap the selector in their own Tooltip have to track the selection, merge refs, and keep the tooltip shut while the listbox is open.
Proposal
Add an opt-in showTooltip?: boolean prop to ui-common MultiSelector. When it is set and at least one option is selected, a ui-common Tooltip anchored to the trigger (anchorRef) lists every selected label, comma-separated.
- The selection comes from the wrapper's existing
useMergedValue, so controlled and uncontrolled use both work. - Labels are resolved from
options(including section options), falling back to the value. - The consumer's
refis merged with the anchor ref. - The tooltip is held shut while the listbox is open (
onOpenChangeis still forwarded). - No tooltip when
disabled, so it does not compete with Astryx'sdisabledMessagetooltip, and none withrenderTrigger, whose control the caller owns.
The default stays off, so existing call sites are unchanged.
Context
lablup/backend.ai-webui#10955 built this inside a product wrapper; that PR is on hold until this lands, after which the wrapper goes back to a plain re-export (lablup/backend.ai-webui#10986).
- Lenguaje dominante
- TypeScript
- Estrellas
- 2
- Forks
- 0
- Merge medio
- 21 h 38 min
- PR fusionados (30 d)
- 38
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de lablup/ui-common
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
Todos los issues de lablup/ui-common
Issues similares
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 86/100
g1331/phantom-circuit#93 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
compiler
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
HerringtonDarkholme/hd-lang#1699 ·
Los mantenedores suelen responder en 1 día
-
account bug communication lecture
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día