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
Load custom CSS functionality and documentation #14743
Conversation
Thanks for making a pull request to jupyterlab! |
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.
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
for more information, see https://pre-commit.ci
…adding tests for CSS and CSS handler.
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.
Thanks @RRosio
To make things easier, I pushed two commits to
- Fix the galata tests
- Use those to produce the documentation
- Fix the Python test
- Switch the default behavior to not load custom.css
To explain how I did the integration test,
- I'm activating the feature when starting the server only for the documentation test through the command line option.
- I capture the
custom/custom.css
request to return a mocked content.
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.
The lack on contrast cause by these shadows really makes your eyes burn ;)
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.
Thank you @RRosio and @fcollonval! This looks good to me.
The test failure will need to be addressed before merging though - it looks related to different new line encoding:
|
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
The snapshots discrepancies are due to the branch not being up-to-date with the main branch I think. |
Would it be okay to update the branch then? |
Now that Mike updated manually the snapshots it should not be needed. |
Now that you said it, I decided to merge main anyways just to be sure. |
One of the visual regression documentation tests is listed as flaky now rather than failing:
I saw a few other PRs with some of the same failures so I'm under the impression that the other test failures do not seem to be related? |
Remaining failures are unrelated, merging - thanks again! |
* upstream/main: (7628 commits) Adopt ruff format (jupyterlab#15499) Bump scipy from 1.11.3 to 1.11.4 (jupyterlab#15474) [pre-commit.ci] pre-commit autoupdate (jupyterlab#15491) Pin `actions/labeler` to v4 to fix failing CI action (jupyterlab#15496) Add npm provenance issue to the list of release postmortems (jupyterlab#15493) Fix URLs in debugger-extension (jupyterlab#15462) Bump tj-actions/changed-files from 40.0.2 to 40.2.0 (jupyterlab#15471) Bump dessant/lock-threads from 4 to 5 (jupyterlab#15472) Bump pandas from 2.1.2 to 2.1.3 (jupyterlab#15473) Bump actions/github-script from 6 to 7 (jupyterlab#15470) Bump matplotlib from 3.7.2 to 3.8.2 (jupyterlab#15475) Bump rjsf to 5.13.4 (jupyterlab#15469) Don't play with the focus when handling focus event (jupyterlab#15408) [ci skip] Publish 4.1.0a4 Updated light theme visited link colour to make text visible (jupyterlab#15406) Load custom CSS functionality and documentation (jupyterlab#14743) Added alt descriptions to a few icon and images (jupyterlab#15265) More robust galata/UI tests (jupyterlab#15355) Fix Shift + L not working in stdin (jupyterlab#15440) Upgrade releaser workflows for silent support (jupyterlab#15446) ...
References
Fixes #12318
Related to #8457
Code changes
The code adds a link to the custom CSS file in the template html page and a handler to either serve the user's local custom CSS file or the placeholder file. There is also a flag added to allow disabling the default behavior that loads custom CSS.
User-facing changes
Users can apply custom styling. I tested this PR by adding some color to the Toolbar etc.
Backwards-incompatible changes
None applicable that I can think of.