Skip action checks for closed More actions menus

Abierto
#1,227 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
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
50/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
react, typescript
Área
frontend

Línea de trabajo

Start in packages/editor/src/toolbar/hooks.ts around lines 57-89 to see how the toolbar update subscribes to isActive and isEnable, then read packages/editor/src/toolbar/ToolbarListButton.tsx lines 59-79 to confirm the closed button uses alwaysActive. Trace the More actions menu state and add counters in the toolbar tests to prove the closed menu stops checking actions and refreshes from current editor state when opened. Done means the subscription pauses while closed, resumes while open, and tests cover reopening after selection changes, undo/redo, resizing, preset replacement, and mode switching without breaking disabled hints, command execution, or nested popups.

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

Descripción

In both WYSIWYG and markup modes, the closed More actions menu evaluates isActive and isEnable for every entry on each toolbar update, including typing and cursor movement (subscription). Its button uses alwaysActive, so these results do not affect the closed button's appearance or availability (button state). Narrow editors move more actions into this menu and increase the unnecessary work.

As a small follow-up to #1226 and #1224, pause this menu's action-state subscription while closed and refresh from the current editor state before showing it. Keep live updates while open; ordinary dropdowns still need updates while closed to reflect their active and disabled state.

  • Verify with call counters that the closed menu stops checking actions and resumes when opened.
  • Cover reopening after selection changes and undo/redo, resizing, preset replacement, and switching modes.
  • Preserve disabled hints, command execution, and nested popups.
Lenguaje dominante
TypeScript
Estrellas
428
Forks
48
Merge medio
5 d 15 h
PR fusionados (30 d)
47

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 gravity-ui/markdown-editor

Todos los issues de gravity-ui/markdown-editor

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.