Commit graph

16 commits

Author SHA1 Message Date
Matthieu Riegler
f8f8928210 fix(devtools): prevent devTools to load when not text/html document (#48021)
On Firefox, Angular DevTools was breaking the XML display because of the script injected
Based on contentType, we won't inject that script anymore

Fixes #48017

PR Close #48021
2022-11-17 09:35:40 -08:00
AleksanderBodurri
a910c8328a build(devtools): migrate to manifest v3 (#47575)
Previously we built DevTools for all browsers with version 2 of the manifest file format.

This commit includes a number of refactors and API additions that will enable us to build DevTools with version 3 of the manifest file format.

The manifest v3 build of Angular DevTools has been tested on Chrome, Edge, and Safari.

Notably, the Firefox version of Angular DevTools remains as a manifest v2 build. Firefox does not yet support manifest v3 in it's latest stable release. When Firefox makes this transition, a follow up PR will update the Firefox manifest file to version 3.

Because Firefox still needs v2, we need to keep some old v2 APIs around in our background page (service worker in v3) that will execute conditionally based on if the extension was built for v2 or v3. This is determined with the chrome.runtime.getManifest().manifest_version API.

PR Close #47575
2022-10-11 22:47:22 +00:00
Sabareesh Kappagantu
32cad55f0d feat(devtools): implement inspect functionality for directives (#47334)
Previously, you could inspect the source code of a component but not a directive. This commit adds functionality to inspect source code for directives as well. Now you will see the inspect icon on the header component of each directive on a selected element.

PR Close #47334
2022-09-19 18:59:13 +02:00
Paul Gschwendtner
915e82d854 build: simplify sass consumption of Angular CDK/Material in devtools (#46642)
Instead of listing every file manually, we can use the available rule
that extracts Sass dependency files automatically from `@npm//`.

PR Close #46642
2022-07-01 10:20:51 -07:00
mgechev
12a0cad02e build(devtools): update the extension version (#46289)
Update the version for the Firefox and Chrome extension to enable us
to publish the latest support of standalone components.

PR Close #46289
2022-06-10 15:23:12 +00:00
mariu
c3205d0962 feat(devtools): Create browser specific styles for chrome and firefox (#46037)
Create browser specific styles for chrome and firefox

PR Close #46037
2022-05-23 14:00:10 -07:00
AleksanderBodurri
3a468813ca fix(devtools): stop relying on getAllAngularRootElements in Angular DevTools' backend code. (#45983)
With the introduction of standalone components, it is no longer guaranteed that getAllAngularRootElements will be available on the global object. This PR removes the dependency on this function so that DevTools can continue to work for Angular applications that use `bootstrapApplication`.

PR Close #45983
2022-05-13 20:08:49 +00:00
Keith Li
5e404d3114 feat(devtools): support icons in offline mode (#45430) (#45743)
Add support to material design icons in offline mode for Angular Devtools. Self hosting the web font so icons are loaded regardless of network connection.

Bring the font file as well as its corresponding css file from third_party repo through bazel into shell-browser directory while building.

PR Close #45743
2022-05-12 09:17:05 -07:00
AleksanderBodurri
b7fca64828 build(devtools): Optimize prod build for Angular DevTools (#45886)
Uses `createEsbuildAngularOptimizePlugin` from dev-infra-private and passes in `GLOBAL_DEFS_FOR_TERSER_WITH_AOT` into a new esbuild prod configuration. Notably, this removes references to `ngDevMode` from the final build and enables minification.

PR Close #45886
2022-05-05 15:33:14 -07:00
mgechev
136839054c refactor(devtools): remove support for v11 and older versions of Angular (#45883)
In Angular v12 we introduced debugging APIs sufficient for DevTools.
Prior to that Angular DevTools accesses the logical data structures of
Ivy directly, which sometimes produces suboptimal results and skips
dynamically inserted content.

With the end of v11's LTS, we'll support only Angular v12 and up.

PR Close #45883
2022-05-05 15:28:42 -07:00
Kristiyan Kostadinov
29039fcdbc feat(core): support TypeScript 4.7 (#45749)
Adds support for TypeScript 4.7. Changes include:
* Bumping the TS version as well as some Bazel dependencies to include https://github.com/bazelbuild/rules_nodejs/pull/3420.
* Adding a backwards-compatibility layer for calls to `updateTypeParameterDeclaration`.
* Making `LView` generic in order to make it easier to type the context based on the usage. Currently the context can be 4 different types which coupled with stricter type checking would required a lot of extra casting all over `core`.
* Fixing a bunch of miscellaneous type errors.
* Removing assertions of `ReferenceEntry.isDefinition` in a few of the language service tests. The field isn't returned by TS anymore and we weren't using it for anything.
* Resolving in error in the language service that was caused by TS attempting to parse HTML files when we try to open them. Previous TS was silently setting them as `ScriptKind.Unknown` and ignoring the errors, but now it throws. I've worked around it by setting them as `ScriptKind.JSX`.

PR Close #45749
2022-04-29 12:19:45 -04:00
Sumit Arora
2eb39c0878 fix(devtools): inline loading svg (#45762)
* inlined loading animation svg instead of using absolute url
* removing unused assets folder from the build

PR Close #45762
2022-04-27 09:07:38 -07:00
Sumit Arora
b5f39c5da1 docs(devtools): updating firefox documentation (#44952)
updating typo

PR Close #44952
2022-04-12 18:41:37 +00:00
Sumit Arora
e589bc6227 feat(devtools): added string flag for browser support (#44952)
* Added `flag_browser` to toggle between different browser builds chrome and firefox
* Updated build command to support new flag configuration

PR Close #44952
2022-04-12 18:41:37 +00:00
Sumit Arora
bc0b6fe67d feat(devtools): adding firefox support (#44952)
* Updating manifest.json to new build structure
* Adding doctype to pages to remove warnings

PR Close #44952
2022-04-12 18:41:37 +00:00
Sumit Arora
ceb19c044a feat(devtools): renaming shell-chrome (#44952)
Renaming `shell-chrome` to `shell-browser` contains the build that supports both browsers.

PR Close #44952
2022-04-12 18:41:37 +00:00