Releases: clay/clay-kiln
compilation-compatibility
- FEATURE: auto-mount
model.js
and_kiln-plugins.js
if they exist (used withclaycli
's compilation pipeline) - fixed syntax error in
magic-button
transform promise handling
magical-promises
- FEATURE: allow
magic-button
transforms to use promises - FEATURE: allow
_reveal
inmagic-button
configuration
widescreen-preview
- increased the width of the "large" preview (thanks, @zonika!)
deep-focus
- FEATURE: when loading the new page list, automatically open the category of the last-used page template
- FEATURE: add
length-equals
,length-less-than
, andlength-greater-than
comparators, usable in_reveal
,required
validation, and other places where comparators are used (thanks, @yuliyv!) - FEATURE: allow deep-links to set field focus (more deets below)
- FEATURE: added
initialFocus
to standardinput
props - FEATURE: clicking validation now goes directly to the section/tab and focuses the relevant field in forms
- FEATURE: added
redirectTo
to simple-modal config (more deets below) - fixed issue with validation links referencing site-specific fields
- fixed issue where
_lists
were being cleared when set to a pending state (e.g. when updating them) - fixed issue where new page categories were being stripped of punctuation when saving
More Deets
FEATURE: Add individual field focus to the deep linking system
This allows deep-linking to individual fields, rather than just linking to forms. When a form is opened, the relevant field will be focused (and the section its in will be switched to, when applicable). This is backwards compatible with our current deep-linking, and fixes a number of issues with field autofocus (if you aren't explicitly focusing a field, the first field in the form will now be focused, which also works with complex-lists).
Deep links with focus look like this (note: this is linking to a specific item inside a complex-list):
#image~cjjess29h00133i64jmqkhf08~settings~content.1.imageUrl
One side effect of this is that clicking validation issues will now go to the correct section tab and focus on the relevant field, rather than making the end-user click around a complex form looking for it.
Also fixed a bug where site-specific fields weren't opening the full form (they were opening small forms with only that specific field in them) from validation issues.
FEATURE: Allow redirecting to forms after closing simple modals
When calling store.dispatch('openModal', config)
you may now specify a config.redirectTo
object with { uri, path, field }
which will trigger a specific form to open when the modal closes. The uri
and path
are for the form, and the field
is the specific field that should be focused. This is great for pickers and other attached buttons in complex-list items, as you can see below:
Dev / Modder Notes:
Individual inputs
now get an initialFocus
prop (along with name
, data
, schema
, and args
) which will be the path for the field that should be focused. If your input can be focused (text, buttons, etc), please do a quick check on $mount
against the name
prop to see if your input
should focus itself. Because inputs are varied (and may be complicated), this is left to individual inputs to deal with.
numerical-emptiness
- fix error when using filterable-lists with items that have duplicate keys (which you shouldn't do, but it shouldn't break the lists)
- fix issue when validating the emptiness of numerical inputs (NaN / null handled correctly)
- update min/max error messages to take into account value, not just length
- add docs for custom validators + reveal edge cases
comparative-propagation
- FEATURE: open publishing to health tab if there are warnings, not just errors
- FEATURE: always clone child refs when creating components
- FEATURE: when filtering clay menu by scheduled/published, sort by scheduled/published dates (rather than latest updated)
- add docs around min/max vs required validation
- add docs for layout editing
- resize forms when opening/closing
select
dropdowns (prevents overflow bug) - allow empty option in
select
inputs to be called "None" or "Default" - enable
required
validator to compare against multiple values, like_reveal
can (thanks, @zonika!)
lovely-lists
Kiln v7.x includes a completely rewritten filterable-list
system, including breaking API changes that simplify it and add much-needed functionality.
Filterable Lists
The new filterable lists allow arbitrary secondary actions (instead of just settings and remove), have rock-solid keyboard support, and use Vue custom events rather than passing functions as props! They also support expanded items, allowing for categories and and other interesting organizational options.
Properties:
content
- array of objects withid
,title
, and optionallychildren
secondaryActions
- array of objects withicon
,tooltip
,action
(that happens on click),enable
(that determines if the button should display) (icon
andtooltip
may be functions that getid
of the items as their first argument)header
- string with a header title. setting this will display column headers in the listaddTitle
- string with a custom title for the add buttonaddIcon
- string with a custom icon for the add buttonfilterLabel
- string with a custom label for the filter inputfilterHelp
- string with custom help text for the filter inputinitialExpanded
-id
of the root-level item that should be expanded when the list is displayed
Events:
@reorder
- will be called when items are reordered. adding this listener will make the list reorderable, but prevent filtering. Note that reordering items with children is currently unsupported@root-action
- called when root-level items are clicked, orenter
has been pressed after they're navigated to via the keyboard@child-action
- similar to@root-action
, but called on child items. adding this listener will enable expanding/collapsing of root items (if they have children)@add
- called when add button is clicked. adding this listener will display the add button
New Page Templates
The New Page Templates list has been completely rewritten, and page templates are now in categories! When adding a page to the list, you must select a category to put it in. Legacy (uncategorized) lists will be automatically added to a "General" category.
Filtering by the name of a root-level item will display all children:
When adding a page template, categories will be autosuggested:
Component Bookmarks
When adding components, you may clone the default data of a component or clone a specific instance. These instances are saved via the bookmark button in the component selector. Only components with _allowBookmarks: true
in their schema can have bookmarks, and only admins will see the bookmark button.
Admins can remove bookmarks from the list:
Filtering by child items will only display relevant matches:
Other updates
FINISHED_DECORATING
andADD_PAGE_TEMPLATE
vanity mutations added, for plugins- docs updated with new placeholders from the layout editing update
beta-lists-2
implemented feedback from initial round of QA #1265
beta-lists
testing kiln v7.x with new filterable lists #1259
reverential-referential
- fix issue unearthed by v6.10.3 where data was being passed by reference into
model.save
/model.render
functions, mutating it at the same time it was going through the queue