[2.x] Dropdown toggle keeps a stale copy of the active item's label
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript
- Ambito
- frontend
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- PHP
- Stelle
- 6.8k
- Fork
- 891
- Merge medio
- 1g 10h
- PR unite (30g)
- 209
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di flarum/framework
-
type/accessibility type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Default language is ignored for anyone who chose a language, when the language selector is hiddenForse già presa @1AbdullahButt l’ha presa 15 giorni fa. Apertatype/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
[2.x] False CLI/Web PHP mismatch when /usr/bin/php differs from the site's FPMForse già presa @lazerg l’ha presa 15 giorni fa. Apertatype/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
[2.x] A filter on a resource without a searcher returns a 500Forse già presa @imorland l’ha presa oggi. Apertatype/bug
flarum/framework#5578 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di flarum/framework
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 87/100
Sylius/Sylius#19359 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Add php 8.6Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 66/100
mailersend/mailersend-php#199 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Tool: somcp_delete_currencyApertaConfiguration new tool
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
novalo-dev/Prestashop-MCP-Server#366 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 10 giorni