Skip to content
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

Use active theme colors for styled text in the debug console #71458

Merged
merged 17 commits into from
May 24, 2019

Conversation

iansan5653
Copy link
Contributor

@iansan5653 iansan5653 commented Mar 29, 2019

Draft because I'm not able to run tests / compile on this machine at the moment, but the code is pretty much done and ready for input.

A problem with this approach is that after text is logged, if the user changes the theme, the logged text won't change color. One thing I considered was keeping the CSS rules but with CSS variables and dynamically changing the variables, but that seemed like it was introducing a lot of unnecessary complexity for an issue that isn't even much of an issue at all (the debug console is cleared often anyway).

Will fix #63986 and fix #42388.

@isidorn
Copy link
Contributor

isidorn commented Apr 1, 2019

@iansan5653 ok, let me know when you ran all the tests and they are good.
Did you consider listening onThemeChange and just refreshing the whole repl tree, so the colors get updated. Basically onThemeChange just schedule a refreshScheduler

@iansan5653
Copy link
Contributor Author

@isidorn I've gotten everything working, except the tests are failing for apparently no reason. I think it's because the IThemeService instantiated in the test file isn't working. I'm using:

themeService = new TestThemeService();

Is this the correct way to do it for tests?

@isidorn
Copy link
Contributor

isidorn commented Apr 18, 2019

@iansan5653 that's the proper way to create a TestThemeService.
I can see the more precise errors here https://github.com/Microsoft/vscode/pull/71458/checks?check_run_id=104419801
Check them out.
Maybe you need to improve the TestThemeService, not sure where it exactly fails.
Debug the tests, we even have a launch configuration that runs the unit tests.

Screenshot 2019-04-18 at 10 33 52

@iansan5653
Copy link
Contributor Author

Yeah, I've been trying to fix those for a while now. I know the class is being applied because when I compile and run it, I can see the class in the developer tools. I just don't know why the assertion is failing. I'll keep trying to resolve.

@isidorn
Copy link
Contributor

isidorn commented Apr 18, 2019

@iansan5653 If you do not figure it out, I can look in two weeks when I should have more time.

@iansan5653 iansan5653 marked this pull request as ready for review April 22, 2019 03:32
@isidorn
Copy link
Contributor

isidorn commented Apr 25, 2019

Thanks a lot. However we are currently in endgame before the release which means we only accept a limited set of changes. Due to that assigning this to May when I plan to merge it (in about 10 days)

@isidorn isidorn added this to the May 2019 milestone Apr 25, 2019
@isidorn isidorn merged commit faa8a49 into microsoft:master May 24, 2019
@isidorn
Copy link
Contributor

isidorn commented May 24, 2019

Thanks a lot for this PR. And sorry for merging with a bit of a delay.

@iansan5653
Copy link
Contributor Author

No problem! Thanks for the advice and the merge.

@iansan5653 iansan5653 deleted the themed-debug-colors branch June 10, 2019 13:26
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support high intensity ansi colours in debug console Debug Console should use theme-defined red/green colors
2 participants