microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.83k stars 29.5k forks source link

`testing.coverCountBadgeForeground` color token is not functional #212479

Closed KingOfTac closed 6 months ago

KingOfTac commented 6 months ago

Type: Bug

The testing.coverCountBadgeForeground currently does not do anything leaving some color themes unreadable when using the coverage API.

Related issue for the color theme used https://github.com/ykrx/lightbulb/issues/6

VS Code version: Code 1.89.1 (Universal) (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:14:24.611Z) OS version: Darwin arm64 23.4.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M2 Max (12 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|2, 2, 2| |Memory (System)|64.00GB (19.93GB free)| |Process Argv|--crash-reporter-id d7850b24-73d0-4428-9a7a-dfab1218e842| |Screen Reader|no| |VM|0%|
Extensions (50) Extension|Author (truncated)|Version ---|---|--- better-comments|aar|3.0.2 vscode-zipfs|arc|3.0.0 assemblyscript-lang|bat|0.3.2 comment-tagged-templates|bie|0.3.3 github-markdown-preview|bie|0.3.0 jsdoc-markdown-highlighting|bie|0.0.1 markdown-preview-github-styles|bie|2.0.4 biome|bio|2.2.2 xml|Dot|2.5.1 vscode-html-css|ecm|2.0.9 figma-vscode-extension|fig|0.3.5 file-icons|fil|1.1.0 vscode-glsl|GeF|0.3.1 copilot|Git|1.188.0 copilot-chat|Git|0.15.1 vscode-pull-request-github|Git|0.88.1 todo-tree|Gru|0.0.226 vscode-guid|hea|1.9.0 helium-icon-theme|hel|1.0.0 vscode-js-template-literal|ica|0.1.0 vscode-codeowners|jas|1.1.1 fast-snippets|kin|1.6.2 fluent-icons|mig|0.0.18 vscode-docker|ms-|1.29.1 vscode-edge-devtools|ms-|2.1.5 fast-tagged-templates|ms-|0.2.0 remote-containers|ms-|0.362.0 cmake-tools|ms-|1.17.17 cpptools|ms-|1.20.5 cpptools-extension-pack|ms-|1.3.0 hexeditor|ms-|1.10.0 powershell|ms-|2024.2.1 vsliveshare|ms-|1.0.5918 vscode-streamdeck|nic|4.1.6 pwa-studio|PWA|1.3.5 deoptexplorer-vscode|rbu|1.1.2 vscode-yaml|red|1.14.0 LiveServer|rit|5.7.9 rust-analyzer|rus|0.3.1950 crates|ser|0.6.6 gitconfig|sid|2.0.1 markdoc-language-support|str|0.0.13 even-better-toml|tam|0.19.2 cmake|twx|0.0.17 errorlens|use|3.17.0 intellicode-api-usage-examples|Vis|0.2.8 vscodeintellicode|Vis|1.3.1 explorer|vit|0.10.2 vscode-todo-highlight|way|1.0.5 vscode-markdown-alert|yah|0.0.4 (8 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 tftest:31042121 vstes627:30244334 vscod805:30301674 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 vscaac:30438847 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 jchc7451:30973076 showvideot:31016892 chatpanelt:31018789 dsvsc021:30996838 01bff139:31013167 pythonprt:31039817 dwnewjupyter:31039675 ```
ykrx commented 6 months ago

seems to default to editor.foreground

KingOfTac commented 6 months ago

Looks like the custom value is actually getting applied but gets overridden by a higher specificity rule.

Screenshot 2024-05-10 at 6 46 15 PM

It would seem a possible fix would be to not apply the .mtk1 class to the coverage badges and then just set the default value of --vscode-testing-coverCountBadgeForeground to var(--vscode-editor-foreground).

edit:

Actually after digging some more, it looks like --vscode-testing-coverCountBadgeForeground already has a default value properly applied, it's just the mtk1 class that is overriding the value.