-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Block Grid: Sort mode #20869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Block Grid: Sort mode #20869
Conversation
from Lucide's "arrow-down-up" icon.
with property action and context.
to include the Sorter controller and maintain backwards-compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a "Sort mode" feature for the Block Grid property-editor by creating a reusable @umbraco-backoffice/sorter package. The feature allows users to enter a sorting mode where blocks can be easily rearranged with simplified views. The implementation includes property contexts, actions, and UI components for managing the sort state.
Key changes:
- Created new
@umbraco-backoffice/sorterpackage with property context and actions - Integrated sort mode into Block Grid with toolbar, visual indicators, and simplified block views
- Added icon-sort to icon registry and improved code formatting across multiple components
Reviewed Changes
Copilot reviewed 50 out of 55 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/Umbraco.Web.UI.Client/tsconfig.json |
Updated sorter package path from core/sorter to standalone sorter package |
src/Umbraco.Web.UI.Client/src/packages/sorter/** |
New sorter package with property contexts, actions, controller, and UI components |
src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/** |
Added icon-sort for the sort mode feature |
src/Umbraco.Web.UI.Client/src/packages/core/extension-registry/components/extension-slot/extension-slot.element.ts |
Fixed typo: renamed #renderNoting() to #renderNothing() |
src/Umbraco.Web.UI.Client/src/packages/block/block-grid/** |
Integrated sort mode into Block Grid with manager context, entry elements, and property editor UI |
src/Umbraco.Web.UI.Client/src/packages/block/block/components/block-overlay-expose-button/block-overlay-expose-button.element.ts |
Reformatted render method for better readability |
src/Umbraco.Web.UI.Client/package.json |
Updated sorter export path |
src/Umbraco.Web.UI.Client/src/apps/backoffice/backoffice.element.ts |
Added sorter package import to core packages |
Files not reviewed (1)
- src/Umbraco.Web.UI.Client/package-lock.json: Language not supported
...kages/block/block-grid/components/block-grid-block-inline/block-grid-block-inline.element.ts
Outdated
Show resolved
Hide resolved
...block/block-grid/property-editors/block-grid-editor/property-editor-ui-block-grid.element.ts
Show resolved
Hide resolved
that I'd missed when relocating the package.
|
Important Circular references / illegal imports I'm trying to unpick the illegal imports in the ...or maybe I should put the "sorter" package back inside "core"? 😕 |
…ation Fixed up other code, use of constants and manifest clarity.
Description
Adds the Sort mode property-action feature to the Block Grid property-editor.
In an effort to make these feature reusable with other property-editors, this pull request adds a new
@umbraco-backoffice/sorterpackage, (I originally wanted to name this "sort", but we already had a namespace for "sorter", so in wanting to maintain backwards-compatibility, I have used the existing namespace).For property-editors wanting to implement the Sort mode feature, can register a
sortModeproperty-context for the property-editor, and consume theUMB_SORT_PROPERTY_CONTEXTto detect when sorting mode has been toggled.How to test?
An initial test is to enable Sort mode with the Block Grid property-editor, this is available as a property-action.
Notice that once sort mode has been enabled, the property-action menu label will toggle to "End sort mode", and a toolbar will appear above the Block Grid items (with a button, also labelled "End sort mode").
When sort mode is enabled, the block grid items should switch to use the
umb-block-grid-blockcomponent only, e.g. switching from any inline or custom block-views. To enable a simpler sortable view.