Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add/expand collapse sidebar #45989

Closed
wants to merge 2 commits into from

Conversation

cpapazoglou
Copy link
Contributor

@cpapazoglou cpapazoglou commented Sep 29, 2020

Changes proposed in this Pull Request

  • add CollapseSidebar sidebar item component
  • add sidebar collapsed status to state and create a getSidebarIsCollapsed selector
  • add tests for reducer and actions
  • tries to add a class in the layout component depending on which sidebar will collapse or not

Testing instructions

@matticbot
Copy link
Contributor

cpap and others added 2 commits September 29, 2020 12:48
…dux actions

However, it still doesn't do anything in the browser when clicking.  I
think this is an improvement though, since I can now see the actions in
the redux debugger when clicking after this patch is applied.
@cpapazoglou cpapazoglou force-pushed the add/expand-collapse-sidebar branch from 72217d5 to 0668963 Compare September 29, 2020 09:48
@cpapazoglou cpapazoglou mentioned this pull request Sep 29, 2020
8 tasks
@matticbot
Copy link
Contributor

matticbot commented Sep 29, 2020

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~115 bytes added 📈 [gzipped])

name        parsed_size           gzip_size
entry-main       +414 B  (+0.0%)     +115 B  (+0.0%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Async-loaded Components (~134 bytes added 📈 [gzipped])

name                                          parsed_size           gzip_size
async-load-my-sites-sidebar-unified-switcher       +434 B  (+0.2%)     +134 B  (+0.2%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@cpapazoglou cpapazoglou changed the title Add/expand collapse sidebar [WIP] Add/expand collapse sidebar Sep 29, 2020
@cpapazoglou cpapazoglou self-assigned this Sep 30, 2020
@cpapazoglou
Copy link
Contributor Author

Using state to store the sidebar status (expanded / collapsed) in order to use for rendering the layout here
https://github.com/Automattic/wp-calypso/pull/45989/files#diff-e8ab61833a6d85e586cf195046ed6f15
leads to re-rendering the biggest part of the app thus creating performance issues. I will leave this as a draft and explore another way to accomplish it.

@cpapazoglou cpapazoglou deleted the add/expand-collapse-sidebar branch October 20, 2020 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants