Replace `UserAction::getSearchResultList()` with an RPC endpoint and modernize the user search JS
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript, php, typescript
調査の方向性
Start by reading UserAction::getSearchResultList() and validateGetSearchResultList(), then trace the listed consumers in ts/WoltLabSuite/Core/Ui/User/Search/Input.ts, ts/WoltLabSuite/Core/Ui/ItemList/User.ts, and the ACL and user form templates. Compare the existing GetMentionSuggestions endpoint and its TypeScript wrapper for the proposed RPC shape. Done means consumers use the new endpoint, deprecated wrappers preserve the listed compatibility behavior, and the legacy WCF.Search.User code is removed while UserAction remains for BC.
索引モデルが issue の本文から書いたものです。
説明
UserAction is deprecated. The only part still actively used is getSearchResultList() / validateGetSearchResultList().
JS consumers
- ts/WoltLabSuite/Core/Ui/User/Search/Input.ts (UiUserSearchInput, a subclass of Ui/Search/Input)
- ts/WoltLabSuite/Core/Ui/Acl/Simple.ts (shared_aclSimple.tpl): users + groups, excluded values
- ts/WoltLabSuite/Core/Ui/Acl/List.ts (shared_aclPermissionJavaScript.tpl, Form/Builder/Field/Acl.ts): users ± groups
- ts/WoltLabSuite/Core/Ui/ItemList/User.ts (init()/getValues() on top of Ui/ItemList)
- shared_userFormField.tpl (UserFormField)
- search.tpl (author filter of the extended search)
- also used by third-party packages, e.g. to select conversation participants
- WCF.Search.User in wcfsetup/install/files/js/WCF.js (deprecated since 3.0, jQuery-based)
Already modernized
Mentions no longer use this action. The editor uses GET /core/messages/mention-suggestions (GetMentionSuggestions, Api/Messages/MentionSuggestions). That leaves the scope=mention branch in getSearchResultList() without a caller in core.
Proposal
- New RPC endpoint, e.g. GET /core/users/search (name TBD), with a typed parameter class:
- query (non-empty, prefix match)
- includeGroups: bool
- restrictGroupIDs: int[]
- excludedUsernames/excludedGroupIDs, or have the client filter the results instead (see open questions)
It returns structured data (type, userID/groupID, name, avatarTag for users), following GetMentionSuggestions, instead of a generic label + HTML icon. Add a matching ts/WoltLabSuite/Core/Api/Users/… wrapper.
- Modernize the JS:
- Build a replacement for Ui/User/Search/Input and Ui/ItemList/User on top of the new endpoint, possibly as a Component/User/… module.
- Migrate Ui/Acl/Simple, Ui/Acl/List, shared_userFormField.tpl and search.tpl.
- Keep Ui/ItemList/User and Ui/User/Search/Input as thin deprecated wrappers backed by the endpoint, so that third-party code keeps working, including getValues() and the csvPerType / …GroupIDs shadow input.
- Deprecate/remove legacy code:
- Remove WCF.Search.User (deprecated since 3.0).
- Leave UserAction::getSearchResultList() in place for BC for now and remove it together with UserAction. Drop ISearchAction from UserAction and the scope=mention handling.
- 主要言語
- PHP
- スター
- 248
- フォーク
- 147
- 平均マージ
- 17分
- マージ済み PR(30日)
- 21
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
WoltLab/WCF のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
WoltLab/WCF#6771 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
HE-Arc/le-panier-du-coin#49 ·
メンテナーはふだん 1 日以内に返信
-
15.0
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
bug: juros do parcelamento travados em 1x no gateway Rede Débito e Crédito 3DS (woo-rede 5.6.0)オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
LinkNacional/woo-rede#367 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Lazyload SVG placeholder runs uncached attachment lookups with JSON-escaped URLs on REST responsesオープンcustomer report
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Codeinwp/optimole-wp#1253 ·
メンテナーはふだん 1 日以内に返信