-
Notifications
You must be signed in to change notification settings - Fork 177
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
Editor: Do not show 'Add animation' quick action on first page #11748
Editor: Do not show 'Add animation' quick action on first page #11748
Conversation
Are the available properties in the |
I'm unsure of other reviewers that should be added. |
The full list is here: web-stories-wp/packages/story-editor/src/app/story/storyProvider.js Lines 131 to 173 in dea393a
|
Took a look at this, and not sure if it's something with the QA instance (and haven't gotten to check this locally) but wasn't able to see the fix for this. When I added an image to the first page of a Story, I still saw the |
1a9d33e
to
fc47b30
Compare
Changes are only available on the QA environment for non-draft PRs and after our bot has left a comment on the PR saying that ZIP files are available for testing. |
Size Change: +22 B (0%) Total Size: 2.64 MB ℹ️ View Unchanged
|
Plugin builds for a494252 are ready 🛎️!
|
^ Now it should work :) |
🤦♀️ That makes total sense, did not realize this was in a draft status. Thank you! |
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.
🐝
Works great in test, approving.
In the future, if you're expecting review for a pull request, please open the PR regularly and not as a draft. Draft, ideally, should be used for things that need guidance / need to be readily shared with the larger group for conversation.
Context
Since animations cannot be applied to elements on the first page of a story, the 'Add animation' button should not be shown in the 'quick actions' button group.
Summary
The 'Add animation' button will not be rendered on the first page of a story.
Relevant Technical Choices
The
currentPageNumber
prop was tracked down and added to the dependency array for the function responsible for building the menu for 'common actions' of foreground elements. The logic for building the button group was changed to add buttons in the order they should appearThe logic for building the
foregroundCommonActions
button group was changed to conditionally render the add animation button based on the value of thecurrentPageNumber
prop. The logic for rendering the 'reset' button was refactored using the same pattern for consistency.To-do
None.
User-facing changes
Before:
After:
Testing Instructions
Navigate to the first page of a story. Click on an element (that would support animating on the other pages). The 'Add animation' button should not be rendered.
Reviews
Does this PR have a security-related impact?
No
Does this PR change what data or activity we track or use?
No
Does this PR have a legal-related impact?
No
Checklist
Type: XYZ
label to the PRFixes #11602