[web] Switch tab when opening sidebars
Summary:
When sidebar is a child of thread from chat list, we need to switch tab if the other one is active. When sidebar is a child of non-member thread, we will add parent to currently opened tab
Before reviewing this diff, please review D1035, in which activeTab control logic is moved from ChatTabs to Provider. This diff handles only switch tab support for sidebars.
Test Plan:
Tested if switching tabs for threads works as before, tested sidebars and various scenarios:
- member thread, sidebar member
- member thread, sidebar non-member
- non-member thread, sidebar member
- non-member thread, sidebar non-member
with different
Reviewers: palys-swm, ashoat
Reviewed By: palys-swm, ashoat
Subscribers: ashoat, zrebcu411, palys-swm, Adrian, atul, subnub
Differential Revision: https://phabricator.ashoat.com/D975