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
Unknown Object (File)
Fri, Dec 6, 9:42 PM
Unknown Object (File)
Fri, Dec 6, 9:42 PM
Unknown Object (File)
Wed, Dec 4, 1:31 AM
Unknown Object (File)
Nov 2 2024, 6:37 AM
Unknown Object (File)
Nov 2 2024, 6:37 AM
Unknown Object (File)
Nov 2 2024, 6:37 AM
Unknown Object (File)
Nov 2 2024, 6:37 AM
Unknown Object (File)
Nov 2 2024, 6:37 AM

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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek added inline comments.
web/chat/thread-menu.react.js
65–68 ↗(On Diff #9600)

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 ↗(On Diff #9600)

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