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

Copy&Paste Animation + Adaptors update #1452

Merged
merged 4 commits into from
Jan 31, 2023

Conversation

Soare-Robert-Daniel
Copy link
Contributor

@Soare-Robert-Daniel Soare-Robert-Daniel commented Jan 19, 2023

Closes #1446.

Summary

  • Update adaptors for the recent changes.
  • Copy & Paste animations.

Test instructions

Now the animation settings should also be copied.

ℹ️ As always, the copy-paste between different block types might not behave as expected.


Checklist before the final review

  • Visual elements are not affected by independent changes.
  • It is at least compatible with the minimum WordPress version.
  • It loads additional script in frontend only if it is required.
  • Does not impact the Core Web Vitals.
  • In case of deprecation, old blocks are safely migrated.
  • It is usable in Widgets and FSE.
  • Copy/Paste is working if the attributes are modified.

@Soare-Robert-Daniel Soare-Robert-Daniel self-assigned this Jan 19, 2023
@Soare-Robert-Daniel Soare-Robert-Daniel marked this pull request as ready for review January 19, 2023 11:18
@pirate-bot
Copy link
Contributor

pirate-bot commented Jan 19, 2023

Bundle Size Diff

Package Old Size New Size Diff
Animations 192.14 KB 192.14 KB 0 B (0.00%)
Blocks 1.26 MB 1.27 MB 6.12 KB (0.47%)
CSS 6.74 KB 6.74 KB 0 B (0.00%)
Dashboard 43.73 KB 43.73 KB 0 B (0.00%)
Export Import 4.74 KB 4.74 KB 0 B (0.00%)
Pro 102.04 KB 102.04 KB 0 B (0.00%)

@github-actions
Copy link

github-actions bot commented Jan 19, 2023

Plugin build for 99b7051 is ready 🛎️!

@Soare-Robert-Daniel Soare-Robert-Daniel linked an issue Jan 19, 2023 that may be closed by this pull request
@mghenciu
Copy link
Contributor

Tested again Robert, and even if the issue I mentioned yesterday with the Copy-paste from an Image to a Column - is fixed, I think the challenge with copying from different blocks, is still present.

Here's an example were I copied the Style from an Icon to a Core Heading (and it shouldn't be possible). Basically it adds the border radius of the Icon to the Core Heading - even if the core headings don't have border radius controls:

Screen.Recording.2023-01-20.at.14.10.33.mov

Maybe it would be better to release the Copy Paste for Animations, and later look into this - if it's a more complex issue.

@Soare-Robert-Daniel
Copy link
Contributor Author

Here's an example were I copied the Style from an Icon to a Core Heading (and it shouldn't be possible). Basically it adds the border radius of the Icon to the Core Heading - even if the core headings don't have border radius controls:

The great challenge is establishing more rules for the copy. It seams that Gutenberg add some hidden functionality that is not visible for the user but it awaken if some values are present. Normally, extra values should be ignored.

I think we can made some more explicit rules for hot blocks like heading and paragraph.

Another issue, if Gutenberg is adding his own copy style, how should we rename ours? With the past controls in toolbars we were kind of save since it was separated, but now we need to coexists.

@mghenciu
Copy link
Contributor

I think at this stage, it's ok to leave it as it is, Robert.
Assuming that users will use the Copy Paste only on the blocks of the same type.

and as Core already added/will add soon the Copy Paste feature, we'll just need to wait a bit and see how we can integrate and adjust this - as having 2 copy/paste, won't make sense.

@pirate-bot
Copy link
Contributor

pirate-bot commented Jan 25, 2023

E2E Summary

Typing

Test Average Time (ms) Standard Deviation (ms) Median Time (ms) Quantile for soft limit (%) Quantile for hard limit (%)
Typing 48.35 11.03 43.41 76.77 (60ms) 97.98 (80ms)
Values above 60ms "9 - 67.98, 10 - 84.41, 15 - 63.92, 22 - 62.15, 28 - 65.25, 29 - 64.86, 38 - 63.17, 40 - 65.04, 51 - 63.78, 55 - 63.63, 57 - 65.85, 62 - 67.20, 64 - 93.94, 66 - 62.70, 71 - 64.52, 73 - 63.45, 75 - 60.78, 77 - 64.12, 79 - 66.10, 81 - 62.06, 83 - 61.52, 85 - 60.94, 87 - 60.81"

@irinelenache
Copy link
Contributor

@Soare-Robert-Daniel Found a single problem, i don't exactly know if this is the expected behaviour, let me know what you think:

  • If i already have some blocks with animations and i want to copy and paste the style of a block with the animation deleted, i can't. Here is a video with the problem https://vertis.d.pr/v/Gq2zER

@Soare-Robert-Daniel
Copy link
Contributor Author

Thanks for testing.

  • If i already have some blocks with animations and i want to copy and paste the style of a block with the animation deleted, i can't. Here is a video with the problem https://vertis.d.pr/v/Gq2zER

We will see at the meeting if it is ok to override the animation when the copied animation is empty.

@Soare-Robert-Daniel
Copy link
Contributor Author

As we discussed in the meeting, if we do not copy any animation from the block, we should not override the options of the block in which we paste.

The current behavior will remain.

@irinelenache
Copy link
Contributor

@Soare-Robert-Daniel Thanks for looking into this, i'll move this to Ready to merge then 👍

@HardeepAsrani HardeepAsrani merged commit eff3a10 into development Jan 31, 2023
@HardeepAsrani HardeepAsrani deleted the feat/copy-paste-update branch January 31, 2023 18:53
@pirate-bot
Copy link
Contributor

🎉 This PR is included in version 2.2.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Indicate that an issue has been resolved and released in a particular version of the product.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copy Animations with Copy-Paste style
5 participants