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

refactor(hosting-server-settings): move to the right place, rename and a bit clean up #94545

Merged
merged 3 commits into from
Sep 13, 2024

Conversation

nightnei
Copy link
Contributor

Related to https://github.com/Automattic/dotcom-forge/issues/9135

Proposed Changes

More details in this thread (p1726157495064039-slack-C06DN6QQVAQ)
But in a nutshell - we should rename and move server-settings code behind /hosting/ directory

Testing Instructions

  1. Open /sites page
  2. Select an atomic site
  3. Select Server Settings tab
  4. Smoke test that everything works good

@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Sep 13, 2024
@matticbot
Copy link
Contributor

matticbot commented Sep 13, 2024

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

Sections (~42 bytes added 📈 [gzipped])

name                             parsed_size           gzip_size
hosting                               +153 B  (+0.0%)      +51 B  (+0.0%)
staging-site                          +139 B  (+0.0%)      +55 B  (+0.0%)
security                               +36 B  (+0.0%)      -39 B  (-0.0%)
plugins                                +21 B  (+0.0%)      +18 B  (+0.0%)
themes                                 +14 B  (+0.0%)      +10 B  (+0.0%)
jetpack-cloud-plugin-management        +14 B  (+0.0%)      +12 B  (+0.0%)
github-deployments                     +14 B  (+0.0%)       +5 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.

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

name                                       parsed_size           gzip_size
async-load-calypso-layout-command-palette        +36 B  (+0.0%)      +13 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.

@@ -5,10 +5,10 @@ import {
redirectIfCurrentUserCannot,
redirectToHostingPromoIfNotAtomic,
} from 'calypso/controller';
import { handleHostingPanelRedirect } from 'calypso/hosting/server-settings/controller';
Copy link
Contributor

Choose a reason for hiding this comment

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

As a follow-up (not in this PR) maybe we need to extract this logic somewhere. It's copy-pasted literally in each tab for now. 😂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, good point :)

Copy link
Contributor

Choose a reason for hiding this comment

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

This file is deleted in #94538, can we skip this in this PR? Also, as it-is, it will compile error because of this line import { indexPage } from '../github-deployments/routes';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

This card now should be in hosting/overview 😄

Copy link
Contributor Author

@nightnei nightnei Sep 13, 2024

Choose a reason for hiding this comment

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

@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug nightnei/cleanupServerSettingsTab on your sandbox.

Copy link
Contributor

@fushar fushar left a comment

Choose a reason for hiding this comment

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

Smoke-tested the cards and they work correctly 👍

@nightnei nightnei merged commit bc6a973 into trunk Sep 13, 2024
11 checks passed
@nightnei nightnei deleted the nightnei/cleanupServerSettingsTab branch September 13, 2024 16:05
@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 Sep 13, 2024
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