Added Subchannels list and create options. It appears depending on user permissions - in the same way as in native.
The onClick functionality will be added in a separate diff.
Details
Tested if items appears if user has proper permissions in thread.
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
web/chat/thread-menu.react.js | ||
---|---|---|
76–93 ↗ | (On Diff #9601) | We could compute this value outside of this memo and call it e.g. hasSubchannels (it will be another memo). The same can be applied for sidebarItem / hasSidebars. The benefit is that we decide if we need to render based on a fact that a threads has or hasn't subchannels, and we don't care which are these. So it doesn't make sense to rerender when a new subchannel appeared or when one of subchannels has changed. |
web/chat/thread-menu.react.js | ||
---|---|---|
76–93 ↗ | (On Diff #9601) | Thanks for the catch. I fixed it also for sidebars. |
web/chat/thread-menu.react.js | ||
---|---|---|
84 | Actually, threadIsTopLevel is wrong... Instead, we should factor out a function called threadIsChannel that is the same as threadIsTopLevel but doesn't check threadInChatList. And then have both threadIsTopLevel and this spot call our new function. The new function should be introduced in a new diff directly preceding this one. |
web/chat/thread-menu.react.js | ||
---|---|---|
84 | I used here exactly the same condition, that is currently in mobile app. |
That approach is totally fine, but you should not re-request review without FIRST doing one of the below:
- Creating a Linear task to track AND link it in the diff comment here, OR
- Creating a diff that resolves the concern AND link it in the diff comment here
Will let it slide this time, but please keep this in mind going forward, and do NOT land this without first addressing the above (link the follow-up!)
Note: you should've specified your dependency graph here by including "Depends on: D3190" in the diff description. Please keep this in mind – going forward, I'm going to start instantly requesting changes whenever I see diff dependencies not specified from anybody on the team. The goal is to move as much of the diff reviewers' work to the diff author as possible
I specify dependencies using "Edit related revisions" menu in right panel. Dependency graph is visible in "Stack" tab in "Revision Contents" panel. I think it works in the same way as adding "Depends on..." in description.
I specify dependencies using "Edit related revisions" menu in right panel. Dependency graph is visible in "Stack" tab in "Revision Contents" panel. I think it works in the same way as adding "Depends on..." in description.
Sorry, this was big oversight on my part. No idea what led to my confusion last night. Probably was just a lack of sleep... my bad!
Created a diff D3261, that follows your suggestion
Thank you!!