-
Notifications
You must be signed in to change notification settings - Fork 49
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
Refactor screen recording and add key bindings #875
Refactor screen recording and add key bindings #875
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This PR adds screenshot functionality introduced to the simulator server in software-mansion-labs/simulator-server@d86dcc5 ### How Has This Been Tested: run the project and make a screenshot
}, | ||
{ | ||
"command": "RNIDE.captureRecording", | ||
"title": "Capture Recording", |
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.
I wonder if End recording wouldn't be more readable. Or maybe just one command for toggle recording?
@@ -97,6 +121,26 @@ | |||
"command": "RNIDE.performFailedBiometricAuthorization", | |||
"key": "ctrl+shift+N", | |||
"mac": "cmd+shift+N" | |||
}, | |||
{ | |||
"command": "RNIDE.captureReplay", |
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.
I don't like those shortcuts. Usually, the keys used are somehow related to what they do, and I think shift is used for something special for given base shortcut cmd+z
-> undo, cmd+shift+z
-> redo. All that we use doesn't seem to have any meaning, or I don't see one.
I was thinking about something like:
ctrl + b/a -> biometric/authorization
ctrl + shift + b/a -> perform failed biometric/authorization
ctrl + r -> toggle recording
ctrl + shift + r -> show replay
ctrl + s -> screen shot
wdyt?
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.
unfortunately api you proposed clashes with existing keybindings (file save/ resent workspaces)
I refactored my api to look like this
cmd+shift+r capture replay
cmd+shift+e toggle recording
cmd+shift+a capture screenshot
@@ -185,28 +193,60 @@ export class Project | |||
throw new Error("No device session available"); | |||
} | |||
this.deviceSession.startRecording(); | |||
this.eventEmitter.emit("isRecordingChanged", true); |
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 event name is a bit confusing for me, maybe we can come up with something better?
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.
isRecording? RECORDING_STATE_CHAGNED?
This PR aims to add screenshot functionality, keybindings for capturing replays, starting an capturing the recording and capturing screenshots.
To achieve that we moved the logic for starting and ending recording from webview to the extension code.
the proposed keybindings are:
fix #868
How Has This Been Tested:
MAX_RECORDING_TIME_SEC
to 10 and check if the logic for closing stoping worksScreen.Recording.2024-12-23.at.17.12.46.mov