Skip to content

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

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.

🟢 Approval recommended

No active review issues are recorded for the Card API controller synchronization.

No open issues 🎉

What changed in this PR

Aligns Syslog’s bundled Card API controller with Cacti core’s changes in Cacti/cacti#8928 while preserving the existing adapter contract.

Changes:

  • Defers refreshes until pending card resizes settle.
  • Targets drag-and-drop positions by row start so taller cards do not capture drops intended for later rows.
  • Binds the add-card control once and routes it to the most recently initialized grid.
File Description
js/​cards.js Updates resize/refresh coordination, drop targeting, and add-card event handling.
CHANGELOG.md Records the controller synchronization and its behavior changes.

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>
@sonarqubecloud

sonarqubecloud Bot commented Dec 1, 2026

Copy link
Copy Markdown

@TheWitness
TheWitness merged commit 8e128f7 into develop Dec 1, 2026
11 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