Commit Graph
8 Commits
Author SHA1 Message Date
Jack Franklin 125dc7c158 Migrate diff/DiffWrapper to TypeScript
I also tackled the diff_match_patch function...it does not seem worth getting
that into TypeScript, so I've left the nocheck. I did consider updating the code
to export the function rather than have the global, but it's depended on by
CodeMirror and changing it seems risky.

Bug: 1011811
Change-Id: Iffbe69d7dbc424e9d9a6bb1527f218f3e4998326
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2431506
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-09-28 10:05:22 +00:00
Jack Franklin 222b307dc6 Migrate diff to devtools_entrypoint
Bug: 1101738
Change-Id: Ib3010eee41e0ab1961753cd61afbdc208dbc003e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2312680
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-07-24 10:04:39 +00:00
Rob Paveza 9e33bc96e1 Added a QuickPick and QuickInput UI modality.
QuickOpen is a highly-useful UI affordance for the DevTools. However,
the actual implementation introduces some problems with reusability;
the QuickOpen tool is a global DevTools singleton that coalesces
multiple "Providers" across DevTools to handle activities like Go To
Line, Open document, or Invoke Command. Because it is a singleton, a
developer who wanted to leverage that input modality would need to drop
to the FilteredListWidget, which is tightly coupled to the QuickOpen
implementation and also has a non-obvious implementation pattern (one
would need to implement a Provider, and there is no straightforward way
to observe when the user cancels out of it).

This change borrows a simplified version of the VS Code QuickPick and
QuickInput APIs. With this, a DevTools developer can write a single
line, using an awaitable, so that the meaning and purpose of the input
collection is straightforward:

    const text = await QuickInput.show({
      prompt: 'Please enter some information.',
      value: 'A default value',
      valueSelection: [0, 15],
    });
    // text will contain the entered value, or undefined

QuickPick requires a few more lines to implement, but provides a
similarly easy-to-use interface:

    const demoMenu1 = [
      {
        label: 'Item 1',
      },
      {
        label: 'Item 2',
      },
      {
        label: 'Item 3',
      }
    ];
    const choice = await QuickPick.show(demoMenu1, {
      placeHolder: 'Choose from these options:'
    });
    // choice contains one of the objects from demoMenu1, or undefined

The explainer can be found here:
https://docs.google.com/document/d/1EibIlPCeH-672wncOScGoMbSs0EzNY4SSaqJng-5-S4/edit#

... and GIFs of these in action can be found here:
https://imgur.com/a/GCfpHQ3

Bug: 1103402
Change-Id: I1ca7c7c87243553ff45d00369ce8996c2914be93
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2288530
Reviewed-by: Brandon Goddard <brgoddar@microsoft.com>
Commit-Queue: Robert Paveza <Rob.Paveza@microsoft.com>
2020-07-13 22:12:49 +00:00
Tim van der Lippe daaa48d216 Migrate final typedefs from -legacy.js files
Yet another milestone!

Bug: 1006759
Change-Id: I0a022fbce76898ee84fb38ac59329345c72fc211
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2100911
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-03-12 18:16:41 +00:00
Tim van der Lippe b6b755afe6 Migrate workspace_diff/ to import cross-module
Bug: 1006759
Change-Id: I5748b59b045ba9fc15287743ae0a74dbc2d1f917
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2019864
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-03 11:04:58 +00:00
Tim van der Lippe d0500044a4 Migrate diff/ to import cross-module
Bug: 1006759
Change-Id: Ib2bf97a8ac99983ed4b4232cade92145cb526b8e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2019555
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-24 15:49:45 +00:00
Tim van der Lippe 835559f20f Migrate diff/ to ESM internally
Bug: 1006759
Change-Id: Ibaccd430b2c2b2c688bfa0960bee32e874ba2003
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1993344
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-09 15:21:51 +00:00
Tim van der Lippe 601965061c Migrate diff/ to ESM
Bug: 1006759
Change-Id: I63577385ecd6c91b9843dfafc669317adb76d88a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1903475
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-09 23:31:53 +00:00