Options can say why they are disabled

Cerrado
#106 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@agatha197 ya está trabajando en esto.

Desde el 27/10/2026.

  • #107 de @agatha197 — abierto

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
typescript
Área
frontend

Línea de trabajo

Start with the Selector, MultiSelector, and PagedSelector option types and row rendering; the proposal names the disabled fields and where the reason glyph should appear. Check how each component handles disabled options and tooltips, then add the reason display while preserving boolean disabled behavior and row height. Done when all three components expose the proposed reason tooltip accessibly; linked PR #107 is already open.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Summary

A disabled option in Selector, MultiSelector or PagedSelector is dimmed and cannot be picked, but nothing says why. Products work around it per call site: Backend.AI WebUI wraps each disabled row in its own Tooltip (which a disabled Astryx Selector item never shows, since it sets pointer-events: none), or adds a parallel disabledReason field, and most call sites end up showing nothing.

Proposal

  • An option's disabled flag also takes { reason: string }: disabled?: boolean | { reason: string } on Selector / MultiSelector option data, isDisabled?: boolean | { reason: string } on PagedSelectorOption. The object form disables the option and says why; a bare true still disables it silently. One field keeps "a reason but enabled" unrepresentable, which a parallel disabledMessage would not.
  • The component draws a small glyph at the end of the disabled row whose tooltip carries the reason. The row keeps its height, so many options disabled for one reason do not lengthen the list, and the reason is the glyph's accessible name.
    • PagedSelector: before the row's endContent.
    • Selector / MultiSelector (the Form.Item wrappers): after the caller's renderOption or the default row. Astryx still receives a boolean disabled.

Origin

backend.ai-webui#10493 (PR backend.ai-webui#10496) built this as a BUI-side BAIDisabledOptionReason; it is product-neutral, so it belongs here.

Lenguaje dominante
TypeScript
Estrellas
2
Forks
0
Merge medio
1 d 13 h
PR fusionados (30 d)
35

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de lablup/ui-common

Todos los issues de lablup/ui-common

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.