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

Fix readability of tutorials in dark mode #1080

Merged
merged 8 commits into from
Apr 13, 2023

Conversation

kushalbakshi
Copy link
Contributor

@kushalbakshi kushalbakshi commented Feb 21, 2023

This PR fixes the readability of the Jupyter Notebook outputs in the Using the json type tutorials. This resolves issue 1078.

Below are the screenshots from local testing after applying changes to the code as seen in this PR:
Dark mode - the font in the tables previously appeared white, and was therefore, not readable. See linked issue above for images.

image

Light mode - there was no issue here previously and remains the same as before.

image

@kushalbakshi kushalbakshi marked this pull request as ready for review February 21, 2023 20:50
Copy link
Collaborator

@guzman-raphael guzman-raphael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kushalbakshi Thanks for patching this! 💪

Dark mode users (:raising_hand_man:) will certainly appreciate this improvement. Providing some small suggestions but otherwise agree with the approach here.

CHANGELOG.md Outdated Show resolved Hide resolved
docs/src/.overrides/assets/stylesheets/extra.css Outdated Show resolved Hide resolved
Co-authored-by: Raphael Guzman <38401847+guzman-raphael@users.noreply.github.com>
@kushalbakshi
Copy link
Contributor Author

Hi @guzman-raphael, I'm finally getting the chance to get back on this one.

Here is one example each of black background with white text, and black text with white background. Let me know what you prefer. I think the black background is cleaner in dark mode, but it's up to you.

black background

white background

@guzman-raphael
Copy link
Collaborator

Thanks @kushalbakshi. That is an interesting option. 🤔

Just discussed this with @kabilar to get his opinion and he agreed with me that the white background one is cleaner. Let's proceed with that.

@kushalbakshi
Copy link
Contributor Author

Thanks @kushalbakshi. That is an interesting option. 🤔

Just discussed this with @kabilar to get his opinion and he agreed with me that the white background one is cleaner. Let's proceed with that.

Sounds good! The changes have been tested and committed here.

Something to note - the docs container would not build without the typing-extensions package. There was a ModuleNotFoundError. I've added that to docs/.docker/pip_requirements.txt. Here's the error message I received prior to adding this requirement:

docs-docs-1  |   File "/opt/conda/lib/python3.9/site-packages/mkdocstrings/plugin.py", line 41, in <module>
docs-docs-1  |     from typing_extensions import ParamSpec
docs-docs-1  | ModuleNotFoundError: No module named 'typing_extensions'
docs-docs-1 exited with code 1

@kushalbakshi
Copy link
Contributor Author

kushalbakshi commented Apr 13, 2023

Commenting to record that I was able to remove the typing-extensions module from pip_requirements.txt. It must've been patched in the dependencies of the packages we use for docs. This is now ready for review

@guzman-raphael guzman-raphael merged commit ee95f02 into datajoint:master Apr 13, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation does not render correctly in dark mode
3 participants