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
Use a more explicit styleModule key for js css imports #9427
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks for making a pull request to JupyterLab! To try out this branch on binder, follow this link: |
It turns out that there are packages out there, like CodeMirror, that have their `main` and `style` files named the same, differing only in the .css or .js suffix, so we cannot just assume we can import the style file with a .js suffix. This makes things more explicit.
I ran the integrity script twice so changes would propagate through the packages.
github-actions
bot
added
Design System CSS
tag:CSS
For general CSS related issues and pecadilloes
labels
Dec 4, 2020
This pulls in jupyterlab/lumino#139, which adds styleModule keys to Lumino packages.
I think this is ready for review/merge. I'm happy to make a release after this is merged, which would replace the broken 3.0rc11. |
jtpio
reviewed
Dec 4, 2020
blink1073
approved these changes
Dec 4, 2020
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!
jasongrout
added a commit
to jasongrout/jupyterlab
that referenced
this pull request
Dec 11, 2020
In jupyterlab#9427, we introduced a new styleModule key instead of guessing about there being a js file corresponding to a style file. That change did not propagate to prebuilt extensions. This commit fixes prebuilt extensions to use styleModule if available.
jasongrout
added a commit
to jasongrout/jupyterlab
that referenced
this pull request
Dec 11, 2020
In jupyterlab#9427, we introduced a new styleModule key instead of guessing about there being a js file corresponding to a style file. That change did not propagate to prebuilt extensions. This commit fixes prebuilt extensions to use styleModule if available. Fixes jupyterlab#9459
github-actions
bot
added
the
status:resolved-locked
Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
label
Jun 3, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Design System CSS
pkg:application
pkg:apputils
pkg:attachments
pkg:cells
pkg:celltags
pkg:codeeditor
pkg:codemirror
pkg:completer
pkg:console
status:resolved-locked
Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
tag:CSS
For general CSS related issues and pecadilloes
tag:Examples
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
References
Fixes #9423
Follow-up to #9407
Code changes
In #9407, we make the assumption that the package.json
style
key can be imported with a.js
extension to get an equivalent module for the styles. This assumption does not hold for codemirror, for example (where the css iscodemirror.css
, and the main js file iscodemirror.js
). It probably doesn't hold for a number of other packages.In this PR, we make this preference for js modules importing style files more explicit with a top-level
styleModule
key. This should fix the broken 3.0rc11 release noted in #9423codemirror.css
in these changes).User-facing changes
Backwards-incompatible changes