Skip to content

Hosting Dashboard v2: view transitions (part 1) #103278

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 11 commits into from
May 19, 2025
Merged

Conversation

ellatrix
Copy link
Contributor

@ellatrix ellatrix commented May 9, 2025

Fixes DOTCOM-13060

Please note: Firefox does not support view transitions.

Screen.Recording.2025-05-09.at.17.27.33.mov

Proposed Changes

Adds view transitions for routes:

  • Main header will cross fade
  • Secondary header will slide in/out when it appears/disappears only. When that happens the main body should be pushed down/up.
  • Main body title should stay in place, main button should shrink/expand.
  • Main card should shrink expand and stay in place.

As discussed with @ntsekouras and @youknowriad I moved the header back into PageLayout to restore the content div.

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

Copy link

github-actions bot commented May 9, 2025

@matticbot
Copy link
Contributor

matticbot commented May 9, 2025

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

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

  • help-center
  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug try/view-transitions on your sandbox.

@matticbot
Copy link
Contributor

matticbot commented May 9, 2025

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

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

name                    parsed_size           gzip_size
entry-dashboard-dotcom      +1902 B  (+0.2%)     +242 B  (+0.1%)
entry-dashboard-a4a         +1902 B  (+0.2%)     +237 B  (+0.1%)
entry-subscriptions          +401 B  (+0.0%)     +128 B  (+0.0%)
entry-reauth-required        +401 B  (+0.0%)     -258 B  (-0.0%)
entry-main                   +401 B  (+0.0%)     -286 B  (-0.0%)
entry-domains-landing        +401 B  (+0.1%)     +128 B  (+0.1%)
entry-browsehappy            +401 B  (+0.2%)     +128 B  (+0.2%)
entry-stepper                +329 B  (+0.0%)     +125 B  (+0.0%)
entry-login                  +283 B  (+0.0%)     -597 B  (-0.1%)

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

Sections (~291 bytes added 📈 [gzipped])

name                      parsed_size           gzip_size
async-step-unified-plans       +130 B  (+0.0%)     +291 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.

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

name                                             parsed_size           gzip_size
async-load-signup-steps-plans-theme-preselected       +130 B  (+0.0%)     +291 B  (+0.2%)
async-load-signup-steps-plans                         +130 B  (+0.0%)     +291 B  (+0.2%)

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.

@ellatrix ellatrix marked this pull request as ready for review May 9, 2025 12:44
@ellatrix ellatrix requested review from youknowriad and a team as code owners May 9, 2025 12:44
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels May 9, 2025
Copy link
Member

@ntsekouras ntsekouras left a comment

Choose a reason for hiding this comment

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

That's really cool to see!

size="small"
/>
<PageLayout title={ __( 'Privacy' ) } size="small">
<VStack spacing={ 4 }>
Copy link
Member

Choose a reason for hiding this comment

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

Why would we need to add VStack in various pages? Also have you removed the description intentionally?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the description is not present in the designs, so I removed it.

It's necessary for there to be some content because otherwise the content will slide in (from nothing) instead of cross fade.

Copy link
Member

Choose a reason for hiding this comment

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

Should we just add a placeholder paragraph then instead of these? Also PageLayout is a VStack wrapper and its children are wrapped.

Copy link
Contributor Author

@ellatrix ellatrix May 9, 2025

Choose a reason for hiding this comment

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

I don't understand what you mean. I added the VStack because billing has that too for the summary buttons. Why a paragraph? These should because summary buttons, not paragraphs.

@fushar fushar requested a review from a team May 9, 2025 15:39
@fushar
Copy link
Contributor

fushar commented May 9, 2025

This is so cool! I've added @Automattic/dotcom-design (apologize if I'm pinging too many folks) to check if this OK design-wise for dotcom.

@@ -5,6 +5,8 @@
// I'm tempted to even just replace all this with a display:none on the logo
@import './loading-screen';

@import './view-transitions';
Copy link
Contributor

Choose a reason for hiding this comment

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

I like that it feels not intrusive like that. It's its own CSS file that we can remove and iterate on as needed. I don't like that we have to use classnames for things that are rendered in different places to achieve it though.

I'm not sure yet what's the best approach.

Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

This is really cool to me. It makes the dashboard feel more "finished"/"polished". The current transitions are not perfect and we could improve a lot. But it's a great start.

@matt-west
Copy link
Contributor

Nice work @ellatrix. Tagging @marko-srb, @sfougnier, and @nick-a8c to review as they’re looking into interactions and motion from the brand-side.

@ellatrix
Copy link
Contributor Author

@matt-west Just a note: I'm actually not adding any new animations here, they are all default browser animations that I'm taking advantage of by telling the browser what to move. While there's some flexibility on what to move, I wouldn't mess with custom animations right now.

@matt-west
Copy link
Contributor

matt-west commented May 12, 2025

@ellatrix Oh nice! I still think it's worth the brand team looking at this as they were planning to work on how motion can be incorporated into the dashboard. We don’t have to implement any feedback as part of this PR though.

@ellatrix
Copy link
Contributor Author

What's blocking here?

@matt-west
Copy link
Contributor

@ellatrix Nothing from a design perspective. I’m happy for this to be merged.

@ellatrix ellatrix force-pushed the try/view-transitions branch from 1394501 to df5f638 Compare May 19, 2025 14:10
@ellatrix ellatrix merged commit 62c9657 into trunk May 19, 2025
11 checks passed
@ellatrix ellatrix deleted the try/view-transitions branch May 19, 2025 17: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 May 19, 2025
@youknowriad
Copy link
Contributor

We forgot reduced animation support.

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.

6 participants