Add back file icons, denote notebook-only types with orange border#1482
Add back file icons, denote notebook-only types with orange border#1482mwouts merged 4 commits intomwouts:mainfrom
Conversation
|
Thank you for making this pull request. Did you know? You can try it on Binder: Also, the version of Jupytext developed in this PR can be installed with (this requires |
|
Hi @krassowski , thank you for the PR, it's very nice of you to make this finally happen ! I do like the extra red square (and I am impressed at how many extensions you have tested!!) Can you explain what it means for a file types to default to a notebook factory ? Does it depend on the user configuration, and if so, can a user get that little box for e.g. a Python script if they decide to open |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (93.94%) is below the target coverage (96.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #1482 +/- ##
==========================================
- Coverage 96.45% 93.92% -2.53%
==========================================
Files 30 30
Lines 5298 5298
==========================================
- Hits 5110 4976 -134
- Misses 188 322 +134
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No, currently it does not so it would always be these pre-defined file types that are registered here. |
I see, thanks for the link. I will give a try at the PR over the week-end, sounds great - I might have to update the documentation as I list the notebook icon on text notebook as one way to check that Jupytext's content manager has been activated, but that's really not a concern 😄 @mahendrapaipuri any thoughts on this ? |
909c723 to
0ec4fda
Compare
|
@mwouts This is a great addition. Cheers @krassowski for proposing this! |
Thank you @mahendrapaipuri for giving your go! I am trying to build this locally, but unlike the CI I run into errors. I have tried this: which failed with
|
|
@mwouts I could build the package and run This error is what we fixed in the last PR. So, it is strange you are getting it again! |
Thanks @mahendrapaipuri for the confirmation ! The issue went away once I ran |
|
Tested locally, works well! Thank you again @krassowski . I will prepare a release later on today. |
|
Thank you! |
My pleasure, thank you @krassowski for making the PR! On another topic, I would like to see what we could do about Jupytext+JupyterLite, would you have recommendations for #1225 ? |
|
Hello there! Looking at the code, I fail to understand exactly why, but it seems this PR may be responsible for breaking icons for extensions like JupyterGIS: See our jupyterlite deployment (which includes the jupytext labextension in it): https://jupytergis.readthedocs.io/en/latest/lite/lab Pinning jupytext fixes it: geojupyter/jupytergis#1092 |
|
It looks like this needs a change in JupyterLab, I opened jupyterlab/jupyterlab#18397 to track it. |
|
Thank you @martinRenou for reporting the issue, and @krassowski for the follow-up. Let me know if you need anything from my part. |
|
Just for the record, a fix for jupyterlab/jupyterlab#18397 was now released in jupyterlab v4.5.4 |
This fixes #398 by using higher precedence
patternmatching to restore original icons for files which are now declared by the server's content manager as notebooks.The file types which default to a notebook factory (
.Rmd,.qmd,.mnband other myst extensions) have now an orange border box indicator which makes them look more like the notebook icon. I think this is a nice idea but happy to drop it (I initially added that for debugging purposes).Details