v0.18.0 #823
chrisvxd
announced in
Announcements
v0.18.0
#823
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Puck 0.18: The new drag-and-drop engine
Puck 0.18 launches a groundbreaking new drag-and-drop engine for page building with advanced CSS layouts.
With native support for CSS grid and flexbox, Puck 0.18 enables powerful new paradigms for creating design-in-browser experiences directly within your Puck application.
Thanks to our contributors and sponsors for making this huge milestone possible.
TLDR
cmd+i
hotkey.position: fixed
: We've removed this pesky style from the default layout so it's easier to embed in your app.Highlights
New drag-and-drop engine
Our flagship feature is a new drag-and-drop engine for Puck with full CSS grid & flexbox support to enable advanced layouts. We call these fluid layouts, and the the change is fully backwards compatible.
Thanks to @clauderic at dnd-kit for all the support in making this possible, and the Puck community for all the feedback! 🙏
Fluid layouts
To implement a fluid layout, add your display property of choice (e.g.
display: flex
) to your DropZone via thestyle
orclassName
props and off you go—Puck will gracefully handle drag-and-drop across all dimensions.See the Multi-column Layouts docs for the full documentation.
Remove wrapping elements
The new
inline
anddragRef
APIs enable you to remove the wrapping element from Puck components entirely, which can be useful if you need to treat your component as a direct descendant of its parent (such as if you need to use CSS properties likeflex-grow
).Here's an example implementing an advanced grid layout, where the children can specify their position using the
grid-column
andgrid-row
properties:Dragging between nested DropZones
The new engine makes it possible to drag between nested DropZones, which resolves one of the longest standing limitations of Puck's drag-and-drop experience.
Dynamic DropZone height
DropZones now shrink to the height of their children so that the preview is a faithful representation of the final output, with a new configurable height when empty.
The
<ActionBar.Label>
componentThe new
<ActionBar.Label>
component enables you to to label areas within a custom ActionBar:Parent selector
A new action allows you to quickly select the component's parent directly from the action bar. Tap the arrow to the left of the component label to jump to the parent.
Toggle interactive hotkey
Make your components interactive directly within Preview mode with the
cmd+i
(orctrl+i
on Windows) hotkey.This can be programatically set via the new
previewMode
parameter on the app state.No more
position:fixed
We've removed this pesky style from the default layout so it's easier to embed in your app. Not much to show here, but let's pour one out for
position:fixed
🥂Breaking changes
Drawer
direction
no longer has any effectThe
direction
prop onDrawer
no longer has any effect. Instead, use it to wrap adiv
with your chosen display mode:Deprecations
index
prop onDrawer.Item
is no longer required and will be removed in a future version.droppableId
prop onDrawer
is no longer required and will be removed in a future version.Full changelog
Features
position: fixed;
from Puck layout (5deb774)Bug Fixes
New contributors
Full Changelog: v0.17.1...v0.18.0
This discussion was created from the release v0.18.0.
Beta Was this translation helpful? Give feedback.
All reactions