Repository navigation
fix(workspace): adapt SQL toolbar background to active theme and invalidate pane cache (#1577) - #1658
Merged
Merged
Conversation
…lidate pane cache (#1577)
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.
Summary
Fixes an issue where the SQL workspace toolbar retained a dark background in light themes (#1577).
Root Causes & Fixes
GenericSqlWorkspaceState._buildSessionPane, the toolbar container decoration was evaluated once at pane construction time and cached in_paneCache, preventing it from rebuilding when theme tokens changed while child controls dynamically adapted to light theme. Introduced_SqlWorkspaceToolbarContainerwhich dynamically obtainsSqlEditorChrome.sqlToolbarDecoration(context)during build.didChangeDependenciestoGenericSqlWorkspaceStateto invalidate_paneCachewhenever the ambientQueryaThemeScopeupdates.SqlEditorChrome.sqlToolbarDecorationto use solidworkbench.surfaceinstead of semi-transparentworkbench.surface.withValues(alpha: 0.85)so background layers cannot bleed through or darken light theme surfaces.ThemeController.setThemeMode, clear conflicting registry themes when switching brightness so light mode cleanly aligns active preset and tokens.Verification
flutter test test/features/workspace/sql_workspace_toolbar_test.dart test/features/workspace/sql_editor_chrome_test.dart test/features/workspace/generic_sql_workspace_sessions_test.dart test/core/theme/theme_controller_test.dart(all passed)flutter test test/core/theme/(218 tests passed)flutter analyze(0 issues found)Closes #1577