Skip to content

CTRL+S shortcut to save scenes and code editor #455

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

Merged
merged 4 commits into from
Jun 3, 2025

Conversation

m-alexparent
Copy link

CTRL+S can now be used to save code editor files and learning scenes
It will only save the active tab according to the maincontainer class, a.k.a. the last one that has been clicked on or interacted with (with the exception of click-dragging on a scene, which does not give "focus" to its tab)

Linked to #86

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a CTRL+S shortcut to save both learning scenes and code editor files by dispatching and handling a custom 'saveFileEvent'.

  • In workflow.jsx, the toast messages now include the scene name when saving.
  • In mainContainerClass.tsx, a new keydown handler dispatches the save event for the active tab.
  • In codeEditor.jsx, toast messages and event listener logic have been updated similarly to incorporate file names.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
renderer/components/learning/workflow.jsx Updated toast messages to include scene names and added a useEffect to listen for the custom save event.
renderer/components/layout/flexlayout/mainContainerClass.tsx Added a handleSaveTab method for CTRL+S shortcut and ensured proper event listener removal.
renderer/components/flow/codeEditor.jsx Modified toast messages to include file names and replaced keydown event listener with custom event listener for saving.

Copilot nitpicks

Co-authored-by: Copilot <[email protected]>
@MahdiAll99 MahdiAll99 merged commit 2ea25f0 into scalability Jun 3, 2025
@github-project-automation github-project-automation bot moved this to ✅ Done Sprint in MEDomicsLab Scrum Board Jun 3, 2025
@MahdiAll99 MahdiAll99 deleted the SceneSaveShortcut branch June 3, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done Sprint
Development

Successfully merging this pull request may close these issues.

3 participants