From 6263c4baa3909968c037db55a9b992835f5aa3c1 Mon Sep 17 00:00:00 2001 From: Marek Lewandowski Date: Tue, 8 Mar 2022 10:57:07 +0100 Subject: [PATCH 1/6] Changed insert and the preview icons. --- theme/icons/insert.svg | 2 +- theme/icons/previewMode.svg | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/theme/icons/insert.svg b/theme/icons/insert.svg index c7039e4dd..b87e06bf7 100644 --- a/theme/icons/insert.svg +++ b/theme/icons/insert.svg @@ -1 +1 @@ - + diff --git a/theme/icons/previewMode.svg b/theme/icons/previewMode.svg index b87e06bf7..5c941435b 100644 --- a/theme/icons/previewMode.svg +++ b/theme/icons/previewMode.svg @@ -1 +1,7 @@ - + + + + + + + From 7eb5685633be2ce4784a66e20ad4d7ebc21ed0df Mon Sep 17 00:00:00 2001 From: Marek Lewandowski Date: Tue, 8 Mar 2022 10:57:28 +0100 Subject: [PATCH 2/6] Preview icon optimized. --- theme/icons/previewMode.svg | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/theme/icons/previewMode.svg b/theme/icons/previewMode.svg index 5c941435b..cdccfcaf1 100644 --- a/theme/icons/previewMode.svg +++ b/theme/icons/previewMode.svg @@ -1,7 +1 @@ - - - - - - - + From 9e42fd9b997827a5fa00e8f9087bac23a09afc2b Mon Sep 17 00:00:00 2001 From: Marek Lewandowski Date: Tue, 8 Mar 2022 11:04:25 +0100 Subject: [PATCH 3/6] Changed the label for mermaid icon. --- src/mermaidui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mermaidui.js b/src/mermaidui.js index d6958065e..ed9eaaf01 100644 --- a/src/mermaidui.js +++ b/src/mermaidui.js @@ -89,7 +89,7 @@ export default class MermaidUI extends Plugin { const link = 'https://mermaid-js.github.io/mermaid/#/flowchart'; buttonView.set( { - label: t( 'Mermaid info' ), + label: t( 'Read more about Mermaid diagram syntax' ), icon: infoIcon, tooltip: true } ); From 479a8008c63b2f5df85b9a7be8f93fe70341585d Mon Sep 17 00:00:00 2001 From: Marek Lewandowski Date: Tue, 8 Mar 2022 11:07:02 +0100 Subject: [PATCH 4/6] Adjusted icon file name casing. --- src/index.js | 6 +++--- src/mermaidui.js | 6 +++--- tests/index.js | 6 +++--- theme/icons/{previewMode.svg => preview-mode.svg} | 0 theme/icons/{sourceMode.svg => source-mode.svg} | 0 theme/icons/{splitMode.svg => split-mode.svg} | 0 6 files changed, 9 insertions(+), 9 deletions(-) rename theme/icons/{previewMode.svg => preview-mode.svg} (100%) rename theme/icons/{sourceMode.svg => source-mode.svg} (100%) rename theme/icons/{splitMode.svg => split-mode.svg} (100%) diff --git a/src/index.js b/src/index.js index 3f45adb68..963d53929 100644 --- a/src/index.js +++ b/src/index.js @@ -4,9 +4,9 @@ import infoIcon from './../theme/icons/info.svg'; import insertMermaidIcon from './../theme/icons/insert.svg'; -import previewModeIcon from './../theme/icons/previewMode.svg'; -import splitModeIcon from './../theme/icons/splitMode.svg'; -import sourceModeIcon from './../theme/icons/sourceMode.svg'; +import previewModeIcon from './../theme/icons/preview-mode.svg'; +import splitModeIcon from './../theme/icons/split-mode.svg'; +import sourceModeIcon from './../theme/icons/source-mode.svg'; export { default as Mermaid } from './mermaid'; diff --git a/src/mermaidui.js b/src/mermaidui.js index ed9eaaf01..0d9000d58 100644 --- a/src/mermaidui.js +++ b/src/mermaidui.js @@ -6,9 +6,9 @@ import { Plugin } from 'ckeditor5/src/core'; import { ButtonView } from 'ckeditor5/src/ui'; import insertMermaidIcon from '../theme/icons/insert.svg'; -import previewModeIcon from '../theme/icons/previewMode.svg'; -import splitModeIcon from '../theme/icons/splitMode.svg'; -import sourceModeIcon from '../theme/icons/sourceMode.svg'; +import previewModeIcon from '../theme/icons/preview-mode.svg'; +import splitModeIcon from '../theme/icons/split-mode.svg'; +import sourceModeIcon from '../theme/icons/source-mode.svg'; import infoIcon from '../theme/icons/info.svg'; /* global window */ diff --git a/tests/index.js b/tests/index.js index 5f342e3ef..9f33b05cd 100644 --- a/tests/index.js +++ b/tests/index.js @@ -3,9 +3,9 @@ import Mermaid from '../src/mermaid'; import infoIcon from './../theme/icons/info.svg'; import insertMermaidIcon from './../theme/icons/insert.svg'; -import previewModeIcon from './../theme/icons/previewMode.svg'; -import splitModeIcon from './../theme/icons/splitMode.svg'; -import sourceModeIcon from './../theme/icons/sourceMode.svg'; +import previewModeIcon from './../theme/icons/preview-mode.svg'; +import splitModeIcon from './../theme/icons/split-mode.svg'; +import sourceModeIcon from './../theme/icons/source-mode.svg'; describe( 'CKEditor5 Mermaid DLL', () => { it( 'exports MermaidWidget', () => { diff --git a/theme/icons/previewMode.svg b/theme/icons/preview-mode.svg similarity index 100% rename from theme/icons/previewMode.svg rename to theme/icons/preview-mode.svg diff --git a/theme/icons/sourceMode.svg b/theme/icons/source-mode.svg similarity index 100% rename from theme/icons/sourceMode.svg rename to theme/icons/source-mode.svg diff --git a/theme/icons/splitMode.svg b/theme/icons/split-mode.svg similarity index 100% rename from theme/icons/splitMode.svg rename to theme/icons/split-mode.svg From 6f90c0240efbdedabe872e985795774453221a9f Mon Sep 17 00:00:00 2001 From: Marek Lewandowski Date: Tue, 8 Mar 2022 11:11:59 +0100 Subject: [PATCH 5/6] Changed mermaid button to lower case. --- src/mermaidui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mermaidui.js b/src/mermaidui.js index 0d9000d58..f8a8193e4 100644 --- a/src/mermaidui.js +++ b/src/mermaidui.js @@ -52,7 +52,7 @@ export default class MermaidUI extends Plugin { const editor = this.editor; const t = editor.t; - editor.ui.componentFactory.add( 'Mermaid', locale => { + editor.ui.componentFactory.add( 'mermaid', locale => { const buttonView = new ButtonView( locale ); const command = editor.commands.get( 'insertMermaidCommand' ); From 55f684d5a0297dd7c347c2be9c1ef63959f66232 Mon Sep 17 00:00:00 2001 From: Marek Lewandowski Date: Tue, 8 Mar 2022 11:26:58 +0100 Subject: [PATCH 6/6] Adjusted insert icon label. --- src/mermaidui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mermaidui.js b/src/mermaidui.js index f8a8193e4..de7d10ba5 100644 --- a/src/mermaidui.js +++ b/src/mermaidui.js @@ -57,7 +57,7 @@ export default class MermaidUI extends Plugin { const command = editor.commands.get( 'insertMermaidCommand' ); buttonView.set( { - label: t( 'Insert Mermaid' ), + label: t( 'Insert Mermaid diagram' ), icon: insertMermaidIcon, tooltip: true } );