From ddd730d9b3442d1dc5ec44ecde864c56a852fd7e Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Mon, 22 Jan 2024 09:53:39 +0100 Subject: [PATCH] Remove some page templates, remove template picker button, update changelog --- plugs/editor/editor.plug.yaml | 4 ++-- web/components/top_bar.tsx | 2 +- web/editor_ui.tsx | 9 --------- website/CHANGELOG.md | 15 +++++++++++++-- website/Library/Core.md | 2 +- website/Library/Core/New Page/Page Template.md | 13 ------------- website/Library/Core/New Page/Snippet Template.md | 12 ------------ website/Library/Core/New Page/Template.md | 10 ---------- website/Manual.md | 1 - 9 files changed, 17 insertions(+), 51 deletions(-) delete mode 100644 website/Library/Core/New Page/Page Template.md delete mode 100644 website/Library/Core/New Page/Snippet Template.md delete mode 100644 website/Library/Core/New Page/Template.md diff --git a/plugs/editor/editor.plug.yaml b/plugs/editor/editor.plug.yaml index 035d9dac..03c1a538 100644 --- a/plugs/editor/editor.plug.yaml +++ b/plugs/editor/editor.plug.yaml @@ -25,14 +25,14 @@ functions: openPageNavigator: path: editor.ts:openPageNavigator command: - name: "Open Page Navigator" + name: "Page Navigator" key: "Ctrl-k" mac: "Cmd-k" openTemplateNavigator: path: editor.ts:openTemplateNavigator command: - name: "Open Template Navigator" + name: "Template Picker" key: "Ctrl-Shift-t" mac: "Cmd-Shift-t" diff --git a/web/components/top_bar.tsx b/web/components/top_bar.tsx index bfe724f7..ea33641c 100644 --- a/web/components/top_bar.tsx +++ b/web/components/top_bar.tsx @@ -66,7 +66,7 @@ export function TopBar({ // Then calculate a new width currentPageElement.style.width = `${ - Math.min(editorWidth - 200, innerDiv.clientWidth - 200) + Math.min(editorWidth - 170, innerDiv.clientWidth - 170) }px`; } } diff --git a/web/editor_ui.tsx b/web/editor_ui.tsx index 3c3809b4..f317ea9e 100644 --- a/web/editor_ui.tsx +++ b/web/editor_ui.tsx @@ -259,15 +259,6 @@ export class MainUI { client.startPageNavigate("page"); }, }, - { - icon: TemplateIcon, - description: `Open template (${ - isMacLike() ? "Cmd-Shift-t" : "Ctrl-Shift-t" - })`, - callback: () => { - client.startPageNavigate("template"); - }, - }, { icon: TerminalIcon, description: `Run command (${isMacLike() ? "Cmd-/" : "Ctrl-/"})`, diff --git a/website/CHANGELOG.md b/website/CHANGELOG.md index 2a7c5c41..15fa6e4c 100644 --- a/website/CHANGELOG.md +++ b/website/CHANGELOG.md @@ -2,12 +2,23 @@ An attempt at documenting the changes/new features introduced in each release. --- + ## Edge _Not yet released, this will likely become 0.6.0. To try this out now, check out [the docs on edge](https://community.silverbullet.md/t/living-on-the-edge-builds/27)._ +* Nothing new yet, be patient but check out 0.6.0 below. + +--- + +## 0.6.0 + * **Templates 2.0**: templates are now turbo charged (that’s a technical term) and have replaced a lot of previously built in (slash) commands. There’s more to this than will fit this CHANGELOG, have a look at [[Templates]]: and more specifically [[Page Templates]], [[Snippets]], [[Live Template Widgets]] and [[Libraries]]. - A quick FAQ: - * **Where did my templates go!?** They have now moved to the [[Template Picker]], see that “T” button up there? Yeah, that’s new. +* **Upgrade instructions**: to get the best experience after upgrading to 0.6.0 do the following: + * Upgrade your docker image/deno version to 0.6.0 + * Reload your page 2-3x to be sure you have the latest front-end code running + * Run the {[Library: Import]} command in your space, and enter the following federation URL: `!silverbullet.md/Library/` This will import both the [[Library/Core]] and [[Library/Journal]] libraries into your space, which will bring you roughly on par with 0.5.x versions in terms of functionality (this will include the daily note, weekly note, various slash commands etc.) +* A **quick FAQ** on the template system + * **Where did my templates go!?** They have now moved to the [[Template Picker]], run {[Template Picker]} (or press `Cmd-Shift-t` on Mac or `Ctrl-Shift-t` on Windows/Linux). Yeah, that’s new! * **Where did all my slash commands go?!** They are now distributed via [[Libraries]]. Yep, Libraries are here, enabling an easier way to distribute templates and pages. Read [[Libraries]] for more info. * **But, what about slash templates etc.?!** Yeah, we did some rebranding and changed how these are defined. Slash templates are now [[Snippets]] and cannot _just_ be instantiated via [[Slash Commands]], but through [[Commands]] and custom keybindings as well. Awesomeness. * **And my page templates broke!?** Yeah, same story as with [[Snippets]]: the format for defining these changed a bit, but should be easy to update to the new format: check [[Page Templates]]. diff --git a/website/Library/Core.md b/website/Library/Core.md index 9cea683f..6b3ef427 100644 --- a/website/Library/Core.md +++ b/website/Library/Core.md @@ -1,6 +1,6 @@ This library is highly recommended for everybody to import immediately. It provides a lot of functionality you’ll likely appreciate (and may be used to having out of the box, if you’re longer-term SilverBullet user). -Some random examples: +Some examples: * [[Table of Contents]] and [[Linked Mentions]] * All the slash commands you know and love, ranging from `/h1` to `/task` to `/table` to `/code` to `/query` to `/template` to `/today` to... * Some useful general purpose pages such as [[Library/Core/Page/Maintenance]], [[Library/Core/Quick Notes]] and [[Library/Core/Page/Template Index]]. diff --git a/website/Library/Core/New Page/Page Template.md b/website/Library/Core/New Page/Page Template.md deleted file mode 100644 index 4f7d40e8..00000000 --- a/website/Library/Core/New Page/Page Template.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -description: Define a new Page Template -tags: template -hooks.newPage: - suggestedName: Library/Personal/Page/ - forPrefix: Library/Personal/Page/ - confirmName: true -frontmatter: | - tags: template - displayName: "|^|" - hooks.newPage: - suggestedName: Library/Personal/Page/ ---- diff --git a/website/Library/Core/New Page/Snippet Template.md b/website/Library/Core/New Page/Snippet Template.md deleted file mode 100644 index b3ea7590..00000000 --- a/website/Library/Core/New Page/Snippet Template.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -tags: template -hooks.newPage: - suggestedName: "template/snippet/" - confirmName: true - forPrefix: template/snippet/ -description: Define a new Snippet Template -frontmatter: | - tags: template - hooks.snippet: - name: "|^|" ---- diff --git a/website/Library/Core/New Page/Template.md b/website/Library/Core/New Page/Template.md deleted file mode 100644 index 10d84e65..00000000 --- a/website/Library/Core/New Page/Template.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -tags: template -description: Define a new template -hooks.newPage: - suggestedName: template/ - forPrefix: template/ -frontmatter: - tags: template ---- -|^| \ No newline at end of file diff --git a/website/Manual.md b/website/Manual.md index ccbce301..da607ed8 100644 --- a/website/Manual.md +++ b/website/Manual.md @@ -22,7 +22,6 @@ SilverBullet’s UI is minimalist by design. Let’s look at the few UI elements * [[Client Modes]] (the 🔄 button) * [[Index Page]] (the 🏠 button) * [[Page Picker]] - * [[Template Picker]] * [[Command Palette]] * The main [[Editor]] component contains your page’s text