Commit Graph
866 Commits
Author SHA1 Message Date
Christy Chen 141b00cd2c [Loc] Remove devtools_ui_strings generation scripts
All strings have been migrated to V2, so the scripts to generate V1 grd are no longer needed

Bug: 1136655
Change-Id: I96b776cccfb7017a11ead4983770b58962e272b7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2751608
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2021-03-11 07:34:57 +00:00
Christy Chen 5e32bcbcf7 [Loc] Un-hook presubmit scripts
The Localization presubmit steps include checking Loc V1 and V2:
V1: Done with migration, safe to remove
V2:
- check unused string in UIStrings (Moved to ESLint)
- check migrated directory (Done with migration, safe to remove)
- check the shape of API calls (Done by typescript or ESLint)

Since all checks are obsolete or moved, this CL removes the presubmit step to unhook the scripts inside scripts/localization. I will follow up a CL to remove the actual scripts.
The CL that introduced this step https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1931279


Bug: 1136655
Change-Id: If203607588896693a6331de606c873458b74cd6e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2746919
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2021-03-11 03:32:57 +00:00
Wolfgang Beyer 0878639185 Remove non-existing files from license-check exceptions
These files have been ported to TypeScript, which includes renaming and
adding our license header. Therefore there is no need for these
exceptions anymore.

Bug: none
Change-Id: I32d0109a19ace5b4bcb771d02beb2e23b5960e13
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2744778
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2021-03-09 11:06:15 +00:00
Philip Pfaffe 25f2974e5a Avoid hardcoding the build directory location
Bug: 1182255
Change-Id: Iefc5b0748f1a0964348e514b8e0df989be82ac0f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2742816
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2021-03-08 16:09:14 +00:00
Tim van der Lippe d3f7848567 Cleanup module.schema.json
The experiment wasn't used anywhere and the definitions specification
itself was unused as well.

R=andoli@chromium.org

Bug: none
Change-Id: I6850c493a1502ba152cab64c3e0e28385c2eb508
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2742817
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2021-03-08 15:37:54 +00:00
Tim van der Lippe fe2ba85318 Remove extensions from module.json schema
R=andoli@chromium.org

Fixed: 1134103
Change-Id: Iec6608ac9c55c4b005ade492af3fbca0b6ec1bb0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2742815
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
2021-03-08 15:33:14 +00:00
Simon Zünd 8247f33e14 [l10n] Remove 'removeUnusedEntries' test
The PRESUBMIT check using the code in question was removed in favor
of an ESLint rule. The tests have moved as well.

As these tests are not regularly run on CI, we didn't notice that the
test for localization utils broke. This CL fixes that.

R=wolfi@chromium.org

Bug: chromium:1180760
Change-Id: Iea3def7adcca7dc100931387e3978f9df29dfcfd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2742486
Commit-Queue: Simon Zünd <szuend@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2021-03-08 12:50:54 +00:00
Simon Zünd ce7765d3a2 [deps] Update eslint-pugin-mocha to 8.1.0
DISABLE_THIRD_PARTY_CHECK=Update node deps
R=tvanderlippe@chromium.org

Bug: chromium:1180760
Change-Id: Ieb4cbb72ea2537c742b7f97fa8458efb23f643e0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2739611
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-03-08 11:15:44 +00:00
Simon Zünd fec8e96b27 [l10n] Remove PRESUBMIT check for unused UIStrings entries
The check is now handled by an ESLint rule. The ESLint rule also
automatically removes unused UIStrings messages.

R=petermarshall@chromium.org

Bug: chromium:1180760
Change-Id: I633767a65b887bc946ce3d8106bae48676f0087a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2739602
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-03-08 08:09:24 +00:00
Simon Zünd 9c1be4e096 [eslint] Add rule to remove unused UIStrings messages
R=petermarshall@chromium.org

Bug: chromium:1180760
Change-Id: Ie4d210bae1bc3fbcf12316a19d28a7b894f3b3c8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2735036
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-03-08 07:42:03 +00:00
Jack Franklin 736a4b51b0 Improve path detection in hosted-mode server
This CL improves how the hosted-mode server finds the root folder. It
also removes `npm run hosted-server`, which has been broken ever since
we migrated any source files to *.ts. People shouldn't be using it and
should instead be running the server from ./out/Target/gen/scripts/....

Bug: 1182255
Change-Id: If7a37bff0c3488679c0abd69a0ec548feda8aa22
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2735895
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-03-08 07:02:19 +00:00
Tim van der Lippe 88ba72dc73 Use CSS variables for image references
This CL is the result of applying the following regex:

```
url\(Images/(.+)\.\w+\)
```

and replacing it with

```
var(--image-file-$1)
```

R=jacktfranklin@chromium.org

Bug: 1183361
Change-Id: I3255dd23c817b050deaa55835eb8c715d00387aa
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732375
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-03-04 15:31:13 +00:00
Alex Rudenko 314100ad63 Reland "Exclude data files from inspector_overlay targets"
This is a reland of d5d9b950cb
This CL has to be landed after crrev.com/c/2732043 lands.

Original change's description:
> Exclude data files from inspector_overlay targets
>
> Fixed: chromium:1180230
> Change-Id: I99f736d53f7b653a46da8ecd572e4b3766e1798f
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2716289
> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>

Bug: chromium:1180230
Change-Id: I3afb837b8f59a0a11dee9b74e3db54f0e2c4e48f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732386
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-03-04 13:45:23 +00:00
Simon Zünd 4a49e2d048 [eslint] Fix bug in rule that looks at every top-level object literal
The rule looks up the 'name' attribute on the 'VariableDeclarator'
node, which does not exist, instead of the 'name' attribute on the
corresponding Identifier node.

This CL fixes that by extracting the Identifier check into a common
helper and adding a regression test.

R=petermarshall@chromium.org

Bug: chromium:1180760
Change-Id: If82b24fb27f12a4ebd665b99daf5dea747bc866b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2734617
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-03-04 13:13:44 +00:00
Simon Zünd 333a8a04f0 [eslint] Rename l10n rule for fully locked and placeholder-only phrases
R=petermarshall@chromium.org

Bug: chromium:1180760
Change-Id: I7b489153521770124f0846e530803d5aa26e5c9f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2734614
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
2021-03-04 13:07:54 +00:00
Jack Franklin c66cad4c17 [Theme Colors] exempt var(--image-file-*) from rule
Fixed: chromium:1184642
Change-Id: I902aa023dc18f46c00045a4522bfe106678f77ba
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2735038
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-03-04 12:37:12 +00:00
Simon Zünd b904628c78 [eslint] Prohibit l10n phrases consisting only of a sinlge placeholder
R=petermarshall@chromium.org

Bug: chromium:1180760
Change-Id: I11726e1d58835a3c1acbba85d137fb2fa1cfc522
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2734474
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-03-04 10:19:02 +00:00
Eric Leese a121a6bae6 Revert "Exclude data files from inspector_overlay targets"
This reverts commit d5d9b950cb.

Reason for revert: Seems to have broken the autoroller due to missing files in fuchsia build. Reland if problem doesn't go away.

https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8853712067071111344/+/steps/compile__with_patch_/0/stdout

Original change's description:
> Exclude data files from inspector_overlay targets
>
> Fixed: chromium:1180230
> Change-Id: I99f736d53f7b653a46da8ecd572e4b3766e1798f
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2716289
> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>

Change-Id: I044148c6d76898657e52634a7fd0205bad355a7e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732385
Auto-Submit: Eric Leese <leese@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-03-04 06:55:13 +00:00
Simon Zünd 67789afce7 [eslint] Prohibit fully locked phrases in UIStrings object
Fully locked phrases should not go through translation. This CL adds
a new eslint rule that prevents the usage of phrases to UIStrings
where the whole phrase is locked.

R=petermarshall@chromium.org

Bug: chromium:1180760
Change-Id: I131ee90c902a3a44070e1a57dd554e51eb1278f1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732187
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-03-04 05:49:42 +00:00
Alex Rudenko d5d9b950cb Exclude data files from inspector_overlay targets
Fixed: chromium:1180230
Change-Id: I99f736d53f7b653a46da8ecd572e4b3766e1798f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2716289
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-03-03 19:13:05 +00:00
Jack Franklin 33f773352d Fix use_theme_colors rule incorrectly flagging background-image: var(...) usage
I have also checked the codebase and there are no current instances where this
bug has caused any changes or incorrect stylelint-disable lines.

Fixed: chromium:1184242
Change-Id: I1eaa2dfd54a7a6062139be7186730f6bb844b349
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732370
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-03-03 16:16:49 +00:00
Tim van der Lippe ee04160318 Remove resources/inspector output
Now we no longer generate files into the resources/inspector build
output directory.

R=alexrudenko@chromium.org

Bug: 1174013
Change-Id: I89ac495a715c7b68a14c75d1984ba57802e7ac6d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732369
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2021-03-03 15:55:29 +00:00
Tim van der Lippe 46afa7884a Remove copy_gen_to_resources
This template was actually unused.

R=alexrudenko@chromium.org

Bug: 1174013
Change-Id: Ie24f01feb196bd1f37b4434aaa86d52f57444653
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732188
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2021-03-03 15:30:50 +00:00
Jack Franklin 65a3a7fb32 Parameterise run_lint_check_css script
It now takes a flag to customise the CWD that it runs, and also
correctly passes all stylelint arguments through. Before any stylelint
argument that had a dash in would be passed through twice, and that
would cause stylelint to error.

Bug: 1184228
Change-Id: I21c0d9561dcd055968cf4bf9b4514b8184040b88
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732368
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-03-03 15:27:19 +00:00
Tim van der Lippe 96278f3164 Remove copy_sources_to_resources
R=alexrudenko@chromium.org

Bug: 1174013
Change-Id: I6a9ac5e5b961b70ab33107fdd352e1a8a64a13ca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732367
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2021-03-03 15:25:29 +00:00
Tim van der Lippe 5233a7b7ec Reland "Stop copying to resources/inspector in devtools_{module,entrypoint}"
This reverts commit bdfb194fcb.

Reason for revert: Upstream reland (https://crrev.com/c/2714599) has landed.

Original change's description:
> Revert "Stop copying to resources/inspector in devtools_{module,entrypoint}"
>
> This reverts commit 037c96df04.
>
> Reason for revert: upstream revert: https://crrev.com/c/2713518
>
> Original change's description:
> > Stop copying to resources/inspector in devtools_{module,entrypoint}
> >
> > This simplifies the JavaScript generating tasks in the DevTools
> > build system to stop copying to resources/inspector. The output
> > to the gen-folder will remain as-is.
> >
> > After this change, it will no longer be possible to use
> > resources/inspector as build output location when using
> > --custom-devtools-frontend. Instead, the location should be
> > updated to use gen/front_end instead. Engineers are encouraged
> > to remove the resources/inspector build output folder to ensure
> > stale build artifacts aren't accidentally used while working
> > on DevTools locally.
> >
> > Note that there are still files in resources/inspector generated by
> > other actions in the build system. We will clean these up in
> > follow-up CLs.
> >
> > R=​alexrudenko@chromium.org,jacktfranklin@chromium.org
> >
> > Bug: 1174013
> > Change-Id: I750d04e58c5fa85054b8451c3582b58a3f7c77ba
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2678696
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
>
> Bug: 1174013
> Change-Id: I9c4c561a59d808d3fdd1564475ec5ba21955d577
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2714545
> Auto-Submit: Changhao Han <changhaohan@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>

Bug: 1174013
Change-Id: I52c4813c5cf6ec5225f731beb0e501e7b5c6c0be
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2721954
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-03-03 12:04:29 +00:00
Simon Zünd fb3246d320 [eslint] Only allow calls to i18nString under certain conditions
This CL heuristically prevents i18nString calls during module
instantiation time. Translated strings are most likely not available
yet (depending which module is loaded), so usually i18nLazyString
should be used instead.

The check looks at all the AST ancestor nodes of a call expression
and checks that function declaration and similar nodes are somewhere
on the ancestor chain. This DOES NOT guarantee that no calls to
i18nString are made but it is a good heuristic and the lint check
found a couple of wrong use-sites already that have been fixed
before this CL landed.

R=petermarshall@chromium.org

Bug: chromium:1180760
Change-Id: I04199fc54935b88d142a793f407438a718a104d6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2731567
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-03-03 08:34:58 +00:00
Jack Franklin 02f0dbb824 Lint for commented out console.log calls
Fixed: 1183727
Change-Id: I7bb5a859fdab4c42693623e87a3763fe141a46e0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2729038
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-03-03 07:44:48 +00:00
Jack Franklin 41a717c58f Remove scripts/migration
The great ES Modules migration has long finished so we don't need these
scripts anymore :)

Bug: none
Change-Id: I30874c85c134527b235b0941573786439ffa3740
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2729039
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-03-02 12:35:16 +00:00
Jack Franklin 0155f7d199 Provide --component-docs-base argument to components server
The component server assumes that the examples live in
root/out/Target/front_end/component_docs, but now you can pass
--component-docs-base to change that.

Bug: 1182255
Change-Id: I143aee02bcd2a32e4f6ea163ac5edd5f44156bdc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2727422
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-03-02 11:01:41 +00:00
Jack Franklin 6dbe837682 Lint border-color and outline usages in CSS.
Updates the use_theme_colors rule to pick out border-color rules.

Fixed:chromium:1182679
Change-Id: I0f0f9b4a30f588e901b57131c796d73f2ac73656
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2722441
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-03-02 07:20:46 +00:00
Jack Franklin d0bac676f2 Update run_test_suite to support --test-suite-path
The current test suite runner assumes the paths; you pass
--test-suite=interactions and it assumes that they live in
out/TARGET/gen/test/interactions. This CL removes that assumption by
asking people to pass --test-suite-path, which would be
out/gen/interactions.

We will remove the --test-suite flag, but for now we're keeping it
around so the bots can still run their tests. I will file a bug to ask
that the bots have their recipes updated.

Bug:1182255
Change-Id: I6d9e5d419231845047394c5f7cbd0c74ebad3a58
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2722448
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-03-01 10:24:17 +00:00
Liviu Rau af66926e7b Whitespace to trigger builders
TBR=tvanderlippe@chromium.org
Bug: chromium:1182199
Change-Id: I94bdabc63700c1c8ae6c64d6d8e780700587a2bf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2726557
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
2021-02-28 18:31:08 +00:00
Vidal Guillermo Diazleal Ortega 4786bc4eee [Loc] Migrate emulated devices to Localization V2
This CL removes localization from the emulated_devices module for the
following reasons:
- The module does not have a UI surface where the strings are shown; it
declares the strings while emulation consumes and show them.
- Most of the strings declared in the module are branded strings which
are out of scope for translation. (e.g Android/IOS phone models)
- The only strings need to be localized here will be added to
  emulation:
    - "Laptop with HiDPI screen"
    - "Laptop with MDPI screen"
    - "Laptop with touch"

In a similar way as done in here:
2631106: [Loc] Migrate heap_snapshot_worker to Localization V2 |
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2631106

Bug: 1136655
Change-Id: I88b12f7adb955b7236f79bb862dba0db7dc5d5cc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2707864
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Kalon Hinds <kahinds@microsoft.com>
2021-02-27 02:12:35 +00:00
Kalon Hinds 9678fd4885 [Loc] Migrate inspector_main to Localization V2
Bug: 1136655
Change-Id: Ie2af3f5e8053ab1aad2a8bf35a49965493f66bd4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2719830
Commit-Queue: Kalon Hinds <kahinds@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-02-26 20:40:55 +00:00
Kalon Hinds 1fb8543be8 [Loc] Migrate emulation to Localization V2
Bug: 1136655
Change-Id: I935a118ad134ebce061395baf1e6721cef85d7c5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2522640
Commit-Queue: Kalon Hinds <kahinds@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-02-26 20:02:05 +00:00
Vidal Guillermo Diazleal Ortega 8d2f5c2e29 [Loc] Migrate main to Localization V2
- Migrating main to use localization V2 APIs
- Removed main grdps

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

Bug: 1136655
Change-Id: I847a3e39d6d89069b11913fd2202a230db5c1b14
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2721232
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-02-26 19:08:45 +00:00
Jan Scheffler 9aca8c7402 [JSDOC2TS]: Migrate host
Bug: chromium:1158760
Change-Id: I86a4477d44617adac598f107755fbd3db49d7bf2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2718291
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-26 17:18:55 +00:00
Tim van der Lippe 64b277df88 Remove har_importer/module.json
R=andoli@chromium.org

Bug: 1127902
Change-Id: Ib1d260cc1d58c4517243e477600e4f1815aeef09
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2704478
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2021-02-26 16:26:45 +00:00
Jack Franklin 343c141919 merge inspectorStyle.css and inspectorCommon.css
It seems there is no requirement for these files to be split; they don't
seem to have a logical split and they are both injected into the `body`
element when DevTools runs. If we kept both of these files around, we'd
have to inject them both into the component docs helpers, and deal with
both of them when it comes to figuring out where legacy CSS variables
are defined.

To make it a bit simpler I've merged `inspectorStyle` into
`inspectorCommon`. I went this way because:

* `inspectorCommon.css` is (I think!) a better name than `inspectorStyle.css`
* `inspectorCommon.css` was bigger.

I also drive-by disabled the stylelint `comment-empty-line-before`,
which was forbidding empty lines before any CSS comments; which made the
entire file feel very squashed!

Bug: none
Change-Id: Ifaa834c7bf56291561e2e5cc124c4efd85c3cc56
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2716285
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-26 15:50:55 +00:00
Simon Zünd e15f3efe0a [eslint] Prevent the export of the UIStrings object
Sharing translations between files is not officially supported yet
and even if we would do so, the path will go most likely over the
module's respective ModuleUIStrings file (already happening in some
cases).

Note that this CL doesn't yet enable the rule, as it would touch
all files using UIStrings objects currently.

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

Bug: chromium:1180760
Change-Id: I96aee4e214809d76d65a21962974e9cfb61e4f46
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2718298
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-02-26 15:18:05 +00:00
Jack Franklin 0943df4002 Fix detection of out/Target from component docs when running via npm.
Bug: none
Change-Id: Ic372c065b1c6ffd441ee8dd523604ce368792ac7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2721951
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-02-26 12:49:55 +00:00
Changhao Han 5663e48217 Add override prefix to stylelint theme color logic
Bug: chromium:1171775
Change-Id: Ia63217e154009034a585e8ccbd8ac482da519fae
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2720368
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
2021-02-26 11:52:44 +00:00
Jack Franklin 8742dc884c Make component docs server paths more robust.
Bug: none
Change-Id: I18c993b6aed44afc750928def0c6f0685f947d4b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2720246
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-02-26 09:50:54 +00:00
Vidal Guillermo Diazleal Ortega 697d6a0b7b [Loc] Migrate sdk to Localization V2
- Migrating sdk to use localization V2 APIs
- Removed sdk grdps

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

Bug: 1136655
Change-Id: I0b67544324cfb6d7d66547d5e4ae3ad5784e1c93
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2719022
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-02-25 19:15:09 +00:00
Christy Chen 1825c61352 [Loc] Migrate common to localization V2
Migrate common directory

Disable two tests that require updates due to this migration https://chromium-review.googlesource.com/c/chromium/src/+/2692841

Bug: 1136655
Change-Id: I87452f217163c13756d5fdc971f6a445bb2a3317
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2668967
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2021-02-25 12:17:08 +00:00
Jack Franklin 03412d8a25 Make cwd and NODE_PATH absolute in test runner
This CL makes the custom node_modules_path absolute, because Node
requires it to be an absolute path, and does the same thing with the
custom `cwd` argument. Else if you pass a custom `cwd` you'll get errors
in the test suite as running `mocha --config ./foo/config.js` doesn't
work; Mocha also wants the path to be absolute.

Bug: none
Change-Id: Ib626075f4dd1c00fa2998d55fda8c212b8e853c0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2718297
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-02-25 12:14:08 +00:00
Jack Franklin 8425c1bb3e Parameterise test runs
This CL adds two flags to our run_test_suite helper:

* --cwd to set the current working directory to use as a base to find
  tests
* --node_modules-path, which sets NODE_PATH to the given value. This can
  be used to aid Node in resolving require statements if node_modules
  aren't in the local node_modules folder.

Bug: none
Change-Id: I6c7f83d028d3ad689b61642aa9a5e51177c0628d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2718296
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-02-25 11:29:58 +00:00
Vidal Guillermo Diazleal Ortega 267cafb44e [Loc] Migrate host to Localization V2
- Migrate host to use Localization V2 APIs.
- Removed host grdps

Bug: 1136655
Change-Id: I35dec4e896b0f814dbc8acc6e610a0663dd88f0c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2717169
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-02-24 17:25:48 +00:00
Tim van der Lippe 51257fc619 Update CodeMirror to 5.59.4
This pulls in the fix for
https://github.com/codemirror/CodeMirror/issues/6599

It also fixes an issue with the darkmode sheet generation that
had the wrong path for Chrome binaries on Mac.

R=jacktfranklin@chromium.org

Bug: 1180740
Change-Id: I8b879bdefb0567c4d44b457255c88ef4395924c9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2716287
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-02-24 12:34:38 +00:00