microsoft / microsoft/monaco-editor

[Question][Feature Request] Add ability to go from standalone editor into a diff editor

Open
#4,597 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

Context
  • This issue is not a bug report. (please use a different template for reporting a bug)
  • This issue is not a duplicate of an existing issue. (please use the search to find existing issues)
Description

We use Monaco IStandaloneCodeEditor in our app and we want to incorporate a copilot feature with similar experience of GitHub Copilot.
image
Question1: Based on this issue from 4 years ago, if we start with IStandaloneCodeEditor in normal editing mode, and then replace it with IStandaloneDiffEditor when users trigger the copilot in our app, it involves destroying the DOM elements for IStandaloneCodeEditor and then create a new IStandaloneDiffEditor. Is this correct, and is there an easier way to implement this in monaco?

Question2: This might be a vague question, I wonder do all the features supported by IStandaloneCodeEditor also supported by IStandaloneDiffEditor? I'm asking this because I want to understand if there's any known limitation on IStandaloneDiffEditor before I go ahead and change everything of our editor to a IStandaloneDiffEditor and then realize there are certain features we are gonna lose.

Question3: If we have the bandwidth to contribute to your repo, is there an underlying reason that stops a IStandaloneDiffEditor to be built on top of a IStandaloneCodeEditor? We would like to learn about, if it's possible to make the transition easier, and we are glad to help if it's something feasible.

Monaco Editor Playground Link

N/A

Monaco Editor Playground Code
N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The request centers on IStandaloneCodeEditor and IStandaloneDiffEditor; start by reviewing their APIs and the linked issue #1881. Done would require a decided transition path, a clear answer about feature parity, or an agreed contribution scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.