Enhancements
Built-in options: bkHiddenGlobally
and bkVisibleLanguages
(#37)
These two new built-in global options allow you to hide a block globally or by language. During editing, blocks that would be hidden are displayed translucent. During regular rendering these blocks won't be rendered at all.
Proxy Mode (#38)
The <BlokkliField>
components now has an new prop called proxy-mode
. When set, instead of using your rendered block components for drag and drop, blökkli will instead render a proxy list containing a simplified view of the nested structure of the field. All interactions during editing are handled via this proxy list.
This is great for blocks that don't render the full markup required to make drag and drop possible, for example image sliders, carousels or other highly interactive components.
Improved Drag and Drop (#40)
Previously, under certain conditions, the rendered drop targets that indicate where a block can be placed could overlap with each other, making it hard or even impossible to use. A new algorithm now tries to find a good alternative location for a drop target if it would otherwise overlap an existing one. It should cover most cases, however for the best experience it's still recommended that you explicitly make sure that your <BlokkliField>
has a min-height or min-width.
Option to close editor after publish (#36)
A new setting called closeAfterPublish
which defaults to true
. If enabled, the editor will automatically close if the publish mutation was successful.
The corresponding Drupal GraphQL mutation field now includes a new argument called createNewState
. This is set to false
when this new setting is enabled. This solves a previous issue where publishing would always create a new empty edit state afterwards.
In addition, the label of the button now changes based on the status of the page. If the page is unpublished the label will use the word save instead, to indicate that the page will not be published by clicking on the button.
Improved options for multi selection (c665390)
When selecting multiple blocks of the same bundle blökkli now displays the value of the options in such a way that it represents the selection. For example, if the card
block defines a radios
option for color:
- If all selected cards have the same color
red
, then this color will be selected - If this is not the case the option will not display any color as selected
Improved artboard scrolling/zooming (#40)
The entire "artboard" feature has been moved to its own library and has been refactored from the ground up. It now supports momentum scrolling and zooming.
New overview overlay (#40)
This displays an abstract view of the page and highlights the visible portion (viewport).
Fallback selection for blocks with height/width of 0 (#39)
Sometimes a block might not render anything, for example if a prop such as an image is missing. In these cases, while there might still be markup in the DOM, its width or height is 0. Previously these blocks were only selectable by either using Tab
to focus them or by using the Structure sidebar pane.
With this change it should now be possible to select these blocks, as blökkli internally sets a minimum size for each block, even if the actual DOM element has a size of 0.
Fixes
- Drop target size/style (18881c4)
- Apply correct drop alignment class (6f12ee8)
- Restore artboard styles (5eebaaf)
- Explicitly pass route.path when starting blökkli (6c870e7)
- Ignore droppable/editable fields when rendered inside proxy field (87e99b7)
- Properly check type of argument (f71e469)
- Registering blocks rendered in a proxy field (f74f5a4)
- Remove duplicate classes (b79c2b9)
- Don't catch error when field can't be found (640eb65)
- Unified min size for drop targets (4076000)
- Set correct checkbox false value when updating option (f95ed47)
- Properly check if there was a diff when updating options (95fae34)
- Properly prevent overlapping drop targets (ae4a748)