Global 'Snippets'
Snippets should be reusable across multiple Sections.
Imported by an include (we’re thinking a new snippet tag)
Syntax {% include 'snippet', id: 'card-with-image', name: field.name %}
Snippets will be universal across lists, fields, settings and components.
Log in to comment and vote
Comments4
Matt Jones
Jan 5
Also if there is an unsaved snippet and the whole page is pressed, show a warning even if section itself is saved. I know this one will probably be more tricky!
Matt Jones
Dec 4, 2025
The “add snippet” context menu option, should remove “this.” from any detected fields, and should replace the rest of the variable, with the new ID of the field in the pasted snippet code.
Only identify fields where they match the pattern {{ }} and don’t contain “|”.
Optionally, if it doesn’t cause any issues, replace the original copied code from the section, with the new {% include ‘snippet’ %} code including ID and fields - where the value of the fields, is this “this.<section_field>” reference.
If that doesn’t work smoothly, don’t worry too much. Another option would be to automatically add the code to clipboard.
The button “populate” needs to not have a ancestor div which is full width and blocking.
Matt Jones
Dec 4, 2025
When a snippet is unsaved, show the save button blue. When saved, greyed out (disabled)
On the leave popup left should be cancel (grey) and right should be discard (red).
Matt Jones
Dec 2, 2025
Change color of Detect fields button to gray
Maybe re-word Detect fields - delete the brackets (Detect auto)
Fields in snippets won’t use “this.” so make sure that when you click copy button “this” isn’t copied.
When opening a section, don’t show the snippet monaco editor until you either click create or edit? In other words, if everything is closed, don’t show an editor.
When creating a snippet from context dropdown, try and find out why it adds extra tabs?
When clicking back or update, check if there are unsaved fields. And warn you give you an option to leave or save changes.
Don’t automatically add fields when they copy and paste - instead auto do it when the right click create snippet should auto-create the fields.