Skip to content

Simplify chart controller presentation lifecycle - #3169

Merged
tabuna merged 1 commit into
masterfrom
fix/chart-controller-simplicity
Oct 22, 2026
Merged

tabuna merged 1 commit into
masterfrom
fix/chart-controller-simplicity

Conversation

@tabuna

@tabuna tabuna commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Chart presentation comes from server-rendered markup. The controller nevertheless observed every optional setting and rebuilt the chart for each attribute mutation. Remove those 25 unused callbacks and keep the four data callbacks, target lifecycle, and explicit chart#render action.

The native Charts builder remains the construction API. Preserve typed Stimulus Values, required labels/datasets, and presence checks so omitted options retain native defaults. Replace the nested gradient ternary with a small getter. Presentation changes now apply on explicit render, a data change, or markup replacement; they no longer trigger rendering independently.

Validation: 17 real Stimulus tests pass. Headless Chromium with Charts 0.0.13 verifies all five chart types, updated data, explicit rendering, target replacement and controller reconnection. Production build and manifest hash/SRI checks pass. Independent review found no blockers. PHP and Blade are unchanged.

CI completed on d8cab32. All 24 PHP/Laravel matrix jobs, chart controller tests, code style, coverage, Composer and spelling pass. The overall suite remains red for existing failures verified against current master: identical Psalm diagnostics, identical Semgrep findings, and NotificationTest::testNotificationBadgeSwitchesToIndicatorForDoubleDigitCounts timing out on the badge selector in Dusk.

@tabuna
tabuna merged commit 03396a3 into master Oct 22, 2026
31 of 35 checks passed
@tabuna
tabuna deleted the fix/chart-controller-simplicity branch October 22, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant