Skip to content

Conversation

@DanTup
Copy link
Contributor

@DanTup DanTup commented Oct 2, 2024

This extracts the code that updates the theme (to _updateTheme) and then calls it in response to either a DTD event or a postMessage event. This allows VS Code to update the theme based on where it's embedded (in this video you can see both the sidebar and the embedded DevTools update, but they have slightly different background colors so that they match the rest of the sidebar + editor).

devtools_color_theme_update.mp4

The corresponding Dart-Code work is at Dart-Code/Dart-Code#5297.

Fixes Dart-Code/Dart-Code#4971

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read the Flutter Style Guide recently, and have followed its advice.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or there is a reason for not adding tests.

build.yaml badge

If you need help, consider asking for help on Discord.

This extracts the code that updates the theme (to `_updateTheme`) and then calls it in response to either a DTD event or a postMessage event.

Fixes Dart-Code/Dart-Code#4971
@DanTup DanTup force-pushed the post-message-theme-change branch from d0c0018 to ba88f33 Compare October 2, 2024 18:24
@DanTup DanTup marked this pull request as ready for review October 2, 2024 18:24
@DanTup DanTup requested a review from a team as a code owner October 2, 2024 18:24
@DanTup DanTup requested review from elliette and kenzieschmoll and removed request for a team October 2, 2024 18:24
@DanTup
Copy link
Contributor Author

DanTup commented Oct 2, 2024

@kenzieschmoll this may be easier to review with whitespace changes ignored as I extracted some code to a method which added a bit of noise in the default diff.

@DanTup DanTup merged commit cf2e897 into flutter:master Oct 2, 2024
@DanTup DanTup deleted the post-message-theme-change branch October 2, 2024 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VS Code theme changes do not apply to embedded DevTools until the window is reloaded/recreated

2 participants