microsoft / microsoft/monaco-editor

Documentation of DecorationOptions.minimap.color is misleading - requires hex color, but suggests rgba value

Open
#4,178 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Reproducible in vscode.dev or in VS Code Desktop?
  • Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.43.0#XQAAAAL7AgAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw2TcEZXzoBtNlUc7JzE2-DhoNDFBSkDmlgvjP1KVtLQwdHRjhIeDx49tkFMDLg8b1ZhKomfU-9w2kA_D3MW4_oNk7QIk1mQL85HKSYHkRp3QU9cYcXB43cuykA7hkX15yecdhCcufisaHuhSdCgJIRFeiTdDaFqPDRZYELSIMSCyWgPB_L52XaYR6_FUmpgVVHcNpTwBFUIlRFIaUn_TEu6YEgblbTvRXcvBlrecA2jjlvJnVdG0yN562AJIHaHzf2-CzPlIxoyOubwlDlrKk_-qYc-N3JRDrwcpqJnhiQuhDqXbKNKjvixOMZJJ2mNES7tftCjj8Vz3zgAiuH90D41MoWXNZw2yBUNhyHnRJ91BetX_NCFsp1n41mbJhtHqVpzSXcnVbazCA2IC2pjG8M7DidhfhrL7TWbGwO6tpklBQeJF7RW1S3FvFiMiHYtSmJRmruTROsBtOWYIs4NKgyJ-loR7v47965aW4aws-49QqdPZ7GUihA1lQ2RqueqKnCBR9HGRuuIKHjLHllWWMwY5Pz-raUhXPc5P_Aj5UAA

Monaco Editor Playground Code
var jsCode = [
	'"use strict";',
	"function Person(age) {",
	"	if (age) {",
	"		this.age = age;",
	"	}",
	"}",
	"Person.prototype.getAge = function () {",
	"	return this.age;",
	"};",
].join("\n");

var editor = monaco.editor.create(document.getElementById("container"), {
	value: jsCode,
	language: "javascript",
	minimap: { enabled: true },
});

var decorations = editor.createDecorationsCollection([
	{
		range: new monaco.Range(3, 1, 5, 1),
		options: {
			isWholeLine: true,
			className: "myLineDecoration",
			minimap: {
				color: "rgba(67, 201, 249, 0.8)",
				position: monaco.editor.MinimapPosition.Inline,
			}
		},
	}
]);
.myLineDecoration {
	background: rgba(67, 201, 249, 0.8);
}
Reproduction Steps

No response

Actual (Problematic) Behavior

image

Expected Behavior

show blue color.

Additional Context

No response

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 at the DecorationOptions.minimap.color API documentation and compare its documented value format with the playground example linked in the issue. Update the misleading guidance to require a hex color, then verify the example displays blue in the Monaco Editor playground.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.