Linear issue: https://linear.app/comm/issue/ENG-2284/add-links-to-subchannels-in-level-2-chats
drawer items at level 2 are not supposed to expand further, but if they do have subchannels, expanding them should reveal a button that allows to navigate to a modal, displaying the subchannels.
Details
Ran ios simulator, checked that buttons are present where they should be present and that they navigate to the modal.
Diff Detail
- Repository
- rCOMM Comm
- Branch
- inka/community_drawer
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
native/navigation/community-drawer-content.react.js | ||
---|---|---|
102–121 | CommunityDrawerItems receive data based upon which they render. This data is prepared for them here, in the CommunityDrawerContent component, so that each item doesn't need to worry about which level its on etc.
So since an item doesn't know what level it is on, this information is looked at here, and the showSubchannelsButton flag is set. |
native/navigation/community-drawer-content.react.js | ||
---|---|---|
46 | It's better to make this name describe a state. Currently it might be confused with an action. | |
115 | Shouldn't we check if these are channels like in D5951? Could you test a case where a channel on lvl + 1 === MAX_DEPTH has some sidebars and doesn't have any channels? |
native/navigation/community-drawer-content.react.js | ||
---|---|---|
115 | Right, this code is incorrect. |
Change showSubchannelsButton to hasSubchannelsButton, fix condition for displaying subchannels button
native/navigation/community-drawer-content.react.js | ||
---|---|---|
133–136 ↗ | (On Diff #20215) | This can be simplified by using array.some |