From 15a6ea8d8d4551f0bc6c0454717fc7c9881ff728 Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Sat, 4 Dec 2021 13:55:52 +0100 Subject: [PATCH] #194 - Optimizations for the markup options --- CHANGELOG.md | 2 +- package.json | 36 +++++++++++++++++++++++++++++++++++- src/commands/Wysiwyg.ts | 5 +++-- src/constants/Extension.ts | 1 + 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c912c4b..505920ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ ### 🐞 Fixes - [#191](https://github.com/estruyf/vscode-front-matter/issues/191): Fix beta settings page -- [#201](https://github.com/estruyf/vscode-front-matter/issues/201): Overflow issue with the media filename +- [#201](https://github.com/estruyf/vscode-front-matter/issues/201): Fix overflow issue with the media filename - [#202](https://github.com/estruyf/vscode-front-matter/issues/202): Fix checkbox label color for light themes ## [5.6.0] - 2021-11-23 diff --git a/package.json b/package.json index aee4d80d..faba76cf 100644 --- a/package.json +++ b/package.json @@ -882,7 +882,7 @@ }, { "command": "frontMatter.markup.heading", - "title": "Codeblock", + "title": "Heading", "category": "Front matter", "icon": { "light": "assets/icons/heading-light.svg", @@ -907,6 +907,11 @@ "dark": "assets/icons/ordered-list-dark.svg" } }, + { + "command": "frontMatter.markup.tasklist", + "title": "Task list", + "category": "Front matter" + }, { "command": "frontMatter.markup.options", "title": "Other markup options", @@ -959,6 +964,31 @@ "group": "navigation@-126", "when": "resourceLangId == markdown && frontMatter:markdown:wysiwyg" }, + { + "command": "frontMatter.markup.orderedlist", + "group": "1_markup@1", + "when": "resourceLangId == markdown && frontMatter:markdown:wysiwyg" + }, + { + "command": "frontMatter.markup.unorderedlist", + "group": "1_markup@2", + "when": "resourceLangId == markdown && frontMatter:markdown:wysiwyg" + }, + { + "command": "frontMatter.markup.tasklist", + "group": "1_markup@3", + "when": "resourceLangId == markdown && frontMatter:markdown:wysiwyg" + }, + { + "command": "frontMatter.markup.code", + "group": "1_markup@4", + "when": "resourceLangId == markdown && frontMatter:markdown:wysiwyg" + }, + { + "command": "frontMatter.markup.codeblock", + "group": "1_markup@5", + "when": "resourceLangId == markdown && frontMatter:markdown:wysiwyg" + }, { "command": "frontMatter.dashboard", "group": "navigation@-98", @@ -1056,6 +1086,10 @@ "command": "frontMatter.markup.orderedlist", "when": "false" }, + { + "command": "frontMatter.markup.tasklist", + "when": "false" + }, { "command": "frontMatter.markup.options", "when": "false" diff --git a/src/commands/Wysiwyg.ts b/src/commands/Wysiwyg.ts index 8391b927..66367c37 100644 --- a/src/commands/Wysiwyg.ts +++ b/src/commands/Wysiwyg.ts @@ -42,8 +42,9 @@ export class Wysiwyg { // Prefix markup subscriptions.push(commands.registerCommand(COMMAND_NAME.heading, () => this.addMarkup(MarkupType.heading))); subscriptions.push(commands.registerCommand(COMMAND_NAME.blockquote, () => this.addMarkup(MarkupType.blockquote))); - subscriptions.push(commands.registerCommand(COMMAND_NAME.unorderedlist, () => this.addMarkup(MarkupType.blockquote))); - subscriptions.push(commands.registerCommand(COMMAND_NAME.orderedlist, () => this.addMarkup(MarkupType.blockquote))); + subscriptions.push(commands.registerCommand(COMMAND_NAME.unorderedlist, () => this.addMarkup(MarkupType.unorderedList))); + subscriptions.push(commands.registerCommand(COMMAND_NAME.orderedlist, () => this.addMarkup(MarkupType.orderedList))); + subscriptions.push(commands.registerCommand(COMMAND_NAME.taskList, () => this.addMarkup(MarkupType.taskList))); // Options subscriptions.push(commands.registerCommand(COMMAND_NAME.options, async () => { diff --git a/src/constants/Extension.ts b/src/constants/Extension.ts index bb179c9d..001311fa 100644 --- a/src/constants/Extension.ts +++ b/src/constants/Extension.ts @@ -44,5 +44,6 @@ export const COMMAND_NAME = { blockquote: getCommandName("markup.blockquote"), unorderedlist: getCommandName("markup.unorderedlist"), orderedlist: getCommandName("markup.orderedlist"), + taskList: getCommandName("markup.tasklist"), options: getCommandName("markup.options"), }; \ No newline at end of file