daniecas / azure-devops-mermaid-viewer

This Azure DevOps Extension allows to get a Preview for your Mermaid Diagram in your Code Repos
https://marketplace.visualstudio.com/items?itemName=DanieleCas.azure-devops-mermaid-viewer
MIT License
5 stars 2 forks source link

Text not visible with Azure Devops 'dark' themes #3

Closed kfsdl closed 4 months ago

kfsdl commented 4 months ago

When viewing (for instance) a sequence diagram having chosen one of the 'dark' themes, much diagram text isn't visible. Perhaps change to render diagram onto an opaque white background, so matches 'light' theme?

daniecas commented 4 months ago

Hi @kfsdl, thank you for reporting this issue, I'm going to evaluate a full support for dark theme but this need more time, at the moment, as you proposed, I could add a white background like the following, I'm going to release this fix in a few days immagine

daniecas commented 4 months ago

I tried to deep dive about Mermaid themes, I find out that you can easly change your theme adding %%{init: {'theme':'dark'}}%% in your mermaid file, in this way you can personalize your theme.

kfsdl commented 4 months ago

That's ... ok for individual use I guess, but in a group where some people use dark, others not, results aren't great when viewing a diagram with theme-dark directive in a non-dark AD theme ... and it seems like you'd have to add the directive to every mermaid file, which is tricky if you don't have permissions on some repos (and/or there are lots of them) ... Maybe the ideal thing would be for the viewer somehow to inject the appropriate directive based on the AD theme ... but short of that or other theme support, I'd personally say adding a white background would be a better option if you're still considering that ... (And thanks for looking at this.)

daniecas commented 4 months ago

Ok, I got your point, I'm going to add white background in the next days.

daniecas commented 4 months ago

Hi @kfsdl, as you can see in the PR: https://github.com/daniecas/azure-devops-mermaid-viewer/pull/4 now this Extension support the dark thems

thank you for your report

kfsdl commented 4 months ago

Hi @kfsdl, as you can see in the PR: #4 now this Extension support the dark thems

thank you for your report

Excellent, thank you!