WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.5k stars 4.19k forks source link

In between block inserter: add exit animation #65240

Open ciampo opened 1 month ago

ciampo commented 1 month ago

The in-between block inserter currently appears in the block editor canvas with an enter animation:

https://github.com/user-attachments/assets/2a2afcb3-080c-4990-adb4-1ece34190621

We should add an exit animation too, for an increased sense of UI polish.

Click to show animation specs ``` IN ANIMATION: (0.58, 0.00, 0.06, 1.00) Total duration: 430ms STROKE (SCALE) Length: 40% → 100% Width: 2px → 8px Duration: 400ms STROKE (OPACITY) - Opacity: 0 → 1 Duration: 50ms Delay: 65ms -- 'PLUS' BUTTON (SCALE) - Scale: 0.6 → 1 Duration: 400ms Delay: 30ms 'PLUS' BUTTON (OPACITY) - Opacity: 0 → 1 Duration: 50ms Delay: 130ms --- OUT ANIMATION: (0.96, 0.00, 0.32, 1.00) Total duration: 330ms STROKE (SCALE) Length: 100% → 40% Width: 8px → 2px Duration: 280ms Delay: 50ms STROKE (OPACITY) - Opacity: 1 → 0 Duration: 50ms Delay: 220ms -- 'PLUS' BUTTON (SCALE) - Scale: 1 → 0.4 Duration: 280ms 'PLUS' BUTTON (OPACITY) - Opacity: 1 → 0 Duration: 50ms Delay: 180ms ```
ciampo commented 1 month ago

I had a timeboxed attempt at this, and this doesn't look like a simple task. Here are some initial observations:

With the above observations in mind, I thought of a potential approach:

ciampo commented 1 month ago

I had a timeboxed attempt at this, and this doesn't look like a simple task. Here are some initial observations:

With the above observations in mind, I thought of a potential approach:

cc @WordPress/gutenberg-components @mtias