Repository navigation
chore(cards): sync js/cards.js with Cacti core Card API controller - #476
Merged
Merged
Conversation
Harmonize the bundled Card API controller with Cacti core (Cacti/cacti#8928): defer a card refresh while a grow or shrink is in flight, target drops by row start, and bind the add-card control once so a re-initialised grid receives added cards. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The changelog entry violates repository guidelines by adding a separate develop section and unsupported dev type instead of an alphabetized issue: entry under --- 5.0 ---.
1 open issue
What changed in this PR
Synchronizes the plugin’s bundled Card API controller with Cacti core’s version from Cacti/cacti#8928, without changing the host adapter contract.
Changes:
- Defers refreshes until pending resizes settle.
- Updates drag-and-drop targeting to use row starts and avoid redundant moves.
- Binds the add-card control once, targeting the most recently initialized grid.
| File | Description |
|---|---|
js/cards.js |
Updates resize/refresh coordination, drop targeting, and add-card binding. |
CHANGELOG.md |
Documents the controller synchronization and behavior fixes. |
Review effort: Balanced
Sync js/cards.js with the Cacti core follow-up: Count the dragged card when resolving the pointer's row and the grid's extent, and only skip it as an insertion candidate, so a card alone in its row no longer jumps up a row while dragged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
xmacan
approved these changes
Dec 1, 2026
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.




Harmonizes
js/cards.jswith the Card API controller in Cacti/cacti#8928 so Cacti core and every plugin that ships the card API use the same file.What changed
cb15a400), so this copy matches Cacti core and the other card-API plugins byte for byte.Tested
node --checkon the updated file.tests/js/cards_controller.test.jsrun against this exact file: 6 passed.Not tested