Modernize the dropdown implementation (`Ui/Dropdown/Simple`)

Abierto
#6,768 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
15/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
css, javascript
Área
frontend

Línea de trabajo

This is a design proposal, not a single task. Start with the existing Ui/Dropdown/Simple module and its dependencies named in the issue, Ui/Alignment and UiCloseOverlay, to see how the current dropdowns open, position and close. Done would mean agreeing on the target design (Popover API, anchor positioning, instance-based options, ARIA semantics) with maintainers, then splitting it into smaller issues. A newcomer would be better off picking one of those smaller pieces.

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

Descripción

Rebuild dropdowns on native platform features and keep a compatibility layer for existing markup and API consumers.

  1. Popover API (popover="auto"): native top layer, light dismiss, Escape handling, and only one open popover at a time. This removes the global menu container, the z-index workarounds and most of the UiCloseOverlay integration.
  2. CSS anchor positioning (anchor-name, position-anchor, position-try-fallbacks): the browser handles placement and flipping. This replaces the scroll/resize/dialog-scroll recalculation and probably the iOS virtual-keyboard hack. Fall back to Ui/Alignment where it isn't supported.
  3. Instance-based implementation: one object per dropdown that owns its toggle, menu, options and callbacks. Typed options replace the data-* flags, which stay readable only for BC.
  4. Correct semantics by content type:
  • Action menus use menu/menuitem on the interactive elements, with roving tabindex, Arrow/Home/End navigation, and Space and Enter working.
  • Other content follows the disclosure pattern (aria-expanded + aria-controls) with normal tab order and no forced roles.
  1. Toggle markup: require toggles in new code and stop patching roles onto arbitrary elements.
  2. CSS fixes: overscroll-behavior: contain replaces the wheel handler, and scrollIntoView({ block: "nearest" }) replaces the manual scroll-to-active math.
Lenguaje dominante
PHP
Estrellas
248
Forks
147
Merge medio
17 min
PR fusionados (30 d)
21

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 WoltLab/WCF

Todos los issues de WoltLab/WCF

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.