-
Notifications
You must be signed in to change notification settings - Fork 179
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
Fix layer re-arrangement inside groups using shortcuts #11884
Conversation
Looks like the shortcuts don't support rearranging groups currently at all, couldn't see an issue for it, should we add? cc @merapi |
Size Change: +409 B (0%) Total Size: 2.65 MB
ℹ️ View Unchanged
|
Plugin builds for 9c1f855 are ready 🛎️!
|
packages/story-editor/src/app/canvas/utils/test/getLayerArrangementProps.js
Outdated
Show resolved
Hide resolved
Yeah, I think we can also add a few more things that are missing:
|
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 👍🏻
(I merged main for that addGroup fix)
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 extremely well. Excellent job here - it's a much cleaner approach than we originally discussed in the ticket. You kind of merged both ideas of the navigation here - with a great result to follow!
The caveats mentioned by @merapi are significant though. Especially the one about selecting a layer from the layer panel and not being able to rearrange with keyboard directly, but having to focus the canvas element in order for key events to be registered.
Sounds good, I'll create a follow-up issue for these. |
Follow-up: #11906 |
Context
Layer arrangement using shortcuts got broken after adding the groups feature. This PR aims to fix it.
Summary
Allows moving a layer up/down considering groups. A layer is moved inside/outside of the groups depending on the position and grouping.
If the layer is the first item of the group, and UP is pressed, the layer is moved outside of that group, the position stays the same. If the layer is the last item of the group and DOWN is pressed, the layer is moved outside of the group, the position stays the same.
The same logic is also used for moving a layer into a group.
For other cases, the logic remains as currently is.
Relevant Technical Choices
To-do
User-facing changes
Groups are now added / removed from layers when using shortcuts.
Testing Instructions
This PR can be tested by following these steps:
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 #11784