Document inline drag-and-drop sorting for lists and relations#260
Merged
Conversation
Documents the inline reordering feature added in wintercms/winter#1491 (issue wintercms/winter#1472): - database/traits.md: complete the HasSortableRelations section (it was an unclosed, incomplete stub) — usage, pivot setup, automatic ordering, setRelationOrder() and isSortableRelation() - backend/lists.md: add the `sortable` list option and a "Reordering records" section - backend/relations.md: add the view-only `sortable` option and a "Reordering relations" section (incl. deferred/unsaved parent support) - backend/reorder.md: note the inline alternatives to the standalone Reorder page Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This comment was marked as resolved.
This comment was marked as resolved.
- Make clear the sort order column must be created by the user (migration);
the trait adds it to the relation's pivot data and applies the order clause,
it does not create the database column.
- Fix the setRelationOrder parameter description ("third argument", not
"second") and use distinct record ids in the explicit-orders example so the
ids and sort order values aren't visually conflated.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
LukeTowers
added a commit
to wintercms/storm
that referenced
this pull request
Jun 19, 2026
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Related: wintercms/winter#1491, wintercms/docs#260, wintercms/winter#1472
LukeTowers
added a commit
that referenced
this pull request
Jun 19, 2026
…defaultSort Follow-up to #260: the inline `sortable` option for lists and relations now raises a configuration error when combined with searching, filtering, pagination, or a custom `defaultSort`, since drag-reordering requires the whole list to be shown in a single fixed order. See wintercms/winter#1491. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
LukeTowers
added a commit
to wintercms/winter
that referenced
this pull request
Jun 19, 2026
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Closes: #1472 Related: wintercms/storm#235, wintercms/docs#260
bennothommo
pushed a commit
to wintercms/wn-backend-module
that referenced
this pull request
Jun 19, 2026
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Closes: wintercms/winter#1472 Related: wintercms/storm#235, wintercms/docs#260
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.
Documents the inline list & relation reordering feature.
Companion PRs: wintercms/winter#1491 (backend implementation) and wintercms/storm#235 (
HasSortableRelationstrait). Tracking issue: wintercms/winter#1472.Changes
database/traits.md— completes the HasSortableRelations section, which was previously an incomplete stub with an unclosed code fence and no method docs. Now covers$sortableRelations, the required pivot column, the automatic pivot/order injection, auto-append on attach, and thesetRelationOrder()/isSortableRelation()methods.backend/lists.md— adds thesortablelist option to the options table and a Reordering records section.backend/relations.md— adds the view-onlysortableoption and a Reordering relations section (including reordering on a not-yet-saved parent via deferred binding).backend/reorder.md— adds a note pointing to the new inline alternatives to the standalone Reorder page.Cross-links between the three backend pages and the trait section use existing anchors (
#sortable,#hassortablerelations,#reordering-records,#reordering-relations).🤖 Generated with Claude Code
Summary by CodeRabbit