editor icon indicating copy to clipboard operation
editor copied to clipboard

feat: switch editor action

Open solvedDev opened this issue 3 years ago • 2 comments

Description

Initial implementation for quickly switching between editor types. Two major issues:

  • History entries cannot persist upon switching editors
  • Transferring current (unsaved) document state over is complex

Possible solution: Only allow this action to work if the tab does not contain unsaved content.

Motivation

closes #801

solvedDev avatar Jan 24 '23 11:01 solvedDev

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

I propose a solution to both of the issues:

  1. We don't need to save history between editors. The action of switching editors kind of acts as switching workspaces. The new workspace won't include edit history.

  2. If there is invalid JSON we show a popup notifying the user. If the JSON and the file is saved, we switch editors. Otherwise, we prompt the user to save and switch editors allowing them to cancel.

outercloudstudio avatar Nov 21 '23 15:11 outercloudstudio