feat(recorder): inspector-driven dark mode for codegen overlay#40865
Open
yury-s wants to merge 1 commit into
Open
feat(recorder): inspector-driven dark mode for codegen overlay#40865yury-s wants to merge 1 commit into
yury-s wants to merge 1 commit into
Conversation
The injected codegen overlay (toolbar, tooltip, action dialog, assert-text editor) now follows the inspector's Theme setting (Auto / Dark mode / Light mode). Plumbing: inspector setting -> `useDocumentTheme()` -> `backend.setOverlayTheme` -> server `Recorder._overlayTheme` -> `UIState.overlayTheme` (polled) -> injected `Highlight.setOverlayTheme`, which toggles `:host(.dark-mode)` on the glass pane. "Auto" is resolved in the inspector against its own `prefers-color-scheme`; the wire protocol only carries concrete `dark-mode` / `light-mode`. Builds on microsoft#40863.
f35093a to
2f69907
Compare
Member
|
Is there an issue? (this one is closed) |
| private _mode: Mode; | ||
| private _highlightedElement: { selector?: string, ariaTemplate?: AriaTemplateNode } = {}; | ||
| private _overlayState: OverlayState = { offsetX: 0 }; | ||
| private _overlayTheme: OverlayTheme = 'light-mode'; |
Member
There was a problem hiding this comment.
We already have a state object one line above.
| language: Language; | ||
| testIdAttributeName: string; | ||
| overlay: OverlayState; | ||
| overlayTheme?: OverlayTheme; |
| return [theme, setTheme]; | ||
| } | ||
|
|
||
| export function useDocumentTheme(): DocumentTheme { |
Member
There was a problem hiding this comment.
What is the difference between this one and the one above?
Contributor
Test results for "MCP"7099 passed, 1104 skipped Merge workflow run. |
Contributor
Test results for "tests 1"3 flaky41906 passed, 850 skipped Merge workflow run. |
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
prefers-color-scheme) and pushed as concretedark-mode/light-modeto the page; the overlay just toggles:host(.dark-mode)on the glass pane.