HomePhabricator
Diffusion Comm b5028ffcf7ee

[web] Add drawer item implementations

Description

[web] Add drawer item implementations

Summary:
Linear issue: https://linear.app/comm/issue/ENG-2631/drawer-sidebar-inside-of-community-picker
Adding drawer item implementations on native: D5721
There are two types of drawer items - [community] and [a thread in a community]. They behave almost the same, but there is a difference when their expand buttons are toggled: only one community can
be open, so opening a community sometimes has to trigger closing another. On the other hand multiple level 1 and level 2 threads can be open at once.
The information about which community is open is thus held by a parent component, and a community is passed an expanded flag and a setExpanded function allowing it to change its parents state.
This is why I created CommunityDrawerItemCommunity and CommunityDrawerItemChat components.

Test Plan:
Added community drawer item to ChatThreadListItem, checked that pressinng it navigates to the corresponding thread, and pressinng its subchannels button navigates to the corresponding subchannels
modal.

Reviewers: przemek, michal, ginsu, tomek

Reviewed By: tomek

Subscribers: ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D6160

Details

Provenance
InkaSokolowskaAuthored on Feb 14 2023, 12:16 AM
Reviewer
tomek
Differential Revision
D6160: [web] Add drawer item implementations
Parents
rCOMMfee7aa83830a: [web] Add subchannels button
Branches
Unknown
Tags
Unknown