Skip to content
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

feat: switch editor action #861

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft

Conversation

solvedDev
Copy link
Member

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 solvedDev added the feature Request of a new feature label Jan 24, 2023
@solvedDev solvedDev self-assigned this Jan 24, 2023
@stackblitz
Copy link

stackblitz bot commented Jan 24, 2023

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

@outercloudstudio
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Request of a new feature
Projects
Status: ⏳ In Progress
Development

Successfully merging this pull request may close these issues.

2 participants