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

Screen options: Handle switches to WP Admin views #53866

Merged
merged 4 commits into from Jun 22, 2021

Conversation

mmtr
Copy link
Member

@mmtr mmtr commented Jun 21, 2021

Fixes #53708

Changes proposed in this Pull Request

Handles clicks on the new screen switcher component and redirect users to WP Admin when the Classic view is selected.

Testing instructions

  • Use the Calypso live link below and append ?flags=nav-unification/switcher to the end of the URL.
  • Switch to a Simple or Atomic site.
  • In the following screens, make sure that opening the Screen Options tab and clicking on "Classic view" redirects you to the equivalent WP Admin screen.
    • My Home
    • Posts > All posts
    • Posts > Categories
    • Posts > Tags
    • Media
    • Pages > All pages
    • Testimonials > All testimonials
    • Portfolio > All projects
    • Comments
    • Appearance > Themes
    • Users > All users
    • Tools > Import
    • Tools > Export
    • Settings > General
    • Settings > General > Writing
    • Settings > General > Discussion
  • Make sure the WP Admin links include a preferred-view=classic param (which will be used in a future diff for storing the new preference).
  • Switch to a Jetpack site.
  • Make sure the quick switcher doesn't show up.

@mmtr mmtr added [Status] In Progress [Feature] Calypso & wp-admin Navigation All navigation in Calypso and wp-admin, and the unified transitions between the two. labels Jun 21, 2021
@mmtr mmtr self-assigned this Jun 21, 2021
@mmtr mmtr requested review from a team as code owners June 21, 2021 12:45
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jun 21, 2021
@matticbot
Copy link
Contributor

matticbot commented Jun 21, 2021

@matticbot
Copy link
Contributor

matticbot commented Jun 21, 2021

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

Sections (~2612 bytes added 📈 [gzipped])

name                 parsed_size           gzip_size
settings-writing          +697 B  (+0.1%)     +199 B  (+0.1%)
posts-custom              +667 B  (+0.1%)     +225 B  (+0.2%)
pages                     +662 B  (+0.2%)     +222 B  (+0.2%)
settings-discussion       +661 B  (+0.3%)     +202 B  (+0.3%)
settings                  +658 B  (+0.1%)     +198 B  (+0.1%)
comments                  +656 B  (+0.1%)     +210 B  (+0.1%)
themes                    +649 B  (+0.2%)     +194 B  (+0.2%)
media                     +649 B  (+0.1%)     +173 B  (+0.1%)
export                    +649 B  (+0.4%)     +209 B  (+0.4%)
home                      +648 B  (+0.2%)     +200 B  (+0.2%)
posts                     +647 B  (+0.1%)     +185 B  (+0.1%)
import                    +622 B  (+0.3%)     +213 B  (+0.3%)
people                    +621 B  (+0.2%)     +182 B  (+0.2%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

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
Contributor

@tjcafferkey tjcafferkey left a comment

Choose a reason for hiding this comment

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

Just left a few minor comments but overall LGTM and works as expected. Thanks for adding the additional component tests too 🙌🏻

@mmtr mmtr merged commit 876451f into trunk Jun 22, 2021
@mmtr mmtr deleted the update/screen-switcher-handle-clicks branch June 22, 2021 10:45
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jun 22, 2021
@a8ci18n
Copy link

a8ci18n commented Jun 22, 2021

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/6065286

Hi @mmtr, could you please edit the description of this PR and add a screenshot for our translators? Ideally it'd include all of the following strings:

  • Our WordPress.com redesign for a better experience.
  • The classic WP-Admin WordPress interface.

Thank you in advance!

@a8ci18n
Copy link

a8ci18n commented Jun 30, 2021

Translation for this Pull Request has now been finished.

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nav Unification: Handle quick switcher on Calypso
4 participants