microsoft / microsoft/monaco-editor
[Feature Request] Diff Editor Treats All Modified Lines as only "Added" or "Deleted", not "Modified"
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
The monaco diff editor doesn't make any distinction between lines which have been modified from the original versus those which are entirely new. This creates an issue where the ability to style in the side-by-side view in order to make it more user-friendly is limited.
Ideally lines which have been modified could have a muted background color with a more prominent background color for the edited chars. Lines which have been added would entirely have a more prominent background color.
An example of how this could look exists on the "truehumandesign.se" website for the software Diffinity.
I modified the 'diffEditor.insertedLineBackground' and 'diffEditor.removedLineBackground' colors to match the background of the editor. This results in "modified lines" looking as I expect but truly added new lines do not have any special background color causing them to blend in visually with unchanged lines.
Monaco Editor Playground Link
No response
Monaco Editor Playground Code
No response
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
Start by reviewing Monaco's diff editor and its existing insertedLineBackground and removedLineBackground color handling. Compare the requested modified-line and changed-character distinction with the current side-by-side rendering. Done means modified lines and truly added lines receive distinct styling, with edited characters remaining visually prominent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100