Commit Graph
751 Commits
Author SHA1 Message Date
Peter Marshall e1829f8d12 [l10n] Make sure we check subdirs in localization checks
Previously we did not iterate subdirectories which meant we missed
folders like ui/components. Now the script complains that there is no
appropriate .grdp file for the strings it finds in e.g. SurveyLink.ts.

Also add the missing strings for SurveyLink.ts as the script now finds
them.

Bug: 1169118
Change-Id: I0e4793dc8581cd439f103632e60e9b8088a529a1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2644811
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-01-26 10:07:08 +00:00
Christy Chen e4593a52d0 [Loc] Migrate object_ui to localization V2
Migrate object_ui directory


Bug: 1136655
Change-Id: I06f52c5f12638b1bb120988fbd210bbc00797fb6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2646142
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-01-26 09:57:48 +00:00
Christy Chen e3eccbb247 [Loc] Migrate console_counter to localization V2
Migrate console_counter directory
Tested with en-XL: https://imgur.com/a/11ZT5gp


Bug: 1136655
Change-Id: I2da3c600d8794dda7149bc42ab1be4530c08a34d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2642464
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-01-25 10:07:33 +00:00
Christy Chen 59f6cf5697 [Loc] Migrate browser_sdk to localization V2
Migrate browser_sdk directory


Bug: 1136655
Change-Id: Ied83b93ee62b4e3d85799c0518b006f97066087a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2644600
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-01-25 07:35:53 +00:00
vidorteg fa8efd973e [Loc] Migrate color picker pane to Localization V2
- Migrate color picker to use Localization V2 APIs.
- Removed color picker grdps

Tested with en-XL.json
https://imgur.com/a/OfMtEEN

Bug: 1136655
Change-Id: I79806c1222c836ccd623bbe4ddb3dad8ab864d8e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2643999
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-01-22 18:24:03 +00:00
Christy Chen b6e28b60de [Loc] Migrate css_overview to localization V2
Migrate css_overview directory
Tested with en-XL: https://imgur.com/a/A5wDgqt


Bug: 1136655
Change-Id: I4de99a8504fff0a6c866e2f5079535ed4d3e65dc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2644596
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2021-01-22 09:15:52 +00:00
vidorteg 7c153a21c2 [Loc] Migrate profiler to Localization V2
- Migrate profiler to use Localization V2 APIs.
- Import the strings declared in the heap_snapshot_worker
- Removed event_listener grdps

Tested with en-XL.json:
https://imgur.com/MoxBmKK
https://imgur.com/cW0nelm
https://imgur.com/A99ofNG

Bug: 1136655
Change-Id: I282ff0a8ccd374dab95412eda1c974a587d1c78a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2632164
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-01-21 21:39:48 +00:00
vidorteg 8d1dafc6c2 [Loc] Migrate heap_snapshot_worker to Localization V2
- As this is a web worker with it's own memory space strings are not
  displayed inside but serialized and send over the profiler to be
  displayed.
- Removed event_listener grdps

Tested with en-XL.json
https://imgur.com/a/TdtQcnl

Bug: 1136655
Change-Id: I87365b50ecf2d3539504950d6ad6c391731bec54
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2631106
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-01-21 17:27:18 +00:00
Christy Chen f9033fa039 [Loc] Migrate perf_ui to localization V2
Migrate perf_ui

Bug: 1136655
Change-Id: I000de6662e48aa7e8e236c550584a1e5947dbad7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2641894
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2021-01-21 11:51:33 +00:00
vidorteg aeaf8b9be0 Making localizationV2Checks work with typescript
localizationV2Checks should also be aware of ModuleUIStrings.(ts|js).

Change-Id: Ib35a231bf1c4bd649812aef61c3192765a2949be
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2638149
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-01-21 01:50:23 +00:00
Christy Chen 10e970269b [Loc] Migrate inline_editor to localization V2
Migrate inline_editor directory
Tested with en-XL: https://imgur.com/a/1bw3coo


Bug: 1136655
Change-Id: I33979b0612219cdaf83b6e66e5055b0504dc7920
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2591889
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-01-20 13:17:30 +00:00
Jack Franklin e6dcd249e6 Inject inspectorStyle.css into the component docs
The interaction tests that have new values needed the change as the
inspectorStyle CSS changed the margins on the `body` element so some of the
tests had slightly different pixel values required when testing resizing.

Bug: chromium:1167724
Change-Id: I6569210264471f96040512e7f55158dec5c28bfd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2635666
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-18 16:48:16 +00:00
Jack Franklin bc30234f61 Migrate run_lint_check_css to JS script
As part of the work to move more scripts to Node, not Python, over time,
picked this one as the starting point. I changed its API slightly to
allow more flags to be taken in, as we'll need that to do a stylelint
pass against TypeScript files, but I will do that in a subsequent CL.

I had to make quite a few changes to devtools_paths.js, but I think it's
now calculating paths correctly. It took a bit of messing to get the
equivalent of Python's path.abspath(__file__), as you'll see from the
large comment that tries to explain what's going on!

Bug: chromium:1166108, chromium:1166572
Change-Id: Ia0b19ff8956b2ede2447530be57876a88046887e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2631113
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-18 10:30:12 +00:00
vidorteg 1502a9ec07 [Loc] Migrate event_listener pane to Localization V2
- Migrate event_listener to use Localization V2 APIs.
- Removed event_listener grdps

Tested with en-XL.json
https://imgur.com/a/hm7nJ9k

Bug: 1136655
Change-Id: I401023ddda8c557732cc25943b6062f59f1b6ca8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2632158
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-01-15 17:20:09 +00:00
vidorteg 18a45a67b2 [Loc] Migrate screencast panel to Localization V2
- Migrate screencast to use Localization V2 APIs.
- Removed screencast grdps

Tested with en-XL.json
https://imgur.com/a/0i8xOyL

Bug: 1136655
Change-Id: I71fcaca0426e116a4466cc4f78b11bce8d692a44
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2628579
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-01-14 20:27:27 +00:00
Jack Franklin 65c824b5ad Create Node version of devtools_paths.py
This is not complete in that it doesn't expose all the same paths, but
I'd rather have people add to them as they go. I've defined the main
paths we'll need - third_party, node and devtools root.

I tested this locally by having it print out the paths and I updated the Python
equivalent to do the same. I ran the commands both locally in my devtools repo
and from the Chromium repository.

Bug: chromium:1166572
Change-Id: Ia0403b9b861d5cf58234bcf16d7ad247184233a4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2626301
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-14 15:02:15 +00:00
Simon Zünd 6d32fb19b0 [ts] Update TypeScript to 4.2.0-beta
TypeScript now ships type definitions for `ResizeObserver` so this
CL also removes the resize_observer.d.ts file and references to it
from build rules.

DISABLE_THIRD_PARTY_CHECK="TypeScript update"

R=tvanderlippe@chromium.org

Bug: chromium:1166169
Change-Id: I4dff6ed9aa4937f0183210cc735405cb2b8abaf6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2626298
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-01-14 12:42:25 +00:00
Jack Franklin 9e71e6a50f ESLint rule to ban interpolation within <style> tags
LitHtml strongly discourages this approach and it's one that often can
be avoided using CSS custom properties that are set from JavaScript, so
we're going to try to avoid its usage creeping into our codebase. We can
revisit if we hit upon a case where it's really needed.

Bug: chromium:1166108
Change-Id: Ib8c60d8670707b8f0e239d911ec569c64a3b1846
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2626294
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-14 09:34:54 +00:00
Tim van der Lippe 28a79aace9 Move assertNotNull into platform
R=jacktfranklin@chromium.org

Fixed: 1154208
Change-Id: I3729d0f06577a3bb065ea362dec9e83d096965b1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2618318
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-01-11 17:14:27 +00:00
Jack Franklin cac69b4441 [Dark mode]: generate dark styles for cmdevtools.css
Uses the new script to generate the dark mode styles for cmdevtools so save us
manually processing it. Tested by clicking around the sources panel in light and
dark mode and verifying that things look as expected.

Also fixed some bugs in the generator script to ensure we generate the
right selectors.

Bug: 1152736
Change-Id: If3491651be116033be7248e695ceab1de5f3fc5c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2593129
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-11 16:10:06 +00:00
Jack Franklin 7a75e4617c Workflow improvements to component docs
* Add links back to the index page when viewing an example
* On a component's example page, each individual example is in a details tag, so you don't see all the iframes when you load the page. You can click the arrow to expand an individual example.

Note: should land after https://crrev.com/c/2617796 lands else it'll cause some conflicts.
Change-Id: Icd4e3e8b1e836fede9ba00cedb12794691a94138
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2617797
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-08 16:55:37 +00:00
Tim van der Lippe 677a98d1c4 Remove component_docs from GRD
These files are not intended to be included in the DevTools release
bundle and therefore should be treated as testonly. This also means
that we should be using `ts_library` instead of `devtools_module`,
as we don't intend to copy these files into `resources/inspector`.

R=jacktfranklin@chromium.org

Fixed: 1152777
Change-Id: Id23d403c64445dd1c0ea59e36117dfc667f7e8e5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2617796
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-01-08 16:09:47 +00:00
Tim van der Lippe f78841938e Fix lit_html_data_as_type to handle multiple data setters
R=jacktfranklin@chromium.org

Fixed: 1164372
Change-Id: Idcf5419de6a7d3fa9ae816c9b9e73b6a853cbf0d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2617793
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-01-08 14:46:57 +00:00
Tim van der Lippe 9264487850 Convert UIString.js to TypeScript-authored
This allows us to make follow-up changes to use TypeScript-specific
features.

R=jacktfranklin@chromium.org

Change-Id: Ie17a8e1101ca6e9800fab49bc560cce8001b58ca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2612859
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-01-07 16:33:36 +00:00
Mathias Bynens 2e8ddd343b Include .avif and .webp images in *.grd files
Otherwise, AVIF and WebP images get silently excluded.

Bug: chromium:1161667
Change-Id: Id5cc515a532d1d6033f4bc417b98ff9840a2c741
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2612852
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2021-01-07 15:12:16 +00:00
Tim van der Lippe 40755599ae Enable no-implicit-coercion for all files
R=mathias@chromium.org,jacktfranklin@chromium.org

Fixed: 1082789
Change-Id: I2cf3c221e748654c296f35c3f149b1f76684f4a3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2612903
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-07 14:54:36 +00:00
Jack Franklin 51ffa992c9 Migrate component docs data grid example to TS file
Writing the component docs example inline makes it easier to quickly
through an example together but means we lose any type checking on the
examples.

This CL migrates one example to TS and updates the ES Modules Import
lint rule to allow component docs files to import the test helpers -
which we do to allow them to emulate a full DevTools environment if
required.

This change caught some invalid config in the component doc example so I
think if we can make this migration across all the component doc
examples it will help ensure our examples are up to date and valid.

Bug: 1144106
Change-Id: I32cf0e09bfe158ae5ba9b57dbc535e14a9985a5f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2613206
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-07 10:05:36 +00:00
Tim van der Lippe 1fe7f95b0e Add eslint-plugin-lit-a11y to manage_node_deps
This also adds the MPL-2.0 license as valid license to our allowed
licenses list.

R=jacktfranklin@chromium.org
DISABLE_THIRD_PARTY_CHECK=NPM update

Change-Id: I2a3bee2ffc0b328a0579ab62ab27f938bdc876c8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2593130
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-05 13:13:19 +00:00
Jack Franklin 90b6613019 Reland "Add header context menu to data grid"
This reverts commit c2ad98d783.

Reason for revert: fixed flakey test

Original change's description:
> Revert "Add header context menu to data grid"
>
> This reverts commit 6bdb3622bd.
>
> Reason for revert: Interaction tests started failing on mac.
>
> https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Mac/2514/overview
>
> Original change's description:
> > Add header context menu to data grid
> >
> > This CL adds a default header context menu to the data grid that lists visible
> > and sortable columns much like the legacy data grid.
> >
> > Bug: 1150793
> > Change-Id: I84a8a9cc511d6be9fee1f89ba41a6e8649df54ec
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2600723
> > Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
> > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
>
> TBR=aerotwist@chromium.org,jacktfranklin@chromium.org
>
> Change-Id: Ic8ef16044716d922d3a37b6a8fb32e13a75dee72
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1150793
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2601962
> Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
> Commit-Queue: Jan Scheffler <janscheffler@chromium.org>

TBR=aerotwist@chromium.org,szuend@chromium.org,janscheffler@chromium.org,jacktfranklin@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1150793
Change-Id: Ibd352be261d2cefee6fccc4b18b438faaad57631
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2610596
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-01-05 11:56:39 +00:00
Christy Chen 9d7f897b22 [Loc] Migrate recorder to localization V2
Migrate recorder tool
Tested with en-XL: https://imgur.com/a/LcyPbpt

Bug: 1136655
Change-Id: I308e11313d5be94a59f9a9b8df3d38e5ca81597d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2597799
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-01-04 22:06:09 +00:00
Mathias Bynens c38abd4da4 Support AVIF in component server
Bug: chromium:1161661
Change-Id: I9d67209b299ebfb852d706543ae544b03108a6e2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2602987
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-24 08:38:45 +00:00
Mathias Bynens ff4b4eb89b Support AVIF in hosted mode
Bug: chromium:1161661
Change-Id: I021605672f93642d2f02c595266fd44ddce24293
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2602986
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-24 08:37:36 +00:00
Jan Scheffler c2ad98d783 Revert "Add header context menu to data grid"
This reverts commit 6bdb3622bd.

Reason for revert: Interaction tests started failing on mac.

https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Mac/2514/overview

Original change's description:
> Add header context menu to data grid
>
> This CL adds a default header context menu to the data grid that lists visible
> and sortable columns much like the legacy data grid.
>
> Bug: 1150793
> Change-Id: I84a8a9cc511d6be9fee1f89ba41a6e8649df54ec
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2600723
> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>

TBR=aerotwist@chromium.org,jacktfranklin@chromium.org

Change-Id: Ic8ef16044716d922d3a37b6a8fb32e13a75dee72
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1150793
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2601962
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
2020-12-23 07:27:30 +00:00
Jack Franklin 6bdb3622bd Add header context menu to data grid
This CL adds a default header context menu to the data grid that lists visible
and sortable columns much like the legacy data grid.

Bug: 1150793
Change-Id: I84a8a9cc511d6be9fee1f89ba41a6e8649df54ec
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2600723
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-22 15:43:47 +00:00
Jack Franklin e02962c02f Fix double serving of files in component server
Now the server can serve from the tests directory, it will sometimes get
two requests for the same file, one prefixed with front_end and the
other not. If that happens the server now redirects the request such
that we only ever serve each file once and the browser doesn't
double-execute a module.

Change-Id: I14b44aad8b16d1c3f2f787082c70532a8f8776e9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2599746
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-21 16:39:36 +00:00
Jack Franklin d034512dc4 Component docs can load test helpers
Most of the time we won't need this fully fledged environment, but for
some things (such as context menus, guess what I'm working on right now
:D) we do need a faked out environment to enable these features to run
when we run the component in isolation in the component docs.

Note: while this CL contains no component docs changes that take
advantage of it, I've tested locally with context menus in the data grid
and this change does work.

Fixed: 1148323
Change-Id: Ic8c508840a20b6d0f0e72fd7019a16271f04bea6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2597313
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-21 09:59:36 +00:00
Christy Chen ae8efc5c4e [Loc] Migrate persistence to localization V2
Migrate persistence
Tested with en-XL: https://imgur.com/a/nreUeRP


Bug: 1136655
Change-Id: I8eaf5d830a411d75182b5a7f642ad5ca559c781a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2591893
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-15 17:02:38 +00:00
Jack Franklin 81eb91a605 Script to generate dark mode stylesheets
This CL provides a script that generates a dark mode stylesheet for a
given sheet, just like the runtime color patching (in fact, it uses the
same code!).

The script loads up the given CSS file, imports `ThemeSupport`, and
patches it. It then takes the final CSS file and prefixes
`:host-context(.-theme-with-dark-background)` to each selector. We can
then load the lightmode and the dark mode stylesheet into DevTools.

This is non ideal because we end up loading two stylesheets, but the
alternative is to maintain the runtime color patching for ever, or
update all third party stylesheets to use our CSS variables, which is a
lot of work.

The script does rely on the hosted mode server running but I think this
is reasonable; it's only going to be run rarely on a few CSS files, so
we won't be running it automatically on CI or anything so we can keep
the process fairly manual.

Bug: 1152736
Change-Id: I707c53fbccb3e03c9fac6691f40df32bcdb17c1f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2587024
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-12-14 10:47:31 +00:00
Christy Chen 3e5de8a135 [Loc] Migrate components to Localization V2
Bug: 1136655
Change-Id: I69678b0f06027cd0b4b3715d959a41fa592a60bb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2585954
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-11 19:25:57 +00:00
Christy Chen 393c680774 [Loc] Migrate node_debugger to Localization V2
Bug: 1136655
Change-Id: I080bf2712871e5174873c418ad193bb82c4e543b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2580845
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-12-11 18:06:07 +00:00
Christy Chen a09a090c7a [Loc] Migrate js_profiler to Localization V2
Bug: 1136655
Change-Id: I4f1e47cc0aff903545187ea387c24af507e5e5e1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2583063
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-12-11 18:00:17 +00:00
Christy Chen b5da31f172 [Loc] Migrate cookie_table to Localization V2
Test with en-XL: https://imgur.com/a/Rzfcxzc

Bug: 1136655
Change-Id: Iad51c1ef4f6225c8600bfa722cb39ea50f265f7a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2582699
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-10 18:05:54 +00:00
Tim van der Lippe 59ff4e28de Move worker integration into entrypoint for wasmparser_worker
This allows us to test the wasmparser_worker implementation
in isolation in unit tests, while extracting out the worker
integration into a separate file. A follow-up CL will migrate
the wasmparser_worker to use URL-based worker construction,
which will allow us to remove the wasmparser_worker-entrypoint
in front_end/ and cleanup the RuntimeInstantiator.js logic.

R=jacktfranklin@chromium.org,bmeurer@chromium.org

Bug: 1009443
Change-Id: I77d04ab870b38ec9f9209c1a156c123c941d169b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2581927
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2020-12-10 10:21:28 +00:00
vidorteg 3c56ca23d9 [Loc] Migrate node_main panel to Localization V2
- Migrate node_main to use Localization V2 APIs.
- Removed node_main grdps

Tested with en-XL.json
https://imgur.com/a/fky46TA

Bug: 1136655
Change-Id: I6fcb6328a8a053b084f094ac0c5b1f7e98449992
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2578185
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-12-10 00:10:57 +00:00
vidorteg 768ced1d57 [Loc] Migrate mobile throttling setting panel to Localization V2
- Migrate mobile throttling setting panel to use Localization V2 APIs.
- Removed media grdps

Tested with en-XL.json
https://imgur.com/a/PfBEBxD

Bug: 1136655
Change-Id: Ic8729040a89baa7c0d860724e7e3b8146194160f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2572862
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-12-09 22:32:37 +00:00
Christy Chen 87d9ffc323 [Loc] Migrate input to Localization V2
Bug: 1136655
Change-Id: I7d8b1c34aaea07b896ec913faf141381422c3bd6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2580848
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-09 17:59:07 +00:00
Jack Franklin 75b0efc9b9 Ban "front_end" imports from front_end directory.
If you're in the front_end directory and you mistakenly include
front_end in an import, e.g:

import * as UI from '../../front_end/ui/ui.js';

instead of:

import * as UI from '../ui/ui.js';

It will cause problems in a release build. This CL lands an ESLint rule
to ban these, but still allows it for unit tests.

Fixed: 1157057
Change-Id: Ia49279794616568f9e88241152e3412fcd9a8b36
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2581547
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-12-09 15:00:16 +00:00
Christy Chen 19739b881b [Loc] Migrate help to localization V2
migrate help directory

Bug: 1136655
Change-Id: Ib361747d53faa0a5cc860d331238e08d327031cc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2577943
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-12-08 21:25:02 +00:00
Christy Chen cebafe7ed6 [Loc] Migrate workspace to localization V2
Bug: 1136655
Change-Id: Ia6a4ff1c043f1b02656a9d7edf640f04f2f1e9a1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2577936
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-08 20:19:22 +00:00
Sigurd Schneider c870c46ba4 Don't generate types for deprecated Console domain
The runtime definitions are explicitly skipped here:
https://source.chromium.org/chromium/chromium/src/+/master:third_party/devtools-frontend/src/scripts/build/code_generator_frontend.py;l=202;drc=8e12f92229028121fd0cfa1a3c39825a228f341c

This means that if someone tries to access the values at runtime,
an error occurs. Removing the definition altogether is the
safest option.

Bug: chromium:1153099
Change-Id: Icc17caa99ebc68e4466ea309bf2a06b4c8cd71fe
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2575092
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2020-12-07 12:20:01 +00:00