Repository navigation
Simplify chart controller presentation lifecycle - #3169
Merged
Merged
Conversation
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.
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#renderaction.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.