fix(template-builder): fix drag regression in template builder#35277
fix(template-builder): fix drag regression in template builder#35277
Conversation
…ack to 8.4.0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
❌ Issue Linking RequiredThis PR could not be linked to an issue. All PRs must be linked to an issue for tracking purposes. How to fix this:Option 1: Add keyword to PR body (Recommended - auto-removes this comment)
Why is this required?Issue linking ensures proper tracking, documentation, and helps maintain project history. It connects your code changes to the problem they solve.--- This comment was automatically generated by the issue linking workflow |
|
Claude finished @zJaaal's task in 3m 10s —— View job PR ReviewTasks
SummaryThe core fix (reverting Issues1.
@for (box of row.subGridOpts?.children; track box.id)If any box has 2.
children: newRow?.subGridOpts.children.map((newChild) => {If Pre-existing issue, but the PR adds 3. const oldChild = oldRow.subGridOpts.children.find(
(oldChild) => oldChild.x === newChild.x
);
4. gridstack 8.4.0 bump — changelog not referenced Three minor versions jumped (8.1.1 to 8.4.0). The PR body does not mention what changed or which specific fix in 8.4.0 was needed. Overall: The drag regression fix is correct and |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Screen.Recording.2026-04-09.at.6.19.21.PM.mov |
|
test body |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is kicking off a free cloud agent to fix this issue. This run is complimentary, but you can enable autofix for all future PRs in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 473cf96. Configure here.
…directly in track Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Summary
identifytrack function — removes the method entirely and usesrow.id/box.iddirectly in@fortrack expressions. The previous${id}-${index}approach caused Angular to treat widgets by position rather than identity, desyncing GridStack's DOM during column-between-row drags and leaving the source row empty.8.1.1→8.4.0undefinedoldChildinupdateOldRowswhen a column has moved to a new X position after a dragRelated
Closes #33073
🤖 Generated with Claude Code
Note
Medium Risk
Changes how Angular tracks grid items and updates GridStack dependency, which can affect drag/drop rendering and layout state synchronization.
Overview
Fixes a template-builder drag regression by switching
@fortracking to stablerow.id/box.id(and removing the customidentify()key generator) so GridStack DOM/widget identity stays consistent during cross-row column drags.Hardens
updateOldRowsmerging to avoid crashing/losing state when a column’s previous X position can’t be found (oldChild?.id ?? newChild.id), and bumpsgridstackfrom8.1.1to8.4.0.Reviewed by Cursor Bugbot for commit ab89c85. Bugbot is set up for automated code reviews on this repo. Configure here.