-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Culture and Hostnames: Add ability to sort hostnames (closes #20691) #20826
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?
Conversation
…able to drag the hostname elements around to sort them
… look better. Added a description for the Culture section. Alligned the rendered text to allign better with the name "Culture and Hostnames"
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 restores the ability to drag-and-drop reorder Culture and Hostnames entries (previously available in v13) by implementing the UmbSorterController. It also updates UI terminology from "domain/domains" to "hostname/hostnames" for better alignment with the feature name "Culture and Hostnames".
Key Changes:
- Implemented
UmbSorterControllerfor drag-and-drop sorting of hostname entries - Extended the backend's
DomainPresentationModelwith a localUmbDomainPresentationModelinterface that includes auniqueproperty for tracking items during sorting - Updated all UI strings from "domain" to "hostname" terminology across the English language file
- Refactored the modal layout to use
umb-property-layoutcomponents for consistency
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/culture-and-hostnames/modal/culture-and-hostnames-modal.element.ts |
Implements UmbSorterController for drag-and-drop functionality, adds unique ID tracking for hostname items, refactors render methods to support sorting with visual feedback |
src/Umbraco.Web.UI.Client/src/assets/lang/en.ts |
Updates all UI terminology from "domain/domains" to "hostname/hostnames" for consistency with the "Culture and Hostnames" feature naming |
.../documents/entity-actions/culture-and-hostnames/modal/culture-and-hostnames-modal.element.ts
Outdated
Show resolved
Hide resolved
.../documents/entity-actions/culture-and-hostnames/modal/culture-and-hostnames-modal.element.ts
Outdated
Show resolved
Hide resolved
.../documents/entity-actions/culture-and-hostnames/modal/culture-and-hostnames-modal.element.ts
Outdated
Show resolved
Hide resolved
…ity-actions/culture-and-hostnames/modal/culture-and-hostnames-modal.element.ts Forgot to remove this after I was done testing Co-authored-by: Copilot <[email protected]>
…ity-actions/culture-and-hostnames/modal/culture-and-hostnames-modal.element.ts Changing grid-gap to just gap Co-authored-by: Copilot <[email protected]>
…eded. Removed the conditional rendering that was attached to the readonly and disabled properties
madsrasmussen
left a comment
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.
Great! The changes look good, only a few comments, and the feature works as expected.
.../documents/entity-actions/culture-and-hostnames/modal/culture-and-hostnames-modal.element.ts
Outdated
Show resolved
Hide resolved
.../documents/entity-actions/culture-and-hostnames/modal/culture-and-hostnames-modal.element.ts
Outdated
Show resolved
Hide resolved
.../documents/entity-actions/culture-and-hostnames/modal/culture-and-hostnames-modal.element.ts
Outdated
Show resolved
Hide resolved
… to target the hostname-item class instead
|
I expect you've seen, but in case not, looks like this has caused a failing test - likely as the test was relying on some UI that's changed. |
Fixes #20691
Added the sorter controller and implemented it for the hostname/domain elements.
You are now able to drag the hostname elements around to sort them like in v13.
There has also been some cleanup in the HTML to make it more concise.
Changed the naming shown in UI to align better with the naming "Culture and Hostnames"
Instead of it being called domain/domains, it is now referred to as hostname/hostnames.