feat(screenshot): Implement screenshot functionality#30
Open
rsthornton wants to merge 1 commit intomainfrom
Open
feat(screenshot): Implement screenshot functionality#30rsthornton wants to merge 1 commit intomainfrom
rsthornton wants to merge 1 commit intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces the initial implementation for a desktop screenshot feature, allowing users to capture the current view of the diagram by pressing
Cmd+P(macOS) orCtrl+P(Windows/Linux).The implementation attempts to follow the established architectural patterns of the BERT application for handling user input and interacting with the Bevy engine.
Implementation Details
src/bevy_app/systems/screenshot.rstake_screenshotsystem is triggered by aKeyCodeinput.Screenshotcomponent.ScreenshotFinishedevent and saves the image to a timestamped PNG file.tauri-plugin-screenshot. The direct keyboard input pattern was chosen to align with other working shortcuts in the app.🔍 Current Status & Request for Review
The feature is currently blocked, and I would appreciate a second pair of eyes on the approach. While the implementation attempts to follow the correct patterns, it's very possible there is a more fundamental issue that I have missed.
Immediate Blocker: The most direct symptom is that the
take_screenshotsystem is not being triggered whenCmd+Pis pressed in the desktop application.Debugging Performed:
CameraControlSet, alongside other working shortcuts likeCmd+R.Request for Help:
I would appreciate a review of the overall approach in
screenshot.rsto ensure it's sound. If the architecture seems correct, then assistance in debugging the keyboard input issue would be the next step. It's possible the issue is simple, but it's also possible it's pointing to a deeper misunderstanding of the event loop or system scheduling.