-
Notifications
You must be signed in to change notification settings - Fork 36.5k
Add match media change listener in browser ts #143287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add match media change listener in browser ts #143287
Conversation
src/vs/base/browser/dom.ts
Outdated
| import { withNullAsUndefined } from 'vs/base/common/types'; | ||
| import { URI } from 'vs/base/common/uri'; | ||
|
|
||
| export { addMatchMediaChangeListener } from 'vs/base/browser/browser'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this being re-exported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As some things import addMatchMediaChangeListener from dom.ts.
If you prefer I could update all the imports to point at browser.ts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes why not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, sorry for the delay
bpasero
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Arguably even though isStandalone is now dynamic, there are still a few places where we statically call this method on startup and then fail to reconcile the change. But I think your scenario should be covered.
This PR fixes #143197
Logic based on if the window is standalone should be based on if it is currently standalone, rather than if it was standalone when VS Code was started.
This change also moves
addMatchMediaChangeListenerfrom browser.ts to dom.ts so that it can be used in dom.ts without creating a circular dependency.