You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Headed toolbar drawers and reusable component configuration editors #358
Studio already uses the shared toolbar and category folders to insert UI components. The proposed screen-editor improvement keeps that toolbar, but needs its expanded categories to be immediately understandable: a visible heading such as Layout, followed by clear buttons showing both an icon and a title.
The current ToolbarFolder already has grid/list modes, direction, animated expansion, Escape dismissal/focus return, and a title used for tooltip/accessibility. Its grid uses compact fixed-size cells and it does not render a visible drawer heading. List labels are useful existing behavior; this request adds the richer palette presentation without replacing it.
Extend the existing toolbar folder/button family, or compose an additive variant, to support:
A visible category header, e.g. Layout, with an accessible close affordance.
Labeled tiles/buttons with a prominent icon and always-visible title, e.g. Stack, Row, Grid, Container. The title must not depend on a tooltip or hover.
A clear, consistently spaced grid with room for titles and localization; do not force the labeled variant into the existing icon-only cell dimensions.
Dragging an item from the drawer onto a consumer's surface while preserving the item's identity/payload and drag lifecycle.
Normal button activation as the non-drag alternative; the consumer decides the insertion target and handles the drop.
Predictable drag, dismissal, cancellation, focus-return, and overlay behavior. Opening or dismissing the drawer must not swallow a drag/drop or accidentally activate the item.
Placement that respects viewport edges and toolbar orientation, including a small screen and a toolbar near an edge.
The drawer should look and behave like part of the existing Cratis toolbar, using existing tokens, stable parts, and styling conventions. Studio owns which categories/items are supplied and what a dropped item creates; Components must remain independent of Scene and Studio business concepts.
Compatibility and related work
Preserve existing icon-only grid and labeled-list behavior by default. Make the richer presentation opt-in. Reuse the toolbar drag-and-drop work from #56, the section/group work from #18, and the keyboard/accessibility direction in #328 and #353; this is not a request to rebuild those capabilities.
Add stable styling parts for the header, item content, icon, and label where existing parts are insufficient. Keep visible strings supplied/localizable through the normal public contracts.
Acceptance criteria
A Storybook example opens a Layout drawer with Stack/Row/Grid/Container as labeled icon tiles.
Both grid/list existing consumers retain their behavior and default appearance.
Tile drag-and-drop delivers the exact item/payload to a sample surface; click/keyboard activation supports equivalent insertion.
Header, close action, labels, focus states, and expanded state are accessible; Escape and focus restoration work.
Mouse, touch/pointer, canceled drag, outside dismissal, and edge placement have appropriate interaction coverage.
Long/localized titles fit without hiding the essential label.
Public types, styling parts, documentation, and examples describe the additive variant and the separation between palette presentation and consumer-owned drop behavior.
The Layout drawer is the first consumer, but the same treatment should work for data, controls, and content categories.
Alongside the headed insertion drawer, support components offering their own configuration experience. A navigation component is the representative case: an ordered item collection with labels, icon selection, destination selection, add/remove, and reorder. Configuration can be constrained by the host when the component belongs to a reusable template.
Shared control responsibilities
Provide reusable ordered-item editing and icon-picker controls, or extend existing suitable controls. Use labeled actions and keyboard/button alternatives to drag reordering.
Support a component-specific editor supplied/registered through an extension seam. Prefer existing descriptors and control contracts; do not require every component to fit a flat generic property grid.
Accept current values, stable item identities, allowed fields/operations, validation feedback, and change callbacks from the host. Show fixed/inherited items separately from configurable local items.
Respect per-operation restrictions: adding items must not imply editing/removing fixed items or changing structure/styles. Exposed label/icon/destination fields may be narrowed independently.
Icon choices use the configured icon catalog and stable identifiers, with accessible names and unavailable-icon feedback. Destination choices are host-supplied; these controls do not implement routing, discover application hierarchies, or execute domain actions.
Keep the actual configuration controls fully readable when the host dims a component's inherited preview. Communicate locked/configurable state through text and accessible state, not opacity alone.
Emit validated edit proposals through the host contract, preserving controlled-value, cancellation, focus and undo integration. The host remains responsible for authoritative permission checks, persistence and template resolution.
Apply normal public styling/localization conventions and cover empty collections, fixed items, narrow panels, long labels, icon choice, reordering and validation errors.
Independent example and acceptance criteria
Use an independently authored Example Project fixture with a fixed Home item and configurable Page A / Page B items; all identifiers and data are synthetic. Demonstrate one host allowing all item operations and a second restricting icon editing or collection operations. Do not embed a consuming application's screens or domain data in examples.
Reusable item editor and icon picker accept capabilities and values through public contracts.
Fixed items cannot be changed; allowed local items can be added, labeled, assigned an icon/host target, removed and reordered.
Restricted fields/operations are enforced in the control and callbacks do not leak unauthorized changes.
Pointer drag, keyboard/button reorder, focus restoration and validation have interaction coverage.
Existing toolbar variants retain their behavior; the original headed Layout drawer remains a deliverable.
Documentation explains component-provided editors versus host-owned template policy, persistence and binding semantics.
Layout palette and property controls must remain extensible
The sample Stack/Row/Grid/Container tiles are illustrative, not an exhaustive built-in list. The drawer and configuration controls must accept the host's complete supported layout catalog and type-specific capabilities through public inputs.
Preserve each supplied type's stable identity and payload through drag/drop and click/keyboard insertion. Do not normalize unknown supplied types to Stack or Grid.
Support distinct property editors for host-defined ordered-flow, grid-placement and freeform-placement capabilities without embedding a layout engine or type registry in these shared controls.
Allow the host to supply supported options, constraints, responsive settings and availability/validation explanations. Structural or template-owned restrictions remain host policy.
Adding a layout type through supported host descriptors must not require editing a hardcoded list inside the drawer.
An independently authored example supplies an additional synthetic layout type and renders its labeled tile and configuration controls without modifying drawer internals.
The correct identity/payload is preserved through all insertion paths; unsupported operations remain unavailable with an explanation.
Existing variants, localized labels, focus behavior and narrow-drawer layouts remain compatible as the catalog grows.
Icon chooser implementation dependency
Use #359 for the reusable icon property control: a popout with search, categories and provider-aware choices, with centered glyphs and visible centered names inside bordered tiles. The initial small permanently expanded grid is only an earlier illustration and is superseded by that interaction.
Configuration editors receive a qualified selected icon reference and host-supplied effective catalog/constraints. Reuse the shared picker rather than implementing another icon browser; preserve field restrictions and controlled callbacks. Icon-library package resolution stays outside these generic controls.
Problem
Studio already uses the shared toolbar and category folders to insert UI components. The proposed screen-editor improvement keeps that toolbar, but needs its expanded categories to be immediately understandable: a visible heading such as Layout, followed by clear buttons showing both an icon and a title.
Parent interaction design: Cratis/StudioIssues#394
The current
ToolbarFolderalready has grid/list modes, direction, animated expansion, Escape dismissal/focus return, and a title used for tooltip/accessibility. Its grid uses compact fixed-size cells and it does not render a visible drawer heading. List labels are useful existing behavior; this request adds the richer palette presentation without replacing it.Source inspected: ToolbarFolder.tsx.
Requested behavior
Extend the existing toolbar folder/button family, or compose an additive variant, to support:
The drawer should look and behave like part of the existing Cratis toolbar, using existing tokens, stable parts, and styling conventions. Studio owns which categories/items are supplied and what a dropped item creates; Components must remain independent of Scene and Studio business concepts.
Compatibility and related work
Preserve existing icon-only grid and labeled-list behavior by default. Make the richer presentation opt-in. Reuse the toolbar drag-and-drop work from #56, the section/group work from #18, and the keyboard/accessibility direction in #328 and #353; this is not a request to rebuild those capabilities.
Add stable styling parts for the header, item content, icon, and label where existing parts are insufficient. Keep visible strings supplied/localizable through the normal public contracts.
Acceptance criteria
The Layout drawer is the first consumer, but the same treatment should work for data, controls, and content categories.
Additional scope: reusable component configuration editors
Alongside the headed insertion drawer, support components offering their own configuration experience. A navigation component is the representative case: an ordered item collection with labels, icon selection, destination selection, add/remove, and reorder. Configuration can be constrained by the host when the component belongs to a reusable template.
Shared control responsibilities
Independent example and acceptance criteria
Use an independently authored Example Project fixture with a fixed Home item and configurable Page A / Page B items; all identifiers and data are synthetic. Demonstrate one host allowing all item operations and a second restricting icon editing or collection operations. Do not embed a consuming application's screens or domain data in examples.
Layout palette and property controls must remain extensible
The sample Stack/Row/Grid/Container tiles are illustrative, not an exhaustive built-in list. The drawer and configuration controls must accept the host's complete supported layout catalog and type-specific capabilities through public inputs.
Preserve each supplied type's stable identity and payload through drag/drop and click/keyboard insertion. Do not normalize unknown supplied types to Stack or Grid.
Support distinct property editors for host-defined ordered-flow, grid-placement and freeform-placement capabilities without embedding a layout engine or type registry in these shared controls.
Allow the host to supply supported options, constraints, responsive settings and availability/validation explanations. Structural or template-owned restrictions remain host policy.
Adding a layout type through supported host descriptors must not require editing a hardcoded list inside the drawer.
An independently authored example supplies an additional synthetic layout type and renders its labeled tile and configuration controls without modifying drawer internals.
The correct identity/payload is preserved through all insertion paths; unsupported operations remain unavailable with an explanation.
Existing variants, localized labels, focus behavior and narrow-drawer layouts remain compatible as the catalog grows.
Icon chooser implementation dependency
Use #359 for the reusable icon property control: a popout with search, categories and provider-aware choices, with centered glyphs and visible centered names inside bordered tiles. The initial small permanently expanded grid is only an earlier illustration and is superseded by that interaction.
Configuration editors receive a qualified selected icon reference and host-supplied effective catalog/constraints. Reuse the shared picker rather than implementing another icon browser; preserve field restrictions and controlled callbacks. Icon-library package resolution stays outside these generic controls.