Changelog
Source:NEWS.md
blockr.dock 0.1.2
-
board_layouts(rv$board)now stays in sync with UI-driven layout changes (panel close/add, drag-resize/rearrange, view CRUD). UI-driven mutations are routed throughupdate(list(views = ...))and applied by newvalidate_board_update.dock_board()andapply_board_update.dock_board()methods, riding the same lifecycle as block/link/stack mutations. Writes are debounced (250 ms) so drag-resize doesn’t thrash. Requiresblockr.core (>= 0.1.3)for the update lifecycle generics.
blockr.dock 0.1.1
CRAN release: 2026-04-29
Added prepend block action.
-
Define multi-view boards by passing a named list to
new_dock_board(layouts = ...):Mark an arrangement as initially active with
dock_layout(..., active = TRUE):layouts = list( Analysis = list("block_1", "block_2"), Overview = dock_layout("dag_extension", active = TRUE) )If none is marked, the first one is used. The board’s
initialise_layoutnormalises each slot to adock_layout(storing the arrangement only), and stores the result as adock_layoutscollection. -
Breaking changes to the layout API:
- Renamed
new_dock_board()’slayoutparameter tolayouts(and the corresponding board field), since boards now hold adock_layoutscollection. - Renamed the board accessor
dock_layout(brd)(and setterdock_layout(brd) <-) toactive_layout(brd)/active_layout(brd) <-. - Renamed
board_views(brd)toboard_layouts(brd), and the corresponding setterdock_layouts(brd) <- valuetoboard_layouts(brd) <- value. -
dock_layoutis now the per-view arrangement type.dock_layout(...)constructs one from a nested list of block / extension IDs and acceptsorientation,sizes, andactivearguments. The previously-exported “fully-resolved”dock_layout(grid + panels wire shape) is gone — panel content is derived from the board’s blocks and extensions on demand at the dockview boundary, so per-view storage shrinks to just the arrangement and panel definitions no longer duplicate across views. - Added
panels(..., active = NULL)for tabbed leaves with an explicit open tab, andgroup(..., sizes = NULL)for nested branches with explicit ratios.dock_layout()itself also acceptssizes =for root-level ratios andorientation =for the top-level split direction. - Removed
dock_view(),dock_grid(),is_dock_grid(), andas_dock_grid(). Usedock_layout(...)(or the newpanels()/group()) for the per-view spec. - Renamed
default_layout()→ and kept the namedefault_layout(). It now returns adock_layout(arrangement only) — the previously-exporteddefault_grid()(panel-ID form) is gone. - Unexported the high-level resolver
create_dock_layout()(renamed internally toresolve_dock_layout()). - Unexported the
dock_layouts()constructor. The user-facing input shape fornew_dock_board(layouts = ...)is a plain named list — thedock_layoutstype is the resolved collection that the board holds internally.is_dock_layouts(),as_dock_layouts(), andvalidate_dock_layouts()remain exported. - Unexported
new_dock_layout(); usedock_layout()instead. - Unexported
view_ids()andview_can_crud(). Both were internal helpers exposed by accident; renamed tolayout_ids()andviews_can_crud()respectively to align with what they operate on. - Wire format for serialised
dock_layoutdecoupled from dockview’s internal tree. The persisted shape is a flattened recursive spec: the top object carriesorientation,children, optionalsizes, and optionalfocus(the panel with current focus); a child is a bare string (single-panel leaf), a{panels, active?}object (tabbed leaf), or a{children, sizes?}object (nested branch). Sizes are ratios (auto-normalised from dockview’s pixel sizes); even splits omitsizes; the default open tab omitsactive; focus on the first leaf omitsfocus.focusround-trips the focused group (dockview’sactiveGroup) by naming a stable panel rather than the regenerated group id. Legacy payloads (with the dockview-shapegridfield) load via a shape-discriminated reader. Producer-version routing is tracked in #153 (depends on blockr.core forwarding...inblockr_deser.list). - Layout conversion API split by boundary. The R object ↔︎ R list boundary uses coercion:
as_dock_layout()coerces adock_layout(identity), aboard(its active layout), or a spec list to adock_layout;as.list()of adock_layoutreturns that spec list. The R object ↔︎ JSON string boundary uses explicit verbs:layout_to_json()/layout_from_json(). Bothas_dock_layout(<list>)andlayout_from_json()take optionalblocks/extensionsto resolve bare IDs and validate.layout_panel_ids()/panel_obj_ids()inspect the panel / object IDs a layout references. The dockview wire format and its converters are not part of the public API — only thedock_layoutobject, our JSON, and the spec list are;as_dock_layout()rejects a dockview grid-shaped list.
- Renamed