Skip to content

Dashboard v2: switcher: enable add site button #103630

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

Merged
merged 1 commit into from
May 27, 2025
Merged

Conversation

ellatrix
Copy link
Contributor

@ellatrix ellatrix commented May 22, 2025

See #103344.

Proposed Changes

image image

Why are these changes being made?

  • The button currently doesn't work.

Testing Instructions

  • Click the site switcher's add new site button.

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)?

@ellatrix ellatrix requested review from youknowriad and a team as code owners May 22, 2025 12:44
@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 May 22, 2025
Copy link

github-actions bot commented May 22, 2025

@matticbot
Copy link
Contributor

matticbot commented May 22, 2025

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

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

name                    parsed_size           gzip_size
entry-dashboard-dotcom       +800 B  (+0.0%)     +190 B  (+0.0%)
entry-dashboard-a4a          +800 B  (+0.0%)     +190 B  (+0.0%)
entry-subscriptions          +683 B  (+0.0%)     +542 B  (+0.1%)
entry-stepper                +683 B  (+0.0%)     +542 B  (+0.1%)
entry-reauth-required        +683 B  (+0.0%)     +540 B  (+0.1%)
entry-main                   +683 B  (+0.0%)     +540 B  (+0.1%)
entry-login                  +683 B  (+0.0%)     +541 B  (+0.1%)
entry-domains-landing        +462 B  (+0.1%)     +633 B  (+0.3%)
entry-browsehappy            +397 B  (+0.2%)     +112 B  (+0.2%)

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

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.

@youknowriad
Copy link
Contributor

Please no, this is going to prevent sharing the component with V1. Let's leave the component as is and instead have a separate one (or just use the modal inline)

@youknowriad
Copy link
Contributor

See #103488

@ellatrix
Copy link
Contributor Author

Why do we want to share it if it's going to be redesigned?

@ellatrix
Copy link
Contributor Author

Also why does the modal prevent using another component inside of it?

@youknowriad
Copy link
Contributor

Why do we want to share it if it's going to be redesigned?

That way it's redesigned for both. Right now it's exactly the same code that is duplicated.

Also why does the modal prevent using another component inside of it?

That's fine, I'm just saying that the reusable component shouldn't change from "content" to "modal".

@ellatrix ellatrix force-pushed the add/switcher-add-site branch from d428bfb to 0bde7db Compare May 26, 2025 09:58
@ellatrix
Copy link
Contributor Author

@youknowriad better?

@youknowriad
Copy link
Contributor

Yes, this works for me.

Initially I thought we wanted to keep the regular "add new site" button as a dropdown though?

@youknowriad
Copy link
Contributor

If we want all of them to be a Modal, It's ok to have another dedicated component (different from the existing one) to share the logic.

@ellatrix ellatrix force-pushed the add/switcher-add-site branch from 6eefe13 to 46f7c0d Compare May 27, 2025 12:37
@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 add/switcher-add-site on your sandbox.

@ellatrix ellatrix merged commit 74be2a5 into trunk May 27, 2025
11 checks passed
@ellatrix ellatrix deleted the add/switcher-add-site branch May 27, 2025 13:34
@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 May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants