Repository navigation
Bring the bundled Card API controller up to the converged baseline - #416
Merged
Merged
Conversation
Replace js/cards.js with the canonical controller (md5 20694b4c), byte-identical with core and the other plugins. mactrack adopted the chrome early (#412), so its bundled controller was an older lineage missing the request-generation guard, confirmed card removal, keyboard refocus and the new swap-time expand/collapse preservation. css/cards.css already matched; the controller API is a backward- compatible superset so the mactrack adapter is unaffected. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the Card API controller changes.
No open issues 🎉
What changed in this PR
Updates MacTrack’s bundled Card API controller to the converged shared baseline, improving asynchronous card operations and keyboard navigation without changing PHP or the dashboard adapter.
Changes:
- Discards superseded refresh/resize responses and preserves the live expand/collapse state when replacing cards.
- Waits for host confirmation before removing a card and saving the updated layout.
- Moves keyboard focus to the visible counterpart after expanding or collapsing a card.
| File | Description |
|---|---|
js/cards.js |
Adds request guards, confirmed removal, live expansion-state preservation, and keyboard refocusing. |
Review effort: Balanced
Corrected shared controller (review on core #8700): replaceCard() carries the live expand/collapse state onto refreshed markup only when the user toggled during the request and the fresh card is still expandable; host markup stays authoritative otherwise. Byte-identical with core and the other plugins. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
xmacan
approved these changes
Nov 11, 2026
xmacan
approved these changes
Nov 11, 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.



Bring the bundled Card API controller up to the converged baseline
mactrack adopted the shared card chrome early (#412), before the Card API controller finished converging. Its bundled
js/cards.jsis therefore an older lineage that is missing the hardening the other plugins and core now carry:This replaces
js/cards.jswith the canonical controller (md520694b4c), byte-identical with core (#8683 / #8700) and the other plugin PRs.css/cards.cssalready matched the baseline; the controller API is a backward-compatible superset, so mactrack's adapter is unaffected. JS only — no PHP changed.