[2.x] Dropdown toggle keeps a stale copy of the active item's label
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 30/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript
- 領域
- frontend
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- PHP
- スター
- 6.8k
- フォーク
- 891
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 209
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
flarum/framework のほかの issue
-
type/accessibility type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
Default language is ignored for anyone who chose a language, when the language selector is hidden対応中かも @1AbdullahButt が 15 日前に担当しました。 オープンtype/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
[2.x] False CLI/Web PHP mismatch when /usr/bin/php differs from the site's FPM対応中かも @lazerg が 15 日前に担当しました。 オープンtype/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
[2.x] A filter on a resource without a searcher returns a 500対応中かも @imorland が今日担当しました。 オープンtype/bug
flarum/framework#5578 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
flarum/framework の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 87/100
Sylius/Sylius#19359 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Add php 8.6オープン
難易度 1/5 1時間未満 初心者へのやさしさ 66/100
mailersend/mailersend-php#199 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Configuration new tool
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
novalo-dev/Prestashop-MCP-Server#366 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 10 日以内に返信