Skip to content

Use theme preference from IDE when embedded instead of preference - #6581

Merged
DanTup merged 3 commits into
flutter:masterfrom
DanTup:fix-theme
Oct 25, 2023
Merged

DanTup merged 3 commits into
flutter:masterfrom
DanTup:fix-theme

Conversation

@DanTup

@DanTup DanTup commented Oct 24, 2023 •

Copy link
Copy Markdown
Contributor

Currently the theme always comes from the preference and ignores what the IDE passes. Since there's no way to un-set the preference (or change it in the UI when embedded) this may prevent it matching the IDE.

This change always uses the IDE preference when embedded. It requires a change in VS Code to pass embed=true when embedding the sidebar since this was missing originally.

Fixes #6580
Fixes #5911

Requires Dart-Code/Dart-Code#4812 in a new Dart-Code release to apply.

Currently the theme always comes from the preference and ignores what the IDE passes. Since there's no way to un-set the preference (or change it in the UI when embedded) this may prevent it matching the IDE.

This change always uses the IDE preference when embedded. It requires a change in VS Code to pass embed=true when embedding the sidebar since this was missing originally.
@DanTup
DanTup requested a review from a team as a code owner October 24, 2023 14:23
@DanTup
DanTup requested review from polina-c and removed request for a team October 24, 2023 14:23
Comment thread packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md Outdated
@@ -16,12 +16,14 @@ final class IdeTheme {
this.foregroundColor,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we even using the backgroundColor and foregroundColor in this class?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, it's used around here:

It only gets set from the querystring if it's dart/light enough (since in VS Code we read it from the theme that we have no control of), and then in the code above we override the colour to that (so that it more closely matches your IDE theme).

@DanTup
DanTup merged commit 5701174 into flutter:master Oct 25, 2023
@DanTup
DanTup deleted the fix-theme branch October 25, 2023 11:42
kenzieschmoll pushed a commit that referenced this pull request Nov 16, 2023
)

* Use theme preference from IDE when embedded instead of preference

Currently the theme always comes from the preference and ignores what the IDE passes. Since there's no way to un-set the preference (or change it in the UI when embedded) this may prevent it matching the IDE.

This change always uses the IDE preference when embedded. It requires a change in VS Code to pass embed=true when embedding the sidebar since this was missing originally.
kenzieschmoll pushed a commit that referenced this pull request Nov 17, 2023
)

* Use theme preference from IDE when embedded instead of preference

Currently the theme always comes from the preference and ignores what the IDE passes. Since there's no way to un-set the preference (or change it in the UI when embedded) this may prevent it matching the IDE.

This change always uses the IDE preference when embedded. It requires a change in VS Code to pass embed=true when embedding the sidebar since this was missing originally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sidebar does not reflect light theme in VS Code IDE themes not working in VS Code

2 participants