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

Make Site Settings available to duplicate views experiment users #98875

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

okmttdhr
Copy link
Member

Related to #

Proposed Changes

Why are these changes being made?

Testing Instructions

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

Comment on lines +85 to +95
const [ isDuplicateViewsExperiment, setIsDuplicateViewsExperiment ] = useState( false );
useEffect( () => {
const experimentName = 'calypso_post_onboarding_holdout_160125';
( async () => {
const duplicateViewsExperimentAssignment = await loadExperimentAssignment( experimentName );
if ( duplicateViewsExperimentAssignment.variationName === 'treatment' ) {
console.log( 'You are in the duplicate views experiment' );
setIsDuplicateViewsExperiment( true );
}
} )();
}, [] );
Copy link
Member Author

Choose a reason for hiding this comment

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

We should refactor this into a common function and replace const isDuplicateViewsExperiment = true;

@matticbot
Copy link
Contributor

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

App Entrypoints (~64 bytes removed 📉 [gzipped])

name                   parsed_size           gzip_size
entry-subscriptions         -126 B  (-0.0%)       +6 B  (+0.0%)
entry-stepper               -126 B  (-0.0%)       +6 B  (+0.0%)
entry-login                 -126 B  (-0.0%)       +6 B  (+0.0%)
entry-domains-landing       -126 B  (-0.0%)       +6 B  (+0.0%)
entry-browsehappy           -126 B  (-0.1%)       +6 B  (+0.0%)
entry-main                   -60 B  (-0.0%)      -64 B  (-0.0%)

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

Sections (~28395 bytes added 📈 [gzipped])

name                parsed_size           gzip_size
hosting               +188635 B  (+6.9%)   +49940 B  (+6.7%)
site-settings           +1087 B  (+0.1%)     -368 B  (-0.1%)
settings                 -592 B  (-0.1%)      -86 B  (-0.0%)
sites-dashboard          +285 B  (+0.0%)     +140 B  (+0.0%)
site-performance         +285 B  (+0.0%)     +140 B  (+0.0%)
site-overview            +285 B  (+0.0%)     +140 B  (+0.0%)
site-monitoring          +285 B  (+0.0%)     +140 B  (+0.0%)
site-logs                +285 B  (+0.0%)     +140 B  (+0.0%)
hosting-features         +285 B  (+0.0%)     +140 B  (+0.0%)
github-deployments       +285 B  (+0.0%)     +140 B  (+0.0%)
site-marketing           +264 B  (+0.0%)     +119 B  (+0.0%)
domains                  +209 B  (+0.0%)     +711 B  (+0.1%)
checkout                 +196 B  (+0.0%)     +714 B  (+0.1%)
email                    +103 B  (+0.0%)     -101 B  (-0.0%)
people                    +92 B  (+0.0%)      +47 B  (+0.0%)
site-tools                +89 B  (+0.0%)    -1415 B  (-0.3%)
staging-site              -31 B  (-0.0%)    -2430 B  (-0.5%)
marketing                 -21 B  (-0.0%)      -21 B  (-0.0%)
site-purchases            +13 B  (+0.0%)       -2 B  (-0.0%)
purchases                 +13 B  (+0.0%)       -2 B  (-0.0%)

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.

@@ -418,7 +420,9 @@ export class SiteSettingsFormGeneral extends Component {
</Card>
</>
) }
{ ! isEnabled( 'untangling/hosting-menu' ) && <SiteSettingsForm { ...this.props } /> }
{ ! ( isEnabled( 'untangling/hosting-menu' ) || isDuplicateViewsExperiment ) && (
Copy link
Member Author

@okmttdhr okmttdhr Jan 24, 2025

Choose a reason for hiding this comment

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

We might want to remove untangling/hosting-menu flag for changes in this PR

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.

2 participants