Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

DeaMariaLeon
Copy link
Contributor

Reference Issues/PRs

Towards #30357

What does this implement/fix? Explain your changes.

The latest comments of the issue I mention above, it's suggested to use javascript as in skrub.

This is a POC of an easy solution as another option. The reason being that adding javascript, forces us to also test it.
Here are the packages used to do that in skrub: Testing the javascript code

Also, from the same page I just linked: "... the report is placed in a shadow DOM, which insulates it from the surrounding css and javascript."
So, we may need to do that as well to really fix these kind of issues.

Talking to @glemaitre, we agree that at some point we need to test javascript in scikit-learn's ci. So, this PR may be a temporary solution if it's accepted.

Any other comments?

Copy link

github-actions bot commented Sep 16, 2025

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: eeacf1a. Link to the linter CI: here

@DeaMariaLeon
Copy link
Contributor Author

DeaMariaLeon commented Sep 16, 2025

Using Dark High Contrast theme on vscode, with this PR, we can go from
Screenshot 2025-09-16 at 16 09 12

to:
Screenshot 2025-09-22 at 15 39 44

The css needs some more work, but I wonder if I should keep working on this as the preferred solution may still be to use javascript.

edit:
The problem with the current css implementation (found on the main branch), is that the HTML diagram uses the default background colour. This background colour may come from a Sphinx, Jupyter or VScode template.
With this PR, a background colour would be added to the whole diagram.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant