[Bug]: File Gallery loses selected file-type filter when new messages arrive
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 84/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, react
- 領域
- frontend
調査の方向性
packages/react/src/views/MessageAggregators/FileGallery.jsから始め、メッセージが変わったときやgetAllFiles()がリストを更新するときにselectedFilterがどのように使われるかを追ってください。ファイルタイプが選択されている状態でメッセージリストが変わる場合の回帰テストを追加してください。新しいメッセージが届いた後も、ドロップダウンと表示されるファイルの状態が同期していれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
The File Gallery does not preserve the selected file-type filter when new messages arrive in the chat.
When the message list updates, FileGallery fetches all files without considering the currently selected filter. As a result, files of other types may appear while the dropdown continues to display the selected file type.
Steps to reproduce
- Open EmbeddedChat and navigate to a channel containing different types of file attachments.
- Open the Files sidebar.
- Select a specific file type, such as Images.
- Send or receive a new message in the channel.
- Observe the files displayed in the sidebar.
Expected behavior
The File Gallery should preserve the selected file-type filter when new messages arrive and display only files matching the selected type.
Actual behavior
Based on source code inspection, the file list is refreshed without applying the selected filter, potentially displaying files of all types.
Root cause
The useEffect in FileGallery.js calls getAllFiles() with an empty type filter whenever the messages array changes, regardless of the selectedFilter state.
Proposed solution
- Preserve the selected file-type filter during automatic refreshes.
- Keep the filter dropdown and displayed file list synchronized.
- Add regression tests to verify filter persistence.
Relevant file
packages/react/src/views/MessageAggregators/FileGallery.js
Additional context
I would like to work on this issue and submit a PR if the maintainers approve the proposed solution.
- 主要言語
- JavaScript
- スター
- 171
- フォーク
- 421
- 平均マージ
- 3日 6時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
RocketChat/EmbeddedChat のほかの issue
-
Bug: username fallback in updateUserUsername never runs since the ddp-client migration対応中かも @MuhammadFaizan-prog が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
RocketChat/EmbeddedChat#1489 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: Low contrast on color swatch borders in Theme Lab (Layout Editor)対応中かも @yashsarvaiya45 が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
RocketChat/EmbeddedChat#1486 ·
メンテナーはふだん 1 日以内に返信
-
bug(api): _doConnect swallows connection/auth errors and marks failed sessions as authenticated対応中かも @ashwanisingh011 が 1 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
RocketChat/EmbeddedChat#1484 ·
メンテナーはふだん 1 日以内に返信
-
Bug: White screen crash (`Cannot read properties of undefined (reading 'members')`) when rendering UserMention outside MarkupInteractionContext対応中かも @swarnendusahu10-dotcom が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
RocketChat/EmbeddedChat#1482 ·
メンテナーはふだん 1 日以内に返信
-
Bug: UIKit PreviewBlock cover image tiles repeatedly and stretches across viewport when zoomed out対応中かも @swarnendusahu10-dotcom が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
RocketChat/EmbeddedChat#1480 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
RocketChat/EmbeddedChat の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Life-Framework/Life-Framework#7017 ·
メンテナーはふだん 1 日以内に返信
-
e/DevOps enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
Accenture/sfmc-devtools#2795 ·
メンテナーはふだん 1 日以内に返信
-
agent/guide documentation help wanted stage/010-actionable
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
kubestellar/console-kb#4003 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
FilOzone/synapse-sdk#1201 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信