Commit Graph

353 Commits

Author SHA1 Message Date
Benjamin Pasero
6454416d29 aux window - some polish (#197510)
- seed the aux window ID based on the main one
- avoid using non-main windows for `getActiveWindowId`
2023-11-06 16:22:33 +09:00
Benjamin Pasero
9aacac6488 Aux window: Main window editor hangs or is slow on aux window minimize (fix #197420) (#197433)
* Aux window: Main window editor hangs or is slow on aux window minimize (fix #197420)

* aux window - ensure a window id in all cases

* aux window - 💄

* aux window - 💄

* aux window - 💄

* aux window - 💄

* aux window - 💄
2023-11-04 16:52:22 +01:00
Simon Siefke
96b17815bb feature: allow to paste files from the clipboard (#195730)
* feature: add basic file pasting (native)

* feature: allow native file pasting to coexist with explorer file pasting

* refactor: remove console log

* undo-import-changes

* fix: lint

* refactor: move paste file handler to explorerView

* simplify code

* remove unused import

* fix: handle files without path when running in web

* 💄

* feature: add paste confirmation dialog

* improve confirmation message

* feature: improve confirmation message when items are folders and not files

* simplify code

* simplify code

* remove unused import

---------

Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
Co-authored-by: Benjamin Pasero <benjamin.pasero@gmail.com>
2023-11-03 15:26:30 -07:00
Benjamin Pasero
c5bf435ff9 aux window - limit reload window action to main window (#197145) 2023-11-01 18:18:03 +01:00
Benjamin Pasero
1a3461f764 aux window - require a target window for requestAnimationFrame (#197126) 2023-11-01 17:01:11 +11:00
Benjamin Pasero
8e991e784c Aux window: Enable screencast mode support (fix #196087) (#197047) 2023-10-31 09:10:23 +01:00
Benjamin Pasero
64b037670a aux window - 💄 2023-10-30 09:14:45 +01:00
Benjamin Pasero
3ea02ea985 aux window - fix compile 2023-10-30 09:14:45 +01:00
Benjamin Pasero
f021e5d6cb aux window - share mutation observers for global elements 2023-10-30 09:14:45 +01:00
Benjamin Pasero
bed2384bfe aux window - require window context in more places 2023-10-30 09:14:45 +01:00
Benjamin Pasero
494cc43ec8 debt - allow to pass in disposables to createStyleSheet 2023-10-30 09:14:45 +01:00
Benjamin Pasero
94b453b4f4 aux window - fix focus issues 2023-10-30 09:14:45 +01:00
Benjamin Pasero
9e0bd20b88 aux window - introduce active'ness to layout service and adopt (#196824)
* aux window - introduce active'ness to layout service and adopt

* 💄

* 💄
2023-10-27 15:40:33 +02:00
Benjamin Pasero
47a0ab66a0 aux window - fix CSS cloning (#196788)
* aux window - fix CSS cloning

* 💄
2023-10-27 08:10:39 +02:00
Benjamin Pasero
1986bdaa0e Aux window: windows moved to the top stay on top over focused window (fix #196473) (#196751)
* Aux window: windows moved to the top stay on top over focused window (fix #196473)

* 💄
2023-10-26 20:57:33 +02:00
Benjamin Pasero
500e680350 Aux window: editor global stylesheet does not work (fix #195969) (#196357)
* Aux window: editor global stylesheet does not work (fix #195969)

* improve
2023-10-25 10:37:59 +02:00
Benjamin Pasero
0f1b533b7b aux window - less use of ILayoutService.container (#196282)
* aux window - less use of `ILayoutService.container`

* .
2023-10-23 16:52:10 +02:00
Benjamin Pasero
8b6ae4ade6 Aux window disrupts command palette (fix #195870) (#196231) 2023-10-23 09:12:50 +02:00
Benjamin Pasero
198bbdf35e aux window - avoid more global window (#195869)
* aux window - avoid more global `window`

* aux window - avoid more global `document`
2023-10-18 09:33:39 +02:00
Benjamin Pasero
787ed646a3 aux window - add and use DOM utilities for checking active element (#195797) 2023-10-17 15:43:35 +02:00
Benjamin Pasero
f355387613 aux window - reduce global access to window object 2023-10-17 15:02:43 +02:00
Benjamin Pasero
91e59a296e aux window - better focus and reveal handling for editors (#194828)
* first cut focus handling

* 💄

* implement moveToTop

* cleanup
2023-10-05 09:51:10 +02:00
Benjamin Pasero
950d9ef298 layout - allow containers accessor (#194797) 2023-10-04 15:14:55 +02:00
Matt Bierner
f42c55740d Remove dom.isInDom (#194752) 2023-10-03 15:08:44 -07:00
Benjamin Pasero
73cc570f58 Allow for multiple editor parts (#193425)
* demo

* wip

* polish

* allow to toggle

* compile

* enable devtools

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* Avoid using global document, global window

* Fix exception caused by reading the size of the newly created window before it is available

* cleanup

* make it more useful

* apply zoom

* first cut editor parts

* cleanup

* scaffold some services

* preserve view state

* simple label distinction

* introduce accessor

* support dnd

* fix open editors view

* share window options

* cleanup

* 💄

* 💄

* 💄

* 💄

* cleanup on unload

* add todo

* stylescleanup

* avoid instanceof checks

* share more styles

* revert changes partially

* fix custom menus

* more alignment to main window

* codicon does not seem to be needed anymore

* no need for isHTMLElement

* fix icon error on macOS

* prevent `document.createElement`

* close child window when main window closes

* better active groups tracking

* cleanup

* pass along editor parts viewer

* eslint rule for instanceof checks

* add dom tests

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

---------

Co-authored-by: Alex Dima <alexdima@microsoft.com>
2023-10-03 12:20:06 +02:00
Alexandru Dima
b2388cebc3 Avoid using global document, global window (#193189)
* Avoid using global document, global window

* Fix problem with fake dom element

* Fix problem with tracking focus on the window
2023-09-15 14:55:21 +02:00
Johannes Rieken
af0f039869 Merge pull request #181761 from antonioprudenzano/window-focus-fix
added focus_in and focus_out events only on HTMLElement elements
2023-09-04 13:30:08 +02:00
Matt Bierner
6e251255fb withNullAsUndefined(x) -> x ?? undefined (#189987)
Follow up on #189983

Replaces `withNullAsUndefined` with uses of `??`
2023-08-08 16:45:52 -07:00
Henning Dieterichs
397f2e7c34 First draft of diff editor v2. 2023-05-26 15:26:31 +02:00
Antonio Prudenzano
6909a3a0d1 added focus_in and focus_out events only on HTMLElement elements 2023-05-07 19:17:22 +02:00
Johannes Rieken
f0a3f5f66d add jsdoc comment for trackFocus (#180690) 2023-04-24 15:25:47 +02:00
csu-feizao
d80c5b274e Set className and textContent in the dynamic style element 'monaco-colors' before appended 2023-03-13 15:56:55 +08:00
Matt Bierner
43b6e7785d Add dom.toggleVisibility helper (#175960)
Adds a helper function for toggling if a set of elements are visible or hidden
2023-03-06 11:31:26 -08:00
Matt Bierner
9c0d571c9d Allow 'start' attribute in rendered markdown (#174854)
Fixes #174563
2023-02-20 18:18:12 +01:00
Matt Bierner
e4b323c098 Allow <source> tags in rendered markdown (#172063)
Fixes #171330
2023-01-23 21:07:25 +01:00
Henning Dieterichs
afa19380da Implements experimental inline suggestion hints. (#171846)
* Implements experimental inline suggestion hints.

* Fixes lint issue.

* Removes content widget on dispose
2023-01-20 18:46:58 +01:00
Matt Bierner
7064045157 Use variadic tuples to simplify typing of h (#166392) 2022-12-07 10:36:32 +01:00
Benjamin Pasero
9df51e1cdd Notifications: cannot navigate into link via keybindings (fix #163086) (#167980) 2022-12-06 07:28:32 +01:00
Martin Aeschlimann
46685b5669 Fix input boxes with borders (#167252)
Fix input boxes with borders (Fixes #167209)
2022-11-25 15:27:36 +01:00
Alex Dima
f46738bc47 Extract usage of require to separate function which can be tree-shaken by the monaco editor build and thus ignored by webpack 2022-11-09 09:39:20 +01:00
Matt Bierner
7acbd9df69 Try passing offset to editors on layout (#164287)
* Try passing offset to editors on layout

When a notebook editor is created, it currently has to force a relayout to determine where the overlay webview should be positioned. We do this with a call to `getBoundingClientRect`

However the grid view should already have information about where the editor is positioned. If we can use this, then we can skip the expensive call to `getBoundingClientRect` entirely

This change attempts to pass the `top` and `left` offsets to the `EditorGroupView` and eventually down into `NotebookEditorWidget`

The PR does not work properly however as the offset that the `EditorGroupView` gets is wrong. I've added some todo comments about where this seems to be happening

* Remove todo and update layout over
2022-11-04 23:15:06 -07:00
Matt Bierner
f177cf1311 Move default dom purify to constant (#163975) 2022-10-19 07:29:18 -07:00
Matt Bierner
e6dfd27b3b Avoid extra spread / object copy and use Object.entries (#163941)
This lets us avoid copying `attrs` and also skips calling `Object.keys` if `attrs` is undefined

`Object.entries` is also slightly faster in this case
2022-10-18 08:46:30 -07:00
Matt Bierner
5916cdeccb Move all webview clipping logic into overlaywebview (#163853) 2022-10-17 08:21:01 -07:00
Matt Bierner
2a4fb40a6e Align list of supported tags in rendered markdown (#161544)
This expands the list of html tags we allow in markdown. To get this list, I've copied the list of tags from `markdownDocumentRenderer` into `dom` after  reviewing them

For #134514, I've also added `video` to the list of allowed tags
2022-09-22 18:25:48 -07:00
Matt Bierner
a107f7281f Remove requestAnimationFrame shim for old browsers (#159817)
Use requestAnimationFrame shim for old browsers

This removes vendor specific fallbacks and a shim for `requestAnimationFrame`, which is [now supported on all modern browsers](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame#browser_compatibility)
2022-09-14 13:46:18 -07:00
Johannes
4c567d14cb Revert "clearNode should use replaceChildren (#157169)"
This reverts commit 85c03e0238.
2022-08-23 14:44:25 +02:00
Johannes
a051032930 Revert "Try using AbortController for disposable dom listeners"
This reverts commit 508486f886.
2022-08-23 14:44:08 +02:00
Matt Bierner
6d24a019d8 Remove dom.createEventEmitter (#157296)
As far as I can tell this class has the same functionality as `DomEmitter`
2022-08-05 19:24:40 +02:00
Matt Bierner
427530e884 Remove event.ts stopEvent (#157182)
Remove event.stopEvent

This function has the same function as EventHelper.stop but is only used in one place
2022-08-05 19:16:45 +02:00