microsoft / microsoft/monaco-editor

`ViewImpl` follow the open–closed principle

Open
#2,498 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

ViewImplis directly depend on viewParts implementation, like:

import { Margin } from 'vs/editor/browser/viewParts/margin/margin';
import { Minimap } from 'vs/editor/browser/viewParts/minimap/minimap';

And keep viewParts private, that make custom Margin, Minimap logic without modify source code impossible.
But for users of this library, it's a natural request that extend the original editor feature by compose/extend the original implementation without touch source code.

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

Start by reading src/vs/editor/browser/view/viewImpl.ts and the imported viewParts implementations, including Margin and Minimap. Trace how ViewImpl owns and constructs these parts, then review the surrounding editor view APIs. Done should be a decided extensibility design that allows custom view-part behavior without modifying the source implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.