Skip to content

Add "Reload Project" menu action#8494

Closed
malec-palec wants to merge 3 commits into4ian:masterfrom
PlaytikaOSS:feature/reload-project
Closed

Add "Reload Project" menu action#8494
malec-palec wants to merge 3 commits into4ian:masterfrom
PlaytikaOSS:feature/reload-project

Conversation

@malec-palec
Copy link
Copy Markdown
Contributor

Add a "Reload Project" command that reopens the current project from disk, discarding in-memory state. Useful when the project file is modified externally or the editor state needs a clean reset.

  • Register RELOAD_PROJECT command in CommandPalette and DefaultShortcuts (Ctrl+R)
  • Add "Reload Project" item to File menu right after "Close Project"
  • Wire IPC event (main-menu-reload) through ElectronMainMenu
  • Implement reloadProject callback in MainFrame: prompts on unsaved changes, then delegates to openFromFileMetadataWithStorageProvider to reload the file and restore editor tabs

@4ian
Copy link
Copy Markdown
Owner

4ian commented Apr 8, 2026

Thank you!

We did a a quick check, what do you think of:

  • Rename option in command list to "Reload project from disk/cloud (lose all changes)" (to make things very clear)
  • Because it's a fairly risky command for everyone apart from power users, I'm thinking we could remove the shortcut by default and even remove the item in the application menu.

This would be something discoverable only via the command palette, and the list of shortcuts. This is because we expect most traditional users to not need this (when you need it, you would close/reopen or would use the built-in version history for Cloud projects), so it makes sense to make this option available "when you really need it and want to add a shortcut for it by yourself".

@malec-palec
Copy link
Copy Markdown
Contributor Author

@4ian Sounds good, that's what was implemented:

  • Renamed the reload command and removed its Electron handling.
  • Removed the default shortcut for reload.
  • Removed the command from the File menu, keeping it only in the Command Palette.
  • Added support for defining shortcuts in gdevelop-settings.yaml and applying them from project settings.

This keeps it available for power users while hiding it from regular workflows.

@malec-palec malec-palec marked this pull request as ready for review April 8, 2026 08:38
@malec-palec malec-palec requested a review from 4ian as a code owner April 8, 2026 08:38
@4ian
Copy link
Copy Markdown
Owner

4ian commented Apr 9, 2026

Thanks! I did some factoring in #8501 and merged it (don't have write access to your fork so can't push directly, had to create another branch/PR). Closing this one now.

@4ian 4ian closed this Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants