-
Notifications
You must be signed in to change notification settings - Fork 178
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
Remove unused props from default templates and save requests #13221
Conversation
current
and selection from default templates and remove basedOn
prop current
and selection
props from default templates and remove basedOn
prop from save requests
current
and selection
props from default templates and remove basedOn
prop from save requestsbasedOn
prop from save requests
Size Change: -23.4 kB (-1%) Total Size: 2.71 MB
ℹ️ View Unchanged
|
Plugin builds for da96b72 are ready 🛎️!
|
Let's also remove them in
With that in place we should properly refactor Thoughts? |
Is there no use case of saving |
That's what I don't know :-) It's been a while since this was added, so I am lacking the context. |
Found one use case here. web-stories-wp/packages/elements/src/utils/duplicateElement.ts Lines 76 to 88 in 80d3192
These lines of code are responsible for calculating the positional offset based on the number of duplicates. I think |
So the more duplicates an element has, the bigger is the offset 🤔 Interesting way to achieve this effect: Screen.Recording.2023-04-27.at.11.36.25.movEspecially since it doesn't really account for the positions of all the existing elements, leading to unexpected offsets like this: Screen.Recording.2023-04-27.at.11.37.38.movI think in the end it comes all back to #1206, where we originally envisioned nice staggering behavior when inserting multiple elements, leading to solutions like this and also #4218 Can we maybe find a simpler staggering behavior for duplicating elements without having to use |
@swissspidy Since the pasted element/layer/group becomes selected, offset can be calculated off of that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works really well! Kudos for making this simplification happen.
Left just a few tiny comments, otherwise LGTM
…GoogleForCreators/web-stories-wp into code/12262-remove-some-persistant-props
basedOn
prop from save requests
Context
Summary
current
,selection
andstory
props from default template.getStoryPropsToSave
to ignorebasedOn
property in elements.StorySaveData
.basedOn
property.Relevant Technical Choices
To-do
basedOn
from the types.getStroryPropsToSave
to not deletebasedOn
attribute.User-facing changes
Testing Instructions
This PR can be tested by following these steps:
Reviews
Does this PR have a security-related impact?
Does this PR change what data or activity we track or use?
Does this PR have a legal-related impact?
Checklist
Type: XYZ
label to the PRFixes #12262