Replies: 1 comment
-
|
Moving this to a Discussion in Ideas -- Block Kit layout/sticky options is a feature proposal. Per CONTRIBUTING.md, feature requests need an approved Discussion before a PR. Better venue for shaping the API. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Feature Request
Problem
When building plugin admin pages with Block Kit, there is no way to control the layout of
ActionsBlockelements or make blocks stick to the viewport during scrolling. This limits the UX of plugin pages that need toolbar-like patterns (e.g., tab bars with action buttons).Use case
A plugin admin page uses an
ActionsBlockas a navigation bar with several tab-like buttons and a destructive "Reset" button. Two problems arise:No
justify-betweenlayout onActionsBlock: All buttons are flush-left. There is no way to push the last button to the far-right edge, which would create a clear visual separation between navigation actions and destructive actions.No sticky positioning: When a page has many form fields, the user must scroll back to the top to access the navigation. A sticky bar would keep it always visible.
Current behaviour
ActionsBlockComponentrenders a hardcoded class:BlockRendererwraps each block in a plain<div>with no positioning options:Proposed API additions
1.
layoutproperty onActionsBlockRendering mapping:
"start"(default)justify-start"space-between"justify-between"end"justify-end"center"justify-center2.
stickyproperty onBlockBaseWhen
sticky: true, theBlockRendererwrapper<div>would addsticky top-0 z-10 bg-kumo-app(or similar), pinning the block to the top of the scrollable area.Example usage
Alternatives considered
page:fragments: Only affects the front-end site, not the admin UI.ActionsBlocks in aColumnsBlock: Columns render as equal-width (grid-cols-2/grid-cols-3), so this does not produce a narrow/wide toolbar layout.Impact
These two small additions would unlock toolbar and navigation patterns for all plugins without breaking any existing Block Kit usage (both properties are optional with backward-compatible defaults).
Beta Was this translation helpful? Give feedback.
All reactions