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

Nav Unification: Drop support for "object of objects" adminMenu state shape #45975

Merged
merged 1 commit into from
Sep 29, 2020

Conversation

mreishus
Copy link
Contributor

Changes proposed in this Pull Request

  • No functional changes

Sometimes we would get back menu specifications like:

{ "1": {MenuItem},
  "2": {MenuItem},
  "3": {MenuItem},
}

Now it's always
[ {MenuItem}, {MenuItem}, {MenuItem} ]

We already dropped support for it, but I found two extra places it can
be simplified.

Testing instructions

related to #45435

… shape

Sometimes we would get back menu specifications like:
{ "1": {MenuItem},
  "2": {MenuItem},
  "3": {MenuItem},
}

Now it's always
[ {MenuItem}, {MenuItem}, {MenuItem} ]

We already dropped support for it, but I found two extra places it can
be simplified.
@matticbot
Copy link
Contributor

@mreishus mreishus requested a review from a team September 28, 2020 22:16
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 28, 2020
@mreishus mreishus added [Feature] Calypso & wp-admin Navigation All navigation in Calypso and wp-admin, and the unified transitions between the two. Navigation [Type] Task labels Sep 28, 2020
@mreishus mreishus self-assigned this Sep 28, 2020
@matticbot
Copy link
Contributor

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

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

name                                          parsed_size           gzip_size
async-load-my-sites-sidebar-unified-switcher        +15 B  (+0.0%)       +8 B  (+0.0%)

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.

Copy link
Member

@obenland obenland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢 it.

@cpapazoglou cpapazoglou merged commit 97aec52 into master Sep 29, 2020
@cpapazoglou cpapazoglou deleted the update/unified-sidebar-proptypes branch September 29, 2020 08:30
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 29, 2020
@getdave
Copy link
Contributor

getdave commented Sep 29, 2020

Thanks for following up on this one @mreishus. I neglected to do so. It's testament to the rendering code that things didn't just break entirely!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Calypso & wp-admin Navigation All navigation in Calypso and wp-admin, and the unified transitions between the two. Navigation [Type] Task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants