Introduce component grouping users and rendering list based on search results in AddMembersModal.
I used common logic with native app, where only users from parent thread have "notice" set to "undefined". It's the reason, why after grouping the title: "Users in parent thread" is added manually.
Details
Details
The list can be tested after introducing AddMembersModal
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
web/modals/threads/members/add-members-list.react.js | ||
---|---|---|
20–21 ↗ | (On Diff #11511) | We don't memoize these so all the following memoizations will recompute after each render. |
37–45 ↗ | (On Diff #11511) | I think this code might become more readable when:
_toPairs(groupedAvailableUsersList) .filter(group => group[0] !== 'undefined') .sort((a, b) => a[0].localeCompare(b[0]))
|
Comment Actions
Adding @ashoat as this diff affects the copy presented to users.
web/modals/threads/members/add-members-list.react.js | ||
---|---|---|
13 ↗ | (On Diff #11778) | |
21 ↗ | (On Diff #11778) | Shouldn't we use alertText? |
32 ↗ | (On Diff #11778) | Just wondering, maybe we can change the logic a bit and replace undefined by something defined, so that it's more maintainable? |
web/modals/threads/members/add-members-list.react.js | ||
---|---|---|
13 ↗ | (On Diff #11778) | Can probably use $ReadOnlySet<string> here instead? |