Skip to content

feat(templates): drag-to-reorder variations within a pattern#7

Merged
Vaishnav-OM merged 1 commit into
mainfrom
feat/template-variation-reorder
Jun 30, 2026
Merged

feat(templates): drag-to-reorder variations within a pattern#7
Vaishnav-OM merged 1 commit into
mainfrom
feat/template-variation-reorder

Conversation

@Vaishnav-OM

Copy link
Copy Markdown
Contributor

Extends reordering to the sub-templates (variations) inside each pattern, matching the pattern-level drag handles that were also decorative.

  • backend: POST /api/templates/{pattern_id}/variations/reorder updates variation positions in place, preserving ids (a full update replaces the set and churns ids); ownership enforced via _get_owned_pattern.
  • api: reorderVariations(patternId, ids) client.
  • App: handleReorderVariations reorders optimistically, reverts on failure.
  • Templates: native HTML5 drag from each variation's ⠿ handle, scoped to its parent pattern (no cross-pattern moves) with a drop-target highlight.

Extends reordering to the sub-templates (variations) inside each pattern,
matching the pattern-level drag handles that were also decorative.

- backend: POST /api/templates/{pattern_id}/variations/reorder updates
  variation positions in place, preserving ids (a full update replaces the
  set and churns ids); ownership enforced via _get_owned_pattern.
- api: reorderVariations(patternId, ids) client.
- App: handleReorderVariations reorders optimistically, reverts on failure.
- Templates: native HTML5 drag from each variation's ⠿ handle, scoped to its
  parent pattern (no cross-pattern moves) with a drop-target highlight.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Vaishnav-OM Vaishnav-OM merged commit f50eec7 into main Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant