Split "Sort Children"-logic to remove "illegal" import from core to packages#19105
Merged
madsrasmussen merged 28 commits intov16/devfrom Apr 23, 2025
Merged
Split "Sort Children"-logic to remove "illegal" import from core to packages#19105madsrasmussen merged 28 commits intov16/devfrom
madsrasmussen merged 28 commits intov16/devfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the sorting functionality for content children to remove illegal dependencies from core modules and introduce a dedicated "sortChildrenOfContent" action for content items.
- Splits the sort children action by moving content-specific logic into a separate entity action and modal.
- Enhances the UmbTable element with a new "sortable" mode that enables drag‐and‐drop with associated visual feedback.
- Adjusts module dependency checks by lowering the ILLEGAL_CORE_IMPORTS_THRESHOLD to tighten the allowed number of illegal core imports.
Reviewed Changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/packages/core/tree/entity-actions/sort-children-of/constants.ts | Adds new export for sort children action kind manifest. |
| src/packages/core/components/table/table.element.ts | Refactors table element to integrate sorting via UmbSorterController and new sortable attributes/styles. |
| src/packages/content/* | Introduces new content tree types, sort children action, modal elements, and manifests for content sorting. |
| src/devops/module-dependencies/index.js | Lowers the allowed illegal core imports threshold from 6 to 5. |
Comments suppressed due to low confidence (1)
src/Umbraco.Web.UI.Client/devops/module-dependencies/index.js:5
- Verify that lowering ILLEGAL_CORE_IMPORTS_THRESHOLD from 6 to 5 is an intentional change, as this stricter threshold might result in unexpected errors if any core module currently relies on a higher number of package imports.
const ILLEGAL_CORE_IMPORTS_THRESHOLD = 5;
Member
nielslyngsoe
left a comment
There was a problem hiding this comment.
Changes looks good, just need to verify that it actually works.
nielslyngsoe
approved these changes
Apr 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the sort-children-of entity action to eliminate the dependency on the
documentandmediamodules from the package. The PR introduces asortChildrenOfContententity action kind that manages the additional orderBynameandcreateDatelogic.Additional code changes
umb-tableelement instead of a custom table. This helps align the UI and provides a common interface for describing table columns and rows. ThesortChildrenOfContentuses this to add additional columns to the defaultsortChildrenOfaction.sortableattribute to theumb-tableelement that sets the table into asortingmode. This makes all rows draggable, and an event is emitted when the sorting is finished.Breaking Changes / Behaviour:
sortChildrenOfentity action now only allows manual drag and drop to change the sort ordercreateDate. This now has the same functionality hassortChildrenOfhad before.