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
Keyboard navigation for media editor #2108
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2108 +/- ##
==========================================
+ Coverage 82.87% 83.35% +0.48%
==========================================
Files 830 831 +1
Lines 14498 14521 +23
==========================================
+ Hits 12015 12104 +89
+ Misses 2483 2417 -66
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Size Change: +490 B (0%) Total Size: 1.19 MB
ℹ️ View Unchanged
|
# Conflicts: # assets/src/edit-story/components/canvas/canvasProvider.js # assets/src/edit-story/components/canvas/framesLayer.js # assets/src/edit-story/elements/media/editPanMoveable.js
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@googlebot I consent. |
bef1f3b
to
347bde7
Compare
From testing:
|
} | ||
const panFocalX = getFocalFromOffset(width, mediaWidth, offsetX - dx); | ||
const panFocalY = getFocalFromOffset(height, mediaHeight, offsetY - dy); | ||
setProperties({ |
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.
It seems to lag currently when not clicking the keys slowly -- would be good to create a follow-up issue for looking into 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.
Yeah, there's a lot of lag currently. It's beginning to be a problem 😢
@merapi Confirmed -- indeed that focuses on the design panel items instead. |
@miina, @merapi, I addressed your comments inline. Please see these two threads on disabling moving editmode elements at all and focus management. |
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.
Unit tests are failing currently, otherwise LGTM (let's create a performance-related follow-up issue, too).
Summary
Adds ability to move the cropped image/video using keyboard arrows.
To-do
Fix warning while settingframesLayer
refRestore keyboard events for dragging after finishing (otherwise dragging by keyboard will be disabled)Testing Instructions
Fixes #682