Page MenuHomePhabricator

[web] Introduce `Members` and `Sidebars` thread menu actions
ClosedPublic

Authored by jacek on Feb 14 2022, 3:41 AM.
Tags
None
Referenced Files
F3537062: D3190.id9618.diff
Wed, Dec 25, 8:04 PM
F3537054: D3190.id9987.diff
Wed, Dec 25, 8:02 PM
F3536998: D3190.id9600.diff
Wed, Dec 25, 7:45 PM
F3536920: D3190.id9716.diff
Wed, Dec 25, 7:30 PM
F3536762: D3190.id9724.diff
Wed, Dec 25, 6:55 PM
Unknown Object (File)
Wed, Dec 25, 7:48 AM
Unknown Object (File)
Fri, Dec 6, 9:42 PM
Unknown Object (File)
Fri, Dec 6, 9:42 PM

Details

Summary

Added Members and Sidebars menu items, that are displayed conditionally.
The onClick functionality will be added in one of next diffs.

Screenshot_Google Chrome_2022-02-14_122438.png (1×880 px, 89 KB)

Test Plan

Checked if Sidebar item appears correclty after adding sidebars to thread, and if Memberes is not displayed in Personal threads.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek added inline comments.
web/chat/thread-menu.react.js
65–68

This is correct, but we can consider avoiding repetition here by defining items outside the memo.

The proposed approach has an unexpected usage of dependency array, which is defined earlier, so it might be confusing... not sure if it's worth it.

This revision is now accepted and ready to land.Feb 14 2022, 4:30 AM
This revision now requires review to proceed.Feb 14 2022, 4:30 AM
web/chat/thread-menu.react.js
65–68

After reading D3192 (see a comment there) it looks like we shouldn't follow my advice - let's keep it as it is

excluded hasSidebars into separate useMemo for better performance.

ashoat requested changes to this revision.Feb 14 2022, 9:19 PM
ashoat added inline comments.
web/chat/thread-menu.react.js
41–43 ↗(On Diff #9618)

This should be defined closer to where it's used

52–58 ↗(On Diff #9618)

See comments in D3191

This revision now requires changes to proceed.Feb 14 2022, 9:19 PM

Rebase & moved childThreads closer to where it is used.

Simplified logic using some instead of filter

This revision is now accepted and ready to land.Feb 21 2022, 10:46 PM