From 76f8316993658d3b287e28bf6e3fec962d8fc62e Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Sun, 28 Apr 2024 17:30:31 +0100 Subject: [PATCH] code: Add icon to toolbar for markdown files that opens the preview Whereas the reStructuredText part of the extension could copy the patterns for previews established by VSCode's markdown support, doing so for markdown files would (surprise, surprise!) create conflicts. So, the toolbar button and command names have been "re-branded" to make them distinct from the built-in markdown ones. The reStructuredText part of the extension keeps its existing keybindings (for now?) and no keybindings have been set for the markdown side. Open for suggestions as to what a good default keybinding could be :) Ref: #780 --- code/changes/780.breaking.md | 1 + code/changes/780.enhancement.md | 1 + code/package.json | 10 +++++----- 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 code/changes/780.breaking.md create mode 100644 code/changes/780.enhancement.md diff --git a/code/changes/780.breaking.md b/code/changes/780.breaking.md new file mode 100644 index 00000000..b41941d8 --- /dev/null +++ b/code/changes/780.breaking.md @@ -0,0 +1 @@ +The `Open Preview to the Side` and `Open Preview` commands have been renamed to `Preview Documentation in Split Window` and `Preview Documentation` respectively. diff --git a/code/changes/780.enhancement.md b/code/changes/780.enhancement.md new file mode 100644 index 00000000..0f556db6 --- /dev/null +++ b/code/changes/780.enhancement.md @@ -0,0 +1 @@ +Esbonio now adds an icon to the editor toolbar that opens the preview in markdown files. diff --git a/code/package.json b/code/package.json index 7a1557da..0061d1a2 100644 --- a/code/package.json +++ b/code/package.json @@ -64,14 +64,14 @@ "commands": [ { "command": "esbonio.preview.open", - "title": "Open Preview", - "icon": "$(preview)", + "title": "Preview Documentation", + "icon": "$(open-preview)", "category": "Esbonio" }, { "command": "esbonio.preview.openSide", - "title": "Open Preview to the Side", - "icon": "$(open-preview)", + "title": "Preview Documentation in Split Window", + "icon": "$(book)", "category": "Esbonio" }, { @@ -418,7 +418,7 @@ "command": "esbonio.preview.openSide", "alt": "esbonio.preview.open", "group": "navigation", - "when": "resourceLangId == restructuredtext" + "when": "resourceLangId == restructuredtext || resourceLangId == markdown" } ] },