Commit Graph

24 Commits

Author SHA1 Message Date
Don Jayamanne
9c17df54bd Ensure orig_nbformat is not written to ipynb file (#192359) 2023-09-06 19:20:07 -07:00
aamunger
2c37a5be5a use same notebook serializer for IW 2023-06-16 11:52:40 -07:00
Matt Bierner
1ccc8d438b Enable pasting of image attachments by default for ipynb (#166058)
Fixes https://github.com/microsoft/vscode-jupyter/issues/11987
2022-11-10 16:46:31 -08:00
Peng Lyu
6e8bc02be4 Cell attachment cleanup tool improvement in diff editor (#161132)
* Move attachment out of custom metadata, prep for attachment clean up in diff editor

* recover attachments from dirty notebook document

* Allow metadata to be restored when content changed/reverted in nb diff editor
2022-09-16 14:12:53 -07:00
Michael Lively
42238bdaab notebook image cleaning automation (#159212)
* cache and cleaner complete, needs debounce

* minor renaming and reformatting

* bugfix for paste into new cell

* cleaning functionality complete

* refer to metadata as copy of current cell's

* check undef before reading from cache

* working state, pending cache restructure

* dots -> brackets

* pre-class refactor

* massive cleaner refactor

* cache typing, closed nb check, workspaceEdit only if metadata is changed

* undefined access fix

* proper debouncer

* get it up to work again

* no need to loop

* cell metadata uri parsing regression

* diagnostic

* Show diagnostics on document open

* transfer cache before file renames

* disable word wrap in notebook diff editor

* Avoid early notebook cell metadata deep clone

* No special case empty cell

* rename

* better naming

* Quick fix for invalid image attachment

* cleanup

* Add code action metadata

Co-authored-by: rebornix <penn.lv@gmail.com>
2022-09-09 11:32:10 -07:00
Michael Lively
9225503c85 Support for pasting images into markdown notebook cells (#156847)
* dataflow support for updated metadata

* update cellAttachmentRenderer.ts to reflect metadata being a getter() inside MarkupCell

* document paste additions

* update condition to re-render cells, now includes metadata changes

* paste API working, debugging command added

* paste working with metadata. needs numbering, and cleaning upon delete

* paste screenshot works fully

* remove debugging command. Cleaning.

* notebook cells now re-render upon metadata changes

* changed name validity checking, remove unneeded function

* use _document for cell data, use snippet choice, dto fix

* return subscription, for loop, uri fix, alter metadata in-place, better snippet

* metadata fix, object.equals, fix cellAttRenderer metadata call

* added comment with source of encodeBase64

* gate mkdn image paste behind experimental setting
2022-08-08 13:57:49 -07:00
Matt Bierner
c9c5990e38 Adopt notebookWorkspaceEdit proposal internally (#149778)
This switches us to use the new `notebookWorkspaceEdit` proposal instead of `notebookEditorEdit`
2022-05-17 18:51:25 -07:00
rebornix
e632f91b35 fix #143966. 2022-03-02 16:55:55 -08:00
rebornix
3567a2f2bc Show codelens to ipynb json to open in notebook editor 2022-02-18 14:54:40 -08:00
rebornix
4b17d05668 re #142872. Contribute ipynb notebook to File -> New when no Jupyter extension enabled. 2022-02-16 11:42:45 -08:00
Rob Lourens
a14ebdfec4 Remove inputCollapsed and outputCollapsed metadata, make them view properties
Fix #125274
2021-11-03 17:22:07 -07:00
Don Jayamanne
79a3586d6c Add cell_ids for ipynb with nbformat >= 4.5 (#134835) 2021-10-12 09:35:05 -07:00
Don Jayamanne
c962433c68 Remove old API 2021-09-07 13:04:03 -07:00
Don Jayamanne
55af133ac4 Udpates 2021-09-07 09:40:55 -07:00
David Anthoff
426d60625c Add language_info to setKernelSpec 2021-09-03 14:17:27 -07:00
David Anthoff
4f7a2ddf75 Add setKernelSpecAndLanguageInfo to ipynb ext 2021-09-03 13:17:09 -07:00
Matt Bierner
b2bbd76e80 Fix writing kernelspec
For #130602

I think we need to write it into metadata section instead of the top level
2021-08-25 13:27:02 -07:00
Matt Bierner
d082058d44 Add API for setting kernelspec in ipynb files (#131219)
* Add API for setting kernelspec in ipynb files

Fixes #130602

This adds a new API to the built-in ipynb extension that lets other extension set the kernelspec metadata on a notebook file

* Temporarily skip the notebook editor tests

We need the new webview content to be published before these can run

* Use `custom`  instead of top level property
2021-08-24 18:06:53 -07:00
Rob Lourens
1dae051c56 Change exportNotebook API to return string 2021-08-05 17:14:47 -07:00
Rob Lourens
2a933e4505 Add ipynb extension API to invoke the serializer.
So the jupyter extension can implement custom Export functionality, and can dump an unsaved notebook
#128495
2021-08-05 12:14:08 -07:00
Rob Lourens
9539f015b1 Split up ipynb serializer file 2021-08-02 19:16:20 -07:00
Peng Lyu
4148736349 Migrate webview notebook editor backup to builtin serializer (#129211)
* Migrate webview notebook editor backup to builtin serializer

* update extension kind.

* discard webview backup once it is opened in notebook editor.
2021-07-23 16:25:37 -07:00
Rob Lourens
6ed3b6cc0e Clean up ipynb serializer 2021-07-21 15:03:37 -07:00
Rob Lourens
5793ae026a Rename serializer extension and set up build scripts 2021-07-21 15:03:24 -07:00