-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fixed: #5978 support theming-webview-content #5981
Conversation
next we just get the current theme to replace. |
|
emm but how to call it in this file |
You can search for There is a static For instance: const theme: Theme = ThemeService.get().getCurrentTheme(); |
@vince-fugnitto
|
Always import from |
06fcf18
to
a5f0eff
Compare
@502647092 can you provide the example |
@vince-fugnitto |
The backend ( |
ok |
@akosyakov |
@502647092 It is not possible from plugin host process. We will need to do it differently somehow. btw we should check that when a user changes the theme that webviews gets updated. With a suggested approach it seems to be written only once. |
maybe we can add some event to handle |
@olexii4 Maybe you have an idea how it could be handled? |
@akosyakov |
@502647092 you can try, i need to think about it a bit, unfortunately no time today :( |
@olexii4 @502647092 i had an idea, you will need to have a look how to implement it in the code: There should be a communication channel between host window and iframe window, we could set an initial theme in the iframe window and notify about theme changes using it. In this approach you don't need to rewrite any html. |
Signed-off-by: MiaoWoo <admin@yumc.pw>
@akosyakov |
@vince-fugnitto @akosyakov @theia-ide/plugin-system |
maybe I need move code to plugin-ext-vscode |
@akosyakov we can merge theme support first |
probably it will be good, but this code is not extensible, so fine with me for now. @olexii4 @theia-ide/plugin-system do you know whether it is desirable? how could it be achieved? I'm testing it now, if everything is fine and noone objects merging tomorrow. |
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.
It works nicely for me.
Signed-off-by: MiaoWoo admin@yumc.pw
What it does
Fixed: #5978
How to test
baidu.http
Review checklist
Reminder for reviewers