fix: re-mount canvas CanvasProvider on breadcrumb navigation so custom themes apply#9137
Open
fix: re-mount canvas CanvasProvider on breadcrumb navigation so custom themes apply#9137
CanvasProvider on breadcrumb navigation so custom themes apply#9137Conversation
…tom themes apply
Canvas pages keyed their component tree only on `runtimeClient.instanceId`, which
doesn't change when navigating between canvases in the same project. This meant
breadcrumb navigation reused the old `CanvasProvider` tree and the destination
canvas's theme was never initialised.
Include `canvasName` in the `{#key}` expression (matching the pattern explore pages
already use with `{#key exploreName}`) so the entire provider tree re-mounts on
every canvas switch. Also clear the `themeManager` CSS-variable cache inside
`ThemeProvider` whenever theme CSS changes, preventing stale colour lookups in
chart specs.
Closes [APP-813](https://linear.app/rilldata/issue/APP-813)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
043885d to
d5c46e4
Compare
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.
instanceId, so breadcrumb navigation between canvases never re-mounted the provider tree — the destination canvas's theme was never initialisedcanvasNamein the{#key}expression (matching explore pages'{#key exploreName}pattern) across cloud, local, and embed canvas routesthemeManagerCSS-variable cache inThemeProviderwhenever theme CSS changes, preventing stale colour lookups in chart specsCloses APP-813
Checklist
Developed in collaboration with Claude Code