Skip to content

feat: add context menu to animations#5162

Merged
TrySound merged 3 commits into
mainfrom
anim-ctx
Apr 25, 2025
Merged

feat: add context menu to animations#5162
TrySound merged 3 commits into
mainfrom
anim-ctx

Conversation

@TrySound
Copy link
Copy Markdown
Contributor

Now user can copy and paste specific animations between animation groups.

Screenshot 2025-04-24 at 23 41 34

Now user can copy and paste specific animations between animation
groups.
@TrySound TrySound requested review from istarkov, johnsicili and kof April 24, 2025 16:43
Copy link
Copy Markdown
Member

@kof kof left a comment

Choose a reason for hiding this comment

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

Works great, I would suggest 2 improvements:

  1. ability to copy all animations, similar to how we have it in advanced section, so this way if I have many animations, I don't have to copy them 1 by one. Call it "Paste animations" - this works for one or many

  2. Add meta to the json similar to what we have on the instance: "@webstudio/instance/v0.1", so its easier to identify what this is and we can also version it if we need a schema change at some point

@kof
Copy link
Copy Markdown
Member

kof commented Apr 24, 2025

this schema would be great: {'@webstudio/animation/v0.1': Array<Animation> }

@TrySound
Copy link
Copy Markdown
Contributor Author

I don't think versioning is important for small short term copy paste here

@kof
Copy link
Copy Markdown
Member

kof commented Apr 24, 2025

I don't think versioning is important for small short term copy paste here

Yeah, we don't know, still nicer to have a consistent structure with an identifier

@kof
Copy link
Copy Markdown
Member

kof commented Apr 25, 2025

Works well, lets release!

@kof
Copy link
Copy Markdown
Member

kof commented Apr 25, 2025

Interesting thing I noticed is that description is part of the object:
{"@webstudio/animation/v0.1":[{"name":"Video Ranges","description":"Fade in the element as it scrolls into view.","keyframes":[{"offset":0,"styles":{"opacity":{"type":"unit","unit":"number","value":0}}}],"timing":{"easing":"linear","fill":"backwards","rangeStart":["cover",{"type":"unit","value":0,"unit":"%"}],"rangeEnd":["cover",{"type":"unit","value":100,"unit":"%"}]}}]}

@TrySound TrySound merged commit 3826ddd into main Apr 25, 2025
17 checks passed
@TrySound TrySound deleted the anim-ctx branch April 25, 2025 10:18
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.

2 participants