From 143d390895d45a4f7bac56a74c1bd10028a84f6a Mon Sep 17 00:00:00 2001 From: Gazook89 <58999374+Gazook89@users.noreply.github.com> Date: Sat, 14 Aug 2021 19:50:12 -0500 Subject: [PATCH 01/69] Add "Style Editor" menu to Style pane And other tweaks: - Move drop caps snippets to Style Editor menu - retitle Editor menu to either Text Editor or Style Editor - minor: removed old unnecessary comments in code from earlier (my own). - Removed leading spaces on drop cap comment - added drop cap comment on "remove drop caps" snippet. --- .../editor/snippetbar/snippets/snippets.js | 47 ++++++++++++------- 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippets/snippets.js b/client/homebrew/editor/snippetbar/snippets/snippets.js index a4c47d765..b8116d40d 100644 --- a/client/homebrew/editor/snippetbar/snippets/snippets.js +++ b/client/homebrew/editor/snippetbar/snippets/snippets.js @@ -12,7 +12,7 @@ const dedent = require('dedent-tabs').default; module.exports = [ { - groupName : 'Editor', + groupName : 'Text Editor', icon : 'fas fa-pencil-alt', view : 'text', snippets : [ @@ -91,34 +91,45 @@ module.exports = [ icon : 'fas fa-book', gen : TableOfContentsGen }, + { + name : 'Add Comment', + icon : 'fas fa-code', + gen : dedent`\n + + ` + }, + ] + }, + { + groupName : 'Style Editor', + icon : 'fas fa-pencil-alt', + view : 'style', + snippets : [ { name : 'Remove Drop Cap', icon : 'fas fa-remove-format', - gen : '' + gen : '/* Removes Drop Caps */\n' + + '.phb3 h1+p:first-letter {\n' + + ' all: unset;\n' + + '}\n' }, { name : 'Tweak Drop Cap', icon : 'fas fa-sliders-h', - gen : '' + gen : '/* Drop Cap settings */\n' + + '.phb3 h1 + p::first-letter {\n' + + ' float: left;\n' + + ' font-family: SolberaImitationRemake;\n' + + ' font-size: 3.5cm;\n' + + ' color: #222;\n' + + ' line-height: .8em;\n' + + '}\n' }, { name : 'Add Comment', - icon : 'fas fa-code', /* might need to be fa-solid fa-comment-code --not sure, Gazook */ + icon : 'fas fa-code', gen : dedent`\n - + /* This is a comment that will not be rendered into your brew. Hotkey (Ctrl/Cmd + /). */ ` }, ] From 84698aa68fc51ef10fd60e730669a28a72d97b4f Mon Sep 17 00:00:00 2001 From: Gazook89 <58999374+Gazook89@users.noreply.github.com> Date: Sat, 14 Aug 2021 20:18:11 -0500 Subject: [PATCH 02/69] Match changes in commit 143d390 to Legacy Matching legacy to v3 (adds another menu to style editor, etc). --- .../snippetbar/snippetsLegacy/snippets.js | 45 ++++++++++++------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippetsLegacy/snippets.js b/client/homebrew/editor/snippetbar/snippetsLegacy/snippets.js index b9cf865a9..fe1fa87f6 100644 --- a/client/homebrew/editor/snippetbar/snippetsLegacy/snippets.js +++ b/client/homebrew/editor/snippetbar/snippetsLegacy/snippets.js @@ -11,7 +11,7 @@ const TableOfContentsGen = require('./tableOfContents.gen.js'); module.exports = [ { - groupName : 'Editor', + groupName : 'Text Editor', icon : 'fas fa-pencil-alt', view : 'text', snippets : [ @@ -78,33 +78,44 @@ module.exports = [ icon : 'fas fa-book', gen : TableOfContentsGen }, + { + name : 'Add Comment', + icon : 'fas fa-code', + gen : `\n\n\n` + } + ] + }, + + + { + groupName : 'Style Editor', + icon : 'fas fa-pencil-alt', + view : 'style', + snippets : [ { name : 'Remove Drop Cap', icon : 'fas fa-remove-format', - gen : '' + gen : '/* Removes Drop Caps */\n' + + '.phb h1+p:first-letter {\n' + + ' all: unset;\n' + + '}\n' }, { name : 'Tweak Drop Cap', icon : 'fas fa-sliders-h', - gen : '' + gen : '/* Drop Cap Settings */\n' + + '.phb h1 + p::first-letter {\n' + + ' float: left;\n' + + ' font-family: Solberry;\n' + + ' font-size: 10em;\n' + + ' color: #222;\n' + + ' line-height: .8em;\n' + + '}\n' }, { name : 'Add Comment', icon : 'fas fa-code', - gen : `\n\n\n` + gen : `\n/* This is a comment that will not be rendered into your brew. Hotkey (Ctrl/Cmd + /). */\n\n` } ] }, From 4653fcd7821f9ed4fb6bcc7bddb6a7d3b15a7ed1 Mon Sep 17 00:00:00 2001 From: Gazook89 <58999374+Gazook89@users.noreply.github.com> Date: Sat, 14 Aug 2021 20:24:51 -0500 Subject: [PATCH 03/69] Remove reference to hotkeys in Style Comments Removed reference to hotkeys for commenting in the Style Editor since that is not implemented yet. can be added back to match the Text Editor commenting snippet once implemented. --- client/homebrew/editor/snippetbar/snippets/snippets.js | 2 +- client/homebrew/editor/snippetbar/snippetsLegacy/snippets.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippets/snippets.js b/client/homebrew/editor/snippetbar/snippets/snippets.js index b8116d40d..53c41fc63 100644 --- a/client/homebrew/editor/snippetbar/snippets/snippets.js +++ b/client/homebrew/editor/snippetbar/snippets/snippets.js @@ -129,7 +129,7 @@ module.exports = [ name : 'Add Comment', icon : 'fas fa-code', gen : dedent`\n - /* This is a comment that will not be rendered into your brew. Hotkey (Ctrl/Cmd + /). */ + /* This is a comment that will not be rendered into your brew. */ ` }, ] diff --git a/client/homebrew/editor/snippetbar/snippetsLegacy/snippets.js b/client/homebrew/editor/snippetbar/snippetsLegacy/snippets.js index fe1fa87f6..2ec29746c 100644 --- a/client/homebrew/editor/snippetbar/snippetsLegacy/snippets.js +++ b/client/homebrew/editor/snippetbar/snippetsLegacy/snippets.js @@ -115,7 +115,7 @@ module.exports = [ { name : 'Add Comment', icon : 'fas fa-code', - gen : `\n/* This is a comment that will not be rendered into your brew. Hotkey (Ctrl/Cmd + /). */\n\n` + gen : `\n/* This is a comment that will not be rendered into your brew. */\n\n` } ] }, From bdfcde766136970f7520e4dee677d37b437c6d83 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 17 Aug 2021 20:23:26 +1200 Subject: [PATCH 04/69] Fix issue with /