Skip to content

chore(cards): sync js/cards.js with Cacti core Card API controller - #476

Merged
TheWitness merged 2 commits into
developfrom
chore/harmonize-cards-js
Dec 1, 2026
Merged

TheWitness merged 2 commits into
developfrom
chore/harmonize-cards-js

Conversation

@TheWitness

@TheWitness TheWitness commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Harmonizes js/cards.js with 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

Tested

Not tested

  • Not checked in a browser on a running Cacti page.

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>
Copilot AI balanced review requested due to automatic review settings December 1, 2026 19:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread CHANGELOG.md Resolved
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>
@sonarqubecloud

sonarqubecloud Bot commented Dec 1, 2026

Copy link
Copy Markdown

@TheWitness
TheWitness merged commit 49b633f into develop Dec 1, 2026
9 checks passed
@TheWitness
TheWitness deleted the chore/harmonize-cards-js branch December 1, 2026 20:49
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.

3 participants