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

add siteId as param to themeHasAutoLoadingHomepage #65943

Merged
merged 1 commit into from
Jul 26, 2022

Conversation

andres-blanco
Copy link
Contributor

@andres-blanco andres-blanco commented Jul 25, 2022

Add the siteId param to themeHasAutoLoadingHomepage selector so we can check themes for the auto-loading-homepage tag whether on WPCOM or individual Atomic sites. The logic to check on Atomic sites is guarded behind the themes/atomic-homepage-replace so this PR has no visible change.

This is a PR that splits the work done in this other PR.

Testing

  1. Apply this PR.
  2. Go to the theme showcase on a Simple site and verify everything works as always when changing a theme; clicking 'Activate' and preserving or replacing site homepage.
  3. Go to the theme showcase on an Atomic site and verify everything works as always when changing a theme; clicking 'Activate' should preserve the homepage.

Related to #56869

@andres-blanco andres-blanco requested a review from a team July 25, 2022 19:23
@andres-blanco andres-blanco self-assigned this Jul 25, 2022
@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 Jul 25, 2022
@matticbot
Copy link
Contributor

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

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

name        parsed_size           gzip_size
entry-main       +108 B  (+0.0%)       +9 B  (+0.0%)

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

Sections (~4628 bytes removed 📉 [gzipped])

name      parsed_size           gzip_size
theme          +461 B  (+0.1%)    +1154 B  (+0.8%)
checkout       +339 B  (+0.0%)     -231 B  (-0.1%)
themes         +265 B  (+0.0%)     -125 B  (-0.1%)

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

@mreishus mreishus left a comment

Choose a reason for hiding this comment

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

LGTM

  • Found no changes for existing behavior (atomic, simple replace, simple keep). ✔️
  • Tried with flag on but noticed that no themes I tried were returning atomicAutoLoading=true (probably expected).

I also noticed that about half the calls to themeHasAutoLoadingHomepage have themeId=undefined. I think they're coming from the modal when it isn't showing. Not something too important but something strange that I found while testing that I wanted to share.

@andres-blanco
Copy link
Contributor Author

LGTM

  • Found no changes for existing behavior (atomic, simple replace, simple keep). ✔️
  • Tried with flag on but noticed that no themes I tried were returning atomicAutoLoading=true (probably expected).

I also noticed that about half the calls to themeHasAutoLoadingHomepage have themeId=undefined. I think they're coming from the modal when it isn't showing. Not something too important but something strange that I found while testing that I wanted to share.

nice catch about the themeId. I will keep that in mind. Thanks :)

@andres-blanco andres-blanco merged commit 2a92ea4 into trunk Jul 26, 2022
@andres-blanco andres-blanco deleted the add/site-id-param-homepage-atomic branch July 26, 2022 13:33
@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 Jul 26, 2022
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