Commit Graph

165 Commits

Author SHA1 Message Date
Peng Lyu
1b883b238e
Fix #209158. Add Copy Output and Open Output in Text Editor to Scrollable text output context menu. (#216920)
* Fix #209158. Add Copy Output and Open Output in Text Editor to Scrollable text output context menu.

* Context menu should be triggered on container

* fix naming
2024-06-24 10:31:17 -07:00
Aaron Munger
608fe4f38c
REPL/IW editor only using a notebook text model (#214356)
* registered editor with notebook model

* migrated some stuff from Interactive Editor

* display notebook and input box

* dont always filter kernels by view

* fix restore

* implement some commands

* working copy recovery/discarding

* fix tear down

* do not show last cell

* simplify notebookOptions creation

* reset text model on execute

* fix run button

* set tab name

* use differentiated notebooktype to determine kernel

* allow registering notebooks as other priorities

* conditionally register actions

* move registerAction back to top level

* fix input box message

* naming

* dont register extra repl commands for now

* use jupyter-notebook notebook type

* set scratchpad on backup recovery

* remove unused method
2024-06-14 15:12:29 -07:00
Aaron Munger
d7ade261f8
remove giant unused context key (#214504) 2024-06-12 08:34:29 -07:00
Don Jayamanne
804f8e3929
Debounce notebook cell metadata edit updates (#210005)
* Debounce notebook cell metadata edit updates

* Clear timer

* Check notebook type

* Try again

* Ignore IW notebooks

* oops
2024-04-11 07:44:14 +02:00
Don Jayamanne
e079f1e07b
Drop custom property from Jupyter Nb metadata (#210011) 2024-04-10 08:30:18 +02:00
Matt Bierner
8c363b460b
Merge and cleanup drop and paste proposal (#209591)
These two proposals overlap a lot and will be finalized together
2024-04-05 13:03:10 -07:00
Don Jayamanne
e3cf2530e6
Include execution count in jupyter notebook diff (#208292)
* Include execution count in notebook diff

* Fix tests

* Misc changes

* Fix tests

* Fix more tests
2024-03-21 14:14:33 +01:00
Don Jayamanne
c0fa2a7b47
Expose prop to determine if custom prop is used (#208145) 2024-03-19 17:12:07 -07:00
Don Jayamanne
0f6d7c03fc
Rename property to lineup with other exp props (#208121) 2024-03-19 20:31:31 +01:00
Don Jayamanne
55d6f3050d
Drop custom metadata property from notebooks behind setting (#208065)
* Drop custom metadata property behind setting

* Do not update existing object
2024-03-19 19:37:59 +11:00
Don Jayamanne
1e95cb902e
Keep notebook model in sync with the ipynb json (#208052) 2024-03-18 20:17:46 -07:00
Don Jayamanne
3242621276
Remove unwanted vscode property when not required (#208014) 2024-03-18 08:50:28 -07:00
Matt Bierner
9aecd9794a
Cleaning up paste api proposal (#207495) 2024-03-12 21:11:05 +01:00
Don Jayamanne
7696df9026
Avoid blocking event loop when saving nb (#207381) 2024-03-12 08:18:20 +01:00
Don Jayamanne
9c3cc8b994
Avoid unnecessary workspace edits (#207377) 2024-03-12 02:03:43 +01:00
Matt Bierner
091987d943
Update paste and drop proposals (#206496)
* Update paste and drop proposals

Reworks the document paste and drop API proposals. Main highlights:

- Align more with code action api
- Allow a single paste provider to return multiple edits
- Allow resolving applied edits lazily
- Switch from using ids to scoped kinds like used for code actions

* Adding paste context

* Add context

* Update test
2024-03-07 16:04:36 -08:00
Aaron Munger
472af59e08
more copy SVG fixes (#203937)
* re-add check for image for context menu, add selector for jupyter rendered SVGs

* consisent command name
2024-02-01 00:58:00 +01:00
Aaron Munger
7a56623b82
enable copying svg cell output (#203843)
* find the correct svg element and write it to the clipboard

* add context to allow context menu

* simplify selection

* better logs for error states
2024-01-31 06:18:37 -08:00
Aaron Munger
ed35abb942
fix copy output command without context (#203582)
* fix copy output without context

* better title

* clear output focus
2024-01-29 14:50:21 -08:00
Don Jayamanne
46cd720f83
Drop uuid pkg used to to generate notebook cell id (#198647) 2023-11-20 06:12:55 +01:00
Don Jayamanne
cb6c07d46d
Use JSON output object for json mimetype (#197871) 2023-11-10 01:13:42 +01:00
易良
f6790fc1a0
feat: Add the logo of the built-in extension (#192999)
* feat: Add the logo of the built-in extension

* chore(extension): add compressed icon

---------

Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
2023-10-05 10:40:24 -07:00
Don Jayamanne
9c17df54bd
Ensure orig_nbformat is not written to ipynb file (#192359) 2023-09-06 19:20:07 -07:00
Aaron Munger
e2d858ecb0 changed command title and name 2023-08-30 09:32:45 -07:00
Aaron Munger
7ebfc44283 removed formatting changes 2023-08-18 11:04:43 -07:00
Aaron Munger
bd60cc529c allow copying cell output images from context menu 2023-08-18 10:43:43 -07:00
Matt Bierner
8c7747252e
Move drop/paste ids onto providers (#189961)
For #179430, #30066

This lets us call just the provider we are interested in
2023-08-08 14:44:03 -07:00
Matt Bierner
39df243d21
priority -> yieldTo for drop/paste API proposals (#189881)
Move await from `priority` for drop/paste API proposals

For #179430, #30066

Switching to use `yieldTo` instead of `priority` to let an extension de-rank itself in the list of edits. `priority` was an arbitrary number while `yieldTo` gives more control over how the ranking takes place
2023-08-07 18:32:03 -07:00
Peng Lyu
bce3304e98
Fix vscode-jupyter#13522. Clear attachment if it does not exit. (#186578)
Fix #184630. Clear attachment if it does not exit.
2023-06-29 09:41:01 +10:00
Aaron Munger
c5d02335e1 json formatting 2023-06-20 15:02:32 -07:00
aamunger
e8b63b2f59
undo package format changes 2023-06-20 09:39:10 -07:00
aamunger
76c8654a95
use the builtin extension activation, temp disable failing tests 2023-06-16 11:55:07 -07:00
aamunger
71a4ab0f49
delegate editorInput ownership to EditorService. Activate ipynb extension for IW 2023-06-16 11:55:05 -07:00
aamunger
2c37a5be5a
use same notebook serializer for IW 2023-06-16 11:52:40 -07:00
Matt Bierner
5a55352cf7
Combine esbuild scripts (#184531)
* Combine esbuild scripts

This combines the various build scripts used for building webview/notebook content. This should make it easier to update settings for them

As part of this, I also fixed the script so that on watch it restarts automatically on syntax errors instead of exiting

* Migrate other build script

* Fixing math build script
2023-06-09 14:55:05 -07:00
Michael Lively
34bde274c1
debt - remove field when no attachments present (#184630) 2023-06-09 00:18:46 +02:00
Matt Bierner
bf7ca503c2
Fix drop priorities for notebooks (#182209)
For copy paste, I added logic to prefer using the text content if there's both `image/*` and `text/*` content in the clipboard

This however I also incorrectly applied this logic when dropping. In those cases, we instead want to prefer the image data (at least we do in the case of dragging and dropping from VS Code's explorer)
2023-05-11 13:03:28 -07:00
Matt Bierner
4d38422afe
Add priority to paste / drop apis (#182109)
* Add priority to paste / drop apis

Fixes #181886

Replacement for #181453

* Make notebooks prefer text over creating attachments
2023-05-10 14:18:05 -07:00
Matt Bierner
ca51a4b04c
Add paste as command (#181959)
For #30066

This command shows a quick pick that lets you select how to paste content
2023-05-10 06:17:42 -07:00
Michael Lively
8867d20020
Remove ipynb.pasteAsAttachment setting to default to editor.pasteAs.enabled behavior (#181445)
* remove `ipynb.pasteAsAttachment` setting

* change default value to align with package.json

* Revert "remove `ipynb.pasteAsAttachment` setting"

This reverts commit 7471c030af.
2023-05-09 17:25:48 -07:00
Matt Bierner
83c12a2da2
Allow creating multiple files or attachments on paste (#181975) 2023-05-09 17:20:37 -07:00
Michael Lively
f198ea9177
Check for attachment: in markdown cell renderer (#181462)
actually check if its json attachment style...
2023-05-03 16:51:22 -07:00
Matt Bierner
37577f6b29
Fix casing on label (#181338) 2023-05-02 17:37:42 +02:00
Don Jayamanne
90bf5a07e4
Check for cell when determining default cell lang (#181079) 2023-05-02 17:05:45 +02:00
Matt Bierner
11ca8d75a1
Add widget to change how content is pasted (#181290)
* Add widget to change how content is pasted

For #30066

This adds a widget that lets you change how content is pasted if there are multiple ways it could be pasted

To do this, I've made the post drop widget generic and reused it for pasting too

* Update types

* More code deduplication
2023-05-02 09:40:04 +02:00
Matt Bierner
2f07466dfc
Allow dropping images into notebook cells to create attachments (#180256)
* Allow dropping images into notebook to create attachments

Fixes #157577

This allows you to drag and drop image files or image data into a notebook cell to create an attachment

As part of this work, I also updated the paste attachment logic so that we can:

- Create multiple attachments in a single operation
- Create attachments of other mime types besides `image/png`
- Create attachments for images that have spaces in the filename

* Also allow pasting uri lists to create attachments

* Fix indent

* Add id
2023-04-19 09:39:04 -07:00
Michael Lively
ff55375896
Add support for attachment cleaning on notebook save (#179178)
* support for `onWillSave` + debounce rework

* dispose of delayer + tabs not spaces...

* adjust for API naming change, rm proposal refs
2023-04-05 11:44:52 -07:00
Matt Bierner
6aada102db
Add localization comment (#176272)
Add localization message

Fixes #176140
2023-03-06 09:40:56 -08:00
Don Jayamanne
bd77e72bbc
Ensure svg+xml output is split into lines (#175724) 2023-03-01 06:48:50 +01:00
Don Jayamanne
5efc2a498a
Localize ipynb extension commands (#172272)
* Localize ipynb extension commands

* More updates
2023-01-26 22:24:22 +01:00