HomePhabricator
Diffusion Comm 6869874b526e

[web] Remove unused code

Description

[web] Remove unused code

Summary: The removed styles were being overwritten in all cases by components underneath, but caused problems for me when I was trying to add community drawer.

Test Plan:
Run web app, checked that removing these styles makes no difference in inbox and in settings.

  1. checked in all files that import left-layout-aside.css which of them use the container style, and container style from left-layout-aside.css is only used in left-layout-aside.js
  2. container style is used on the <aside> element, and the styles I removed concern its foreground objects and svgs, so I check its children:
  3. its children are CommunityPicker, SettingsSwitcher, AppSwitcher
  4. CommunityPicker: the outer div returned from community picker has a style that overrides svgs colours and padding. CommunityPicker has no other foreground objects than the two svgs: inbox and setting icons. So the styles I removed don’t concern CommunityPicker.
  5. SettingsSwitcher displays two items inside of the NavigationPanel. The active item gets colour from NavigationPanel. And the non-active tab gets its colour in SettingsSwitcher:

https://github.com/CommE2E/comm/blob/master/web/sidebar/settings-switcher.react.js#L26
https://github.com/CommE2E/comm/blob/master/web/sidebar/settings-switcher.react.js#L45
https://github.com/CommE2E/comm/blob/master/web/sidebar/left-layout-aside.css#L28

  1. AppSwitcher: displays three items, and does the same thing as SettingsSwitcher
  2. There are no deeper nested children in any of those three children of the <aside> element.

Reviewers: ginsu, przemek, michal, tomek

Reviewed By: tomek

Subscribers: ashoat, tomek, atul

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

Details

Provenance
InkaSokolowskaAuthored on Feb 14 2023, 12:16 AM
Reviewer
tomek
Differential Revision
D6157: [web] Remove unused code
Parents
rCOMM324ae1cda82b: [native, lib] Move community drawer related code that can be reused on web from…
Branches
Unknown
Tags
Unknown