Commit Graph

482 Commits

Author SHA1 Message Date
Matt Bierner
fd430418a0 Refine CellInfo type (#125351)
For #125269

- Rename `CellInfo` - >`OutputItem` (only internally, we also need to update the published types)
- Move `id` into `OutputItem`
- Move `element` out of `OutputItem`
- Rename `renderCell` to `renderOutputItem`
- Rename `destoryCell` to `disposeOutputItem` (`dispose` is  the term we generally use in our APIs)
2021-06-03 13:01:02 -07:00
rebornix
866ecdd45a Merge branch 'notebook/dev' into main 2021-05-27 14:04:55 -07:00
Matt Bierner
b8f11107f7 Use @types/vscode-webview 2021-05-27 13:41:38 -07:00
Johannes Rieken
9ef57b5c21 remove NotebookCellOutputItem#value, https://github.com/microsoft/vscode/issues/123884 2021-05-27 14:55:25 +02:00
Matt Bierner
6a12866c3e 💄 2021-05-26 12:55:32 -07:00
Ashray Jha
5eb64c54ca Modified markdown preview nested list styling (#124445)
* Modified markdown preview nested list styling

* Added proper styling to the nested list

* merge different rules into a single one
2021-05-26 09:05:35 -07:00
rebornix
473cfe28bf Revert "Revert "Merge branch 'main' of https://github.com/microsoft/vscode into main""
This reverts commit 7c01395da1.
2021-05-25 17:49:34 -07:00
Harald Kirschner
7c01395da1 Revert "Merge branch 'main' of https://github.com/microsoft/vscode into main"
This reverts commit 7a976501eb, reversing
changes made to 2257676834.
2021-05-25 17:19:40 -07:00
Johannes Rieken
ffd1f84ea9 rename notebookOutputRenderer to notebookRenderer, https://github.com/microsoft/vscode/issues/121819 2021-05-25 12:31:53 +02:00
Hassan Sani
dbdc7a259e added bottom spacing for table in markdown preview (#124385) 2021-05-24 12:14:01 -07:00
Matt Bierner
7bc2019b8d Updating pinning test 2021-05-21 15:01:05 -07:00
Jean Pierre
be8745ac9e Fixes #123228 (#123584)
Co-authored-by: Matt Bierner <matb@microsoft.com>
2021-05-21 14:51:18 -07:00
Matt Bierner
6ee883bfa3 Split href before decoding instead of after
Fixes #123228

This fixes the case where `#` appears in the path
2021-05-21 14:49:46 -07:00
Matt Bierner
77ff6eb03b Add image specific link normalizer (#124400) 2021-05-21 14:42:50 -07:00
Matt Bierner
e9b8c12915 Add types 2021-05-21 14:36:19 -07:00
rebornix
a03daaf850 Merge branch 'notebook/dev' into main 2021-05-21 14:13:43 -07:00
Matt Bierner
22dc518a21 Remove unused type 2021-05-21 12:16:49 -07:00
Matt Bierner
97bbacd808 Remove extra call to with 2021-05-21 12:16:49 -07:00
Matt Bierner
79dea51e79 Rewrite webview urls to be more url-ish
## Problem

Webview uris currently have the form:

```
https://uuid.vscode-webview.net/vscode-resource/scheme/authority/path...
```

We have this syntax because we need to be able to recover the original scheme and authority of the resource in order to load it from disk

However this syntax means that absolute urls don't behave as you'd expect. For example, if you have a webview that sets a `<base>` to a document in the workspace, an absolute url `/abs/path.png` ends up being resolved to:

```
https://uuid.vscode-webview.net/abs/path.png
```

This drops the original scheme and authority, which prevents us from loading the resource

## Fix
With this change, I've moved the original scheme and authority into the authority of the webview uri instead of the path:

```
https://scheme+authority.vscode-resource.uuid.vscode-webview.net/path...
```

With this change, absolute paths should correctly be resolved
2021-05-21 09:28:43 -07:00
Johannes Rieken
effac5be7f drop as-prefix for ICreateCellInfo 2021-05-21 17:30:29 +02:00
Johannes Rieken
494e827e35 expose output item bytes to renderers and provide util functions: asText, asJSON, asBytes, asBlob, fyi @connor4312, https://github.com/microsoft/vscode/issues/123884 2021-05-21 12:36:10 +02:00
Andrea Mah
4fbd548d72 Merge branch 'main' into dev/t-andreamah/markdown-static-preview-scroll-state 2021-05-19 17:25:56 -06:00
Andrea Mah
f594bb47e5 removing more unecessary whitespace 2021-05-19 17:00:55 -06:00
Andrea Mah
41606da2dc removing unecessary spaces 2021-05-19 16:59:26 -06:00
Andrea Mah
9ee1906718 pr feedback and combining prevEditor info for preview and non-preview 2021-05-19 16:57:12 -06:00
Andrea Mah
94498778fb cleanup 2021-05-13 15:24:56 -06:00
Andrea Mah
9731995d94 addressed ! nit 2021-05-13 12:39:52 -06:00
Andrea Mah
3dec3b3385 applied PR feedback 2021-05-13 12:30:10 -06:00
Matt Bierner
66fa5c41b3 First cut at unifying notebook renderers apis
This implements the api described in #123540. Major points:

- Instead of having the `markdown-it` renderer pull it its dependencies, instead the dependencies can call `getRenderer` to import the object returned by the `markdown-it` renderer

- We try to detect if a renderer is using the old or new api. Old renderers are still run as globals while new ones are loaded with `import`

- I have only hooked up the new API for markdown renderers so far
2021-05-12 19:32:57 -07:00
Andrea Mah
d2894562d5 fixing issue with static scroll alongside text editor 2021-05-12 17:59:00 -06:00
Andrea Mah
ee4510b4bf Merge branch 'main' into dev/t-andreamah/markdown-static-preview-scroll-state 2021-05-12 17:01:41 -06:00
Andrea Mah
18950181eb scroll state persists while toggling between static preview and text 2021-05-12 16:59:57 -06:00
Matt Bierner
11a8c4b4bc Merge the notebookMarkupRenderer contribution point into the renderers contribition point
For #123540
2021-05-12 13:28:28 -07:00
Andrea Mah
927e791753 Fix Initial Scroll Position on Markdown Dynamic Preview (#123613)
* added semicolons to pass code check

* removed preliminary work for static preview

* cleanup

Co-authored-by: Andrea Mah <t-andreamah@microsoft.com>
2021-05-11 17:12:19 -07:00
Matt Bierner
13d81db250 Don't insert link element into the markdown cell preview body
Fixes #123012
2021-05-05 14:35:46 -07:00
Logan Ramos
656e1e6086 More deprecated assertion cleanup 2021-05-04 15:55:26 -04:00
Robo
bce4d71f64 chore: bump node@14.x in devDependencies (#122905) 2021-05-04 10:04:13 +02:00
Matt Bierner
7770708545 Reapply markup renderers change
Rewriting how we do replacements in the webviewPreloads function to hopefully handle optimization better
2021-04-28 10:44:25 -07:00
Matt Bierner
fe7c5aba01 Revert "Better notebook markup renderer api (#121882)"
This reverts commit 4cb27d2ec7.
2021-04-26 19:43:16 -07:00
Matt Bierner
4cb27d2ec7 Better notebook markup renderer api (#121882)
* Better notebook markup renderer api

For #121256

- Use js modules for notebook output renderers
- Rename apis from `markdown` to `markup`
- Use imports and exports for apis instead of globals for apis
- Use esbuild instead of webpack so we can emit js modules
- Clearly split top level markup renderes from renderers that extend other renderers

* Use constant instead of comment for replacement
2021-04-26 16:30:34 -07:00
Sandeep Somavarapu
ac151b40a5 enable virtual workspace capability 2021-04-23 10:20:23 +02:00
SteVen Batten
f9fc28d47d update ext manifest schema validation and built-in exts 2021-04-21 11:54:42 -07:00
Sang
e5c466f587 markdown-language-features: Fix Windows Preview Link Uri (#120090)
* markdown-language-features: fix windows file uri

* refactor: use Uri.joinPath instead
2021-04-19 17:31:07 -07:00
Benjamin Pasero
14981ce89d tests - enable colors for windows (CI supports it and the new Windows terminal too) 2021-04-19 09:29:20 +02:00
Matt Bierner
293061802c Add workspace trust for markdown extension 2021-04-14 20:33:20 -07:00
Matt Bierner
119581fc2a Use more standard name for shared extension tsconfig
This enables Intellisense in the `tsconfig.base` file
2021-04-12 15:58:38 -07:00
Matt Bierner
d5f4e119e0 Use Array.from's map directly instead of a second call to map 2021-04-12 14:42:39 -07:00
Matt Bierner
73ae56b82b Build with latest TS nightly (#120690)
* Pick up new TS 4.3

Also tests adding override keywords for extensions as part of #120675

* Update to daily TS and workaround TS 4.3 issue

Works around https://github.com/microsoft/TypeScript/issues/43578
2021-04-07 12:19:05 -07:00
Matt Bierner
d4412e708a Render markdown preview cells inside a shadow dom (#120137)
* Render markdown preview cells inside a shadow dom

Fixes #119971

This moves all markdown previews into shadow doms. This lets us prevent styles from outside the preview leak into the preview, and also prevents styles from the preview leak out into the rest of the notebook

* Use composedPath for handling events in webviews

This lets us handle clicks triggered inside of a shadow dom
2021-03-30 14:17:15 -07:00
Daniel Imms
06ce7bd297 Fix hygiene 2021-03-29 14:40:01 -07:00