[2.x] Dropdown toggle keeps a stale copy of the active item's label
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript
- Área
- frontend
Línea de trabajo
The bug is in the profile navigation dropdown, which reuses the active item's child vnodes for both its toggle button and its menu, so only one copy updates. Pull request #5562 is already open against this issue, so review and test that change rather than starting a parallel fix. Done means the toggle shows the same badge count as the menu after a Mentions count changes, without a reload, at a 390x844 viewport.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Current Behavior
The dropdown used for a profile's navigation on narrow screens takes the active item's label for its own toggle button, and renders the item's children in both the menu and the toggle. A Mithril vnode can only live in one place, so only one of the two copies is updated when the label changes. On a phone, with the Mentions tab, the badge in the open menu updates after a post is edited, but the toggle above it keeps the previous number until the page is reloaded.
Steps to Reproduce
- Open a user's profile on a phone-width viewport (Chromium at 390x844 reproduces it).
- Go to the Mentions tab with a non-zero badge.
- Edit a post so the count changes, for example remove its mention of that user.
- The menu badge updates, the toggle above it still shows the old number.
- Reload the page: both show the new number.
Expected Behavior
The toggle and the menu show the same label, without a reload.
Environment
- Flarum version: 2.x (dev)
- Website URL: local dev forum
- Webserver: nginx
- Hosting environment: local
- PHP version: 8.5
- Database: PostgreSQL 18
- Browser: Chromium (headless, 390x844)
Possible Solution
Render the toggle's copy of the label as text rather than reusing the item's vnodes. I have a pull request for that.
- Lenguaje dominante
- PHP
- Estrellas
- 6.8k
- Forks
- 891
- Merge medio
- 1 d 10 h
- PR fusionados (30 d)
- 209
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 flarum/framework
-
type/accessibility type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Default language is ignored for anyone who chose a language, when the language selector is hiddenPosiblemente ocupada @1AbdullahButt la tomó hace 15 días. Abiertotype/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
[2.x] False CLI/Web PHP mismatch when /usr/bin/php differs from the site's FPMPosiblemente ocupada @lazerg la tomó hace 15 días. Abiertotype/bug
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
-
[2.x] A filter on a resource without a searcher returns a 500Posiblemente ocupada @imorland la tomó hoy. Abiertotype/bug
flarum/framework#5578 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de flarum/framework
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 87/100
Sylius/Sylius#19359 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Add php 8.6Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 66/100
mailersend/mailersend-php#199 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Tool: somcp_delete_currencyAbiertoConfiguration new tool
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
novalo-dev/Prestashop-MCP-Server#366 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 10 días