microsoft / microsoft/monaco-editor
[Feature Request] [Diff Editor] Option to configure the merge direction in the Diff Editor
Nobody has claimed this yet.
- 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
Currently in the multiline Diff Editor, the default configuration of the arrow is from LHS to RHS.
As part of our internal convention for our product, RHS is always read-only. LHS is editable and differences are allowed to be moved from RHS to LHS. This can be configured in the diff editor by the below option
{
..
originalEditable : true,
readOnly : true
..
}
But the above configuration disables the merge arrows as well.
Requested Feature:
Configure the arrow direction from Right to Left for multiline Diff Editor so that even when the RHS is read only and LHS is editable the merge arrows appears.
{
..
mergeDirection : "leftToRight" | "rightToLeft",
..
}
Related Issues:
#368: "Allow to configure which side of the diff editor is editable" (https://github.com/Microsoft/Monaco-editor/issues/368)
This previous feature request from 2017 asked for similar functionality to configure editable sides
While that request focused on making both sides editable, this request specifically aims to reverse the default behavior of the merge arrow directions
The current request builds upon the same concept but with a more specific use case and additional arrow direction configuration
Monaco Editor Playground Link
No response
Monaco Editor Playground Code
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files, tests, or runnable Playground example are named. Start by locating the multiline Diff Editor configuration and the existing merge-arrow behavior, then verify how originalEditable and readOnly affect it. Done means a documented mergeDirection option supports right-to-left arrows while preserving the existing default behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100