Commit graph

495 commits

Author SHA1 Message Date
hawkgs
9cf12b0694 fix(devtools): add aria-labels to icon-only buttons (#61981)
Add aria-labels to the buttons that have an icon-only content.

PR Close #61981
2025-06-10 12:03:30 -07:00
hawkgs
a3c69260a1 fix(devtools): material components background colors (#61969)
Add overrides for the default background colors of some the Material components currently in use by Devtools. Most likely a regression by a recent Material version bump.

PR Close #61969
2025-06-09 09:44:31 -07:00
Milo
fd2fca8bce refactor(devtools): check if signal graph is supported (#61915)
add a new devtools field in SupportedApis to check if the
getSignalGraphApi exists

PR Close #61915
2025-06-09 09:43:51 -07:00
Joey Perrott
708e4f4f11 refactor(devtools): use zone.js from npm instead of from the local build (#61947)
Rely on zone.js from the npm managed version instead of the locally built copy

PR Close #61947
2025-06-06 15:20:11 -07:00
Milo
0576724225 feat(devtools): add getSignalNestedProperties (#61917)
this enables devtools to preview and expand signal values as trees

PR Close #61917
2025-06-06 10:57:09 +02:00
Milo
9bb04e5ac8 feat(devtools): update colors for signals pane (#61918)
add dynamic-green-02 and dynamic-blue-02

PR Close #61918
2025-06-06 10:55:05 +02:00
Milo
8e861eff1a feat(devtools): add button component (#61549)
enables flexible styling of button components with ng-button attribute

PR Close #61549
2025-06-05 10:09:51 +02:00
Doug Parker
c45afbc2a8 docs: streamline DevTools release docs (#61883)
This makes a few changes to try to smooth over the process:
1. Updates changelog commands to filter out `refactor` commits.
2. Tweaks the changelog command to generate a markdown list for easy copy-pasting.
3. Links directly to the store pages to cut down on clicks.
4. Moves the source code section a bove the reviewer note and changelog, to match the ordering of the Firefox Add Ons form.

PR Close #61883
2025-06-05 09:56:57 +02:00
Doug Parker
75520eb7f7 release: bump Angular DevTools version to 1.0.33 (#61872)
PR Close #61872
2025-06-04 14:06:36 -04:00
Milo
4fa1dca72a feat(devtools): add getSignalGraph api to devtools protocol (#61548)
add a new devtools backend api getSignalGraph that emits a
latestSignalGraph to the devtools frontend

PR Close #61548
2025-06-03 10:47:57 -04:00
hawkgs
e5e0c777b7 refactor(devtools): defer tabs (#61241)
Defer tab loading and rendering on app initialization.

PR Close #61241
2025-06-03 07:10:56 -04:00
Paul Gschwendtner
b7c5645f05 build: migrate packages/compiler-cli to ts_project (#61826)
This commit migrates the remaining pieces of `compiler-cli` to
`ts_project`. This involves a few more things during migration:

- the `ng_module` ngc_wrapped rule broke as part of this change, so we
  switched it to `ts_project` too. This logic is soon gone anyway.

- we needed an extra pnpm "package.json" for the linker babel test. This test is
  loading from the real compiler-cli npm package. Babel needs a real
  node module for this, so this solution seems reasonable. It may be
  worth exploring in the future to move this test into an integration
  test though.

- the older integrationtest in compiler-cli is removed as the coverage
  is much better with the compliance test suite and this test.

PR Close #61826
2025-06-03 11:41:52 +02:00
AleksanderBodurri
170211cb71 fix(devtools): issue where on initial render DevTools would not load properly (#61812)
Commit 3e70d64 introduced cdk version 20.0.0-rc2 which introduced a change to how the cdk virtual scroll sets some internal state.

Previously in DevTools we were using a computed incorrectly to respond to changes in the directive forest and apply them to the underlying datasource. With the change to the CDK shown above, this incorrect usage caused us to attempt to update underlying signals in the virtual scroll directive while within a computed callback, throwing an error.

This commit corrects our usage by swapping from a computed to an effect, allowing the underlying signals in the scroll directive to be updated without error.

PR Close #61812
2025-06-02 12:36:17 -04:00
Milo
6f16d92988 feat(devtools): inspect signals (#61540)
add a new global api for the devtools connector to jump to the source of
a computed or effect

PR Close #61540
2025-06-02 09:35:30 -04:00
Sumit Arora
582fedd726 refactor(devtools): fixing PR comments and adding unit tests (#59999)
- Update code to fix PR comments and cleanup code
- Add unit tests for the new code

PR Close #59999
2025-05-30 09:48:12 -04:00
Sumit Arora
280119fec0 refactor(devtools): adding route details panel for selected route (#59999)
On clicking a route in the router tree, the route details panel is displayed.
- The panel shows the details of the selected route, including the path, component, providers, guards etc.
- Clicking on a chip will navigate to the corresponding source file in the editor.
- Clicking on the path will navigate to the corresponding route in the router tree.

Demo Application Source: https://github.com/sumitarora/angular-routes-demo
Demo Application Deployed: https://sumitarora.github.io/angular-routes-demo/#/

PR Close #59999
2025-05-30 09:48:12 -04:00
hawkgs
21fa353591 refactor(devtools): introduce a more sophisticated directive forest filter (#61085)
Parse the filter string and match by component and directive names independently.

PR Close #61085
2025-05-30 09:46:22 -04:00
Doug Parker
a28cadc646 release: bump Angular DevTools to version 1.0.32 (#61620)
PR Close #61620
2025-05-22 10:52:16 -07:00
Milo
fc14ca5e34 refactor(devtools): switch default font to material symbols (#61281)
update from Material Icons to Material Symbols, and use the local
font copy instead of Google fonts to avoid version mismatches

PR Close #61281
2025-05-20 08:53:51 +00:00
hawkgs
f5c67f1cde refactor(devtools): introduce responsive-split directive (#61204)
The `ResponsiveSplitDirective` adds responsive behavior to the `as-split` component by a provided width to height ratio.

PR Close #61204
2025-05-20 08:51:59 +00:00
hawkgs
34f60549f2 refactor(devtools): fix profiler tree map viz background color (#61330)
Fixes a regression caused most likely by #60374.

PR Close #61330
2025-05-16 07:43:51 +00:00
Doug Parker
d4ef72d378 release: bump Angular DevTools version to 1.0.31 (#61355)
PR Close #61355
2025-05-15 10:10:52 -07:00
Doug Parker
35b944dbec refactor(devtools): remove release process overview and add step to check for release (#60892)
The release process overview is out of date and does not accurately reflect section headers. It's not worth the maintenance effort of keeping it in sync with the rest of the doc.

Added a step 0 to check if there's actually anything to release, reusing the command from later in the doc.

Also makes a few random small corrections to reflect the new release process.

PR Close #60892
2025-05-15 09:42:51 -07:00
Matthieu Riegler
5af8afee4b refactor(devtools): fix button styling on the profiler frame selector (#61309)
Missing standalone import.

PR Close #61309
2025-05-14 09:27:13 -07:00
Joey Perrott
ae0ad878eb build: rename devtools ts_library to ts_project (#61317)
Rename ts_library to ts_project throughout devtools

PR Close #61317
2025-05-14 08:51:21 -07:00
Joey Perrott
31efc4bd24 build: migrate devtools to use ng-project (#61317)
Migrate devtools to use ng-project

PR Close #61317
2025-05-14 08:51:20 -07:00
Paul Gschwendtner
54e785683a build: prepare for compiler-cli to be using ts_project (#61181)
Prepare the compiler-cli package for being ready for migration
to `ts_project`.

PR Close #61181
2025-05-09 15:59:46 +00:00
Joey Perrott
e2c763a12c build: migrate adev devtools package to use ts_project (#61210)
Migrate usages to ts_project

PR Close #61210
2025-05-08 09:38:30 -07:00
Matthieu Riegler
eda8909772 fix(devtools): support defer blocks in IdentityTracker (#61139)
This reverts the fix of #61080 which wasn't adequate.

PR Close #61139
2025-05-06 13:44:37 -07:00
Matthieu Riegler
d47d6720e7 fix(devtools): fix profiler support with @defer blocks (#61080)
Prior to this change, the devtools profile logged warnings "Unable to find parent node for ...".

PR Close #61080
2025-05-01 14:58:21 -07:00
Matthieu Riegler
e6a34277fc feat(devtools): defer blocks support (#60629)
This commit adds the support for defer block in the Angular DevTools.

@defer block are now visible in the directive tree and give access to defer & hydration details.

This feature also brings support of incrementation hydration.

PR Close #60629
2025-04-29 22:07:47 -07:00
Andrew Scott
10033087b5 refactor(devtools): update zoneless provider name (#61051)
updates the zoneless provider name in the devtools example

PR Close #61051
2025-04-29 20:20:02 +00:00
Matthieu Riegler
2df00c9b4b build(devtools): cleanup dependencies (#60936)
Removing `platform-browser-dynamic` because we don't need it anymore.

PR Close #60936
2025-04-29 12:16:16 -07:00
hawkgs
a1deb87a8e refactor(devtools): improve directive explorer filtering (#60672)
- Highlight only the matched part of the text
- Select the first match by default
- Show the matches count along with the currently selected one
- Minor UI fixes and performance optimizations

PR Close #60672
2025-04-24 09:39:22 -07:00
hawkgs
6845d2a92b refactor(devtools): fix resolution path viz padding (#60971)
Adjusts the right padding appropriately.

PR Close #60971
2025-04-24 09:36:51 -07:00
Doug Parker
c6b41e15fd release: bump Angular DevTools version to 1.0.30 (#60992)
PR Close #60992
2025-04-23 14:36:26 -07:00
Doug Parker
6ce7c4cb4b fix(devtools): call ng.getDirectiveMetadata with the component instance (#60991)
`ng.getDirectiveMetadata` receives the component instance, not the raw DOM element.

This assumes that `ng.getComponent` is implemented in all environments and that the root element itself is a component.

PR Close #60991
2025-04-23 14:34:33 -07:00
Doug Parker
1983a5cbe9 release: bump Angular DevTools version to 1.0.29 (#60963)
PR Close #60963
2025-04-23 08:44:16 +02:00
hawkgs
cebb9d2c1e refactor(devtools): disable unsupported features (#60585)
Prepare the app for Wiz & ACX and handle unsupported features by disabling their respective UI.

PR Close #60585
2025-04-22 21:29:04 +02:00
hawkgs
037dede0a0 refactor(devtools): improve components tab side pane UI (#60901)
Improve the overall UI/UX. Drop the expandable containers shadows in favor of solid borders.

PR Close #60901
2025-04-18 21:14:15 +02:00
hawkgs
f838726afb refactor(devtools): typography (#60531)
Introduce typography placeholder classes and employ them across the app where applicable.

PR Close #60531
2025-04-18 08:35:59 +02:00
hawkgs
2e87130b1f refactor(devtools): fix build warnings (#60902)
Fixes two build warnings related to one of the templates and a SCSS partial file.

PR Close #60902
2025-04-18 08:27:10 +02:00
Doug Parker
5d9a678cc0 release: bump Angular DevTools version to 1.0.28 (#60893)
PR Close #60893
2025-04-17 11:24:59 +02:00
Doug Parker
b2c8fb3c6b refactor(devtools): update release process to commit before publishing (#60646)
This moves the commit step to the start of the process and releases after merging it. This has two key benefits:
1. The commit history now reflects the actual release (ex. any DevTools commits before the release commit are actually included in that release). Previously the changes in a release were dictated by the release PR branch, which is an ephemeral target. Other PRs may be merged to `main` before the release PR, and those changes would not be included in that DevTools release.
2. We can now compute a changelog based on this more accurate history.

The downside to this change is that release PRs are now blocking releases in a way they weren't before (which is likely desirable in the grand scheme of things), meaning we need to be more diligent about merging them in a timely manner.

I added a short script for listing DevTools commits since the last release, taking advantage of the more accurate commit history. This should make changelog generation a lot easier, even if there's still a manual process of rewriting the commit message into a line item in release notes.

Also made a few minor cleanup changes such as escaping the markdown in the suggested reviewer note so it can be more easily copy-pasted from the rendered format of this doc.

PR Close #60646
2025-04-15 09:19:39 -04:00
hawkgs
c5ca597aeb refactor(devtools): switch to components tab whenever the inspector is used (#60694)
Switch to the components tab, if not there, when a component is selected via the inspector.

PR Close #60694
2025-04-14 09:22:05 -04:00
hawkgs
7c1a16db26 refactor(devtools): create highlight overlay on node selection (#60744)
Currently, highlighting works only when a directive explorer node is hovered. The change enables this feature on node selection as well.

PR Close #60744
2025-04-14 09:20:24 -04:00
Paul Gschwendtner
5c575a8ac9 build: ensure material dependencies are properly linked for devtools (#60822)
This is a follow-up to the recent devtools linking change, leveraging
the dedicated package that we are also using in the components
repository; avoiding future duplication.

The latest version of that package contains a fix for an issue where
the linked bundles did not rewrite imports to shared chunks.

Such imports need to also point to their linked variants.

PR Close #60822
2025-04-10 11:53:53 -04:00
hawkgs
2021f64612 refactor(devtools): reduce material form field density globally (#60633)
Make the form field density consistent across the app.

PR Close #60633
2025-04-10 11:22:44 -04:00
Doug Parker
8b5ba62f63 release: bump Angular DevTools version to 1.0.27 (#60642)
PR Close #60642
2025-03-31 17:50:20 +00:00
AleksanderBodurri
c5d841a7a5 fix(devtools): catch firefox non-top level frame error case when using utilities APIs (#60430)
Previously the `frameUrl` option in `chrome.devtools.inspectedWindow.eval` would throw errors when used in Firefox, preventing inspect source functionality for firefox users even if they don't need to target a particular frame on the page (they are on the top level frame with Angular DevTools).

Now this behaviour is as follows:

Firefox user that has the top level frame selected -> DevTools inspect functionality works as expected.

Firefox user that has a non-top level frame selected -> DevTools now renders a snackbar message informing the user of the limitation.

PR Close #60430
2025-03-31 17:09:56 +00:00
hawkgs
8b529debf9 refactor(devtools): fix firefox breadcrumbs (#60552)
Expand the breadcrumbs container to fit the directive explorer width and remove the scrollbar.

PR Close #60552
2025-03-31 16:56:55 +00:00
Doug Parker
de5c891404 refactor(devtools): display Wiz non-prop data as "State" (#60475)
This is the more common term for Wiz developers to reduce confusion between Wiz "props" and standard JS "properties".

PR Close #60475
2025-03-27 20:26:12 +00:00
Doug Parker
96f36d62c8 refactor(devtools): use ng.getDirectiveMetadata for component name (#60475)
This reads the component name from `ng.getDirectiveMetadata`.

PR Close #60475
2025-03-27 20:26:12 +00:00
Doug Parker
d639a8d1f9 refactor(devtools): display directive metadata from Wiz and ACX (#60475)
This updates the DevTools protocol to send Wiz/ACX metadata in addition to Angular metadata. Fortunately we don't need to worry about backwards compatibility here (`framework` is required for example), but the design roughly mirrors `DirectiveDebugMetadata` in `@angular/core`.

Beyond that, this is mostly plumbing through an extra data slice in the form of `props` provided by Wiz. An earlier version implemented `events` as their own slice as well, but was removed as there is currently no generic way to disambiguate events from any other form of callback passed in as a prop. Instead, event callbacks are visualized as functions under the "Props" category.

Working with `DirectiveMetadata` as a union is unfortunately a bit annoying since it requires casting to more specific `{Angular,Acx,Wiz}DirectiveMetadata` types for TS to allow property access, even when the properties are optional anyways.

This commit is mostly for adding Wiz, but does add a bit of ACX functionality which is not fully tested.

PR Close #60475
2025-03-27 20:26:12 +00:00
Doug Parker
ebf6516190 refactor(devtools): make component-only properties on DirectiveMetadata optional (#60475)
This type was incorrect, as only components have `encapsulation` and `onPush` values. `ng.getDirectiveMetadata` does not return these properties for directive inputs.

Unfortunately the `| Partial<AngularComponentDebugMetadata>` is necessary to reference these properties or else TypeScript will reject their usage.

PR Close #60475
2025-03-27 20:26:12 +00:00
Doug Parker
ab9dd73a92 refactor(devtools): removes unused classes (#60475)
These `cy-*` classes are not referenced in any styles and appear to be unused.

PR Close #60475
2025-03-27 20:26:12 +00:00
Doug Parker
61ff42a263 refactor(devtools): remove Props suffix from DirectivePropertyResolver names (#60475)
This suffix will be confusing as we introduce new variants for Wiz in particular.

PR Close #60475
2025-03-27 20:26:12 +00:00
Doug Parker
d47cf58f10 refactor(core): update ng.getDirectiveMetadata to support Wiz and ACX (#60475)
This allows `ng.getDirectiveMetadata` to be implemented by Wiz and ACX with subtly different shapes to match the nuances of those frameworks.

Existing usage of `{Component,Directive}DebugMetadata` was moved over to `Angular{Component,Directive}DebugMetadata` as appropriate, since the implementation of `ng` in `@angular/core` is specific to Angular. Only the types support Wiz and ACX.

I opted to merge `ComponentDebugMetadata` and `DirectiveDebugMetadata` into a single type of all the frameworks including both components and directives (recall that components extend directives). The reasoning for this is because Wiz does not support directives (you can kind of think of "Wiz Directive" as an abstract class extended by "Wiz Components"). I felt that a `DirectiveDebugMetadata` containing only Angular and ACX types would be a bit of a trap and lead to bugs when used. It's safer to just have the single type containing all the possible results from `ng.getDirectiveMetadata`.

I also chose to leave the `ng` type as is internally, since `@angular/core` implements a specific concrete version of it narrowed to Angular types. Separately I defined an expanded `FrameworkAgnosticGlobalUtils` which redefines `ng.getDirectiveMetadata` to include Wiz and ACX. We want this type to exist in the Angular GitHub repo so it can be referenced as a common primitive across all three frameworks. This is sufficient for now, however longer term we will likely want to actually manually define the function types in this framework-agnostic interface and make Angular's version properly implement it rather than extend and overwrite Angular's type.

PR Close #60475
2025-03-27 20:26:12 +00:00
hawkgs
77b5eed024 refactor(devtools): extract and organize colors into themes (#60374)
Extract all colors from the stylesheets, reduce their number by merging the similar ones and organize them into themes represented by CSS variables.

PR Close #60374
2025-03-27 18:10:28 +00:00
Milo
d95d352a8e fix(devtools): show preview content even after expanding node (#60360)
this aligns with Chrome devtools behavior

PR Close #60360
2025-03-24 09:03:21 -07:00
Paul Gschwendtner
115c2f8d38 build: fix linking of cdk/material in devtools and simplify code (#60516)
This commit fixes the linking of CDK/Material which recently broke
because the CDK/Material package now comes with potential shared FESM
chunks; that our current hard-coded, manual linking process doesn't know
about. This ultimately resulted in duplicate code, breaking
Material/CDK.

This commit fixes that.

In addition to the fix, we simplify our linking significantly and reduce
the rather large complexity around linking, or having to specify every
entry-point manually, by linking the full package and putting it into
a different location. This is also what we conceptually are doing in
Angular Material as part of the `rules_js` migration.

PR Close #60516
2025-03-21 14:37:56 -07:00
Kristiyan Kostadinov
e301471342 fix(devtools): fix type checking issues (#60481)
Fixes type checking issues in the dev tools that weren't showing up, because we had `strictTemplates` turned off.

PR Close #60481
2025-03-20 11:55:52 -07:00
Doug Parker
4930ed3fed refactor(devtools): add support for mutating objects inside signals (#60381)
Angular DevTools now supports mutating objects underneath signals in the property explorer view.

This is done by performing an "immutable update" by recursively copying objects underneath a signal and overwriting the one property specified. For example, if the user attempted to set `foo.bar.baz[2].hello = 'world'` and `bar` was a signal, this would effectively become:

```typescript
foo.bar.set({
  ...foo.bar(),
  baz: [
    ...foo.bar().baz.slice(0, 2),
    {
      ...foo.bar().baz[2],
      hello: 'world',
    },
    ...foo.bar().baz.slice(3),
  ],
})
```

The motivation for immutable updates is because signals and Angular change detection don't really like interior mutability of signal values. If we didn't do this, any kind of comparison or dirty check would prevent the UI from updating. If an application attempts to change a deeply nested property inside a signal, it doesn't work today. DevTools should generally be limited to operations an application could do itself, and the recommended approach to make such a change like this is an immutable update. Creating entirely new objects intentionally breaks referential equality such that the application can properly react to the change.

Unfortunately, it is not possible to make immutable updates in a truly generic sense. You can't just copy a class for instance `({...new MyFoo()}).doSomething()`. We could do something fancier like manually copying over the prototype or something like that, but there is no way to do this without breaking class semantics (ex. the class might reasonably rely on the constructor being called). Therefore we instead reject any mutations to non-primitive objects. In the future, we might expand the set of "primitives" to include other built-ins and well-known objects like `URL` or `Element`, but those are out of scope for now.

I opted to ban mutating the result of a readonly/computed signal. While the mutation is likely to succeed, a subsequent rerun of the `computed` will immediately drop the change. However, I opted to allow mutating the result of a getter property. This has a similar problem because it might be returning a synthetic object which will be invalidated on the next execution, but it is possible and reasonable for a getter to return the same object multiple times such that a mutation may reasonably survive other updates. DevTools can't easily know whether a getter actually will return the same object on each execution or not, so we optimistically assume the reference is stable. If it isn't, the mutation will be lost whenever the getter is re-executed.

PR Close #60381
2025-03-18 10:22:46 +01:00
Doug Parker
3104e43b74 refactor(devtools): fix reading resolutionPath (#60403)
Sometimes `forest` can be empty if the provided roots are empty, and was leading to a "Cannot read `resolutionPath` of `undefined`" error. Now we check the forest has a tree in it before looking up `resolutionPath`.

There might be a separate issue with the fact that the backend script likely shouldn't be emitting an empty forest in the first place. However we already check that a resolution path exists at all, so I think it's fair to also check that a tree was provided. We can separately look into making sure the backend is emitting valid data.

PR Close #60403
2025-03-18 10:19:51 +01:00
Alan Agius
ea6cc64639 build: update cross-repo angular dependencies (#60387)
See associated pull request for more information.

Closes #59956 as a pr takeover, `@angular/build-tooling` has been rolled back as due to missing `@aspect_rules_js`.

PR Close #60387
2025-03-14 14:43:24 +01:00
Denis Bendrikov
d79c57d9d7 fix(devtools): eliminate unnecessary scrollbars on injector tree (#59966)
Modify CSS to eliminate unnecessary scrollbars on injector tree

PR Close #59966
2025-03-14 08:38:02 +01:00
Doug Parker
90165b17bc refactor(devtools): refactors property view drag-and-drop behavior (#60286)
The main goal of this change is to remove `categoryOrder` which effectively hard-codes the supported length of `panels`. Adding another item to `panels` is not rendered unless that is added to `categoryOrder`.

My solution to this is to make the set of categories a signal, with each category able to produce the data inside it. This allow `CdkDragDrop` to rearrange categories but then still produce the correct data in the template without needing a separate array to track order.

Also removed `hidden` and inlined it in the template, since the logic was the same for every panel.

`moveItemInArray` is unfortunately an in-place move, so I needed to manually clone the array to ensure `panels` observes an immutable update which works better with signals and change detection.

PR Close #60286
2025-03-11 09:27:03 -07:00
Doug Parker
6521be22b9 release: bump Angular DevTools version to 1.0.26 (#60309)
PR Close #60309
2025-03-10 11:40:26 -07:00
Doug Parker
7f85d184b0 fix(devtools): handle case where directive metadata has undefined dependencies (#60256)
This fixes a bug introduced by [#60206](https://github.com/angular/angular/pull/60206/files#diff-c07b9ecd59f6e0ed636ac9672b9644178d9a999f04bc8b8198b13e86589dfa5b). Previously `DirectiveMetadata.prototype.dependencies` was always set, but in that PR `dependencies` is only set if an `Injector` is found (which only happens when `ng.getInjector` is *not* defined). This causes an error when evaluating `dependencies.length` in the template.

Fix is just to check for existance before calling `length`.

PR Close #60256
2025-03-10 09:57:25 -07:00
Doug Parker
1eedfcee90 refactor(devtools): remove input/output/property links (#60284)
These links aren't that helpful in the context of Angular DevTools for a few reasons:
1. Users of the extension should already have a general understanding of core Angular concepts, inputs and outputs included.
2. The input and output links go to API documentation which isn't useful for someone who doesn't actually understand the core concepts anyways.
3. These links point to signals documentation even though DevTools shows non-signal inputs and outputs.
4. Properties linked to template binding docs, which doesn't *really* have anything to do with the plain JS properties being shown in DevTools anyways.

PR Close #60284
2025-03-10 09:56:19 -07:00
Matthieu Riegler
a94c912a3a refactor(devtools): Make every ng function optional in the typings (#60208)
This will help in the future guarding against old apps what don't have the new APIs implemented

PR Close #60208
2025-03-10 09:24:12 -07:00
Doug Parker
f8bf888d5d release: bump Angular DevTools version to 1.0.25 (#60235)
PR Close #60235
2025-03-06 10:32:02 -08:00
Doug Parker
6ea0318df6 refactor(devtools): ignore getDirectives when it is not supported (#60209)
Previously, if `ng.getDirectives` was not implemented, Angular DevTools won't throw when attempting to load the component tree. Now it safely ignores the function and assumes no directives exist on the page.

PR Close #60209
2025-03-05 13:42:40 -08:00
Doug Parker
2866355872 refactor(devtools): make ngDebugClient return a Partial (#60209)
In general, we can't assume all applications implement the full `ng` contract as many are older Angular application which pre-date the current interface. As a result, it is safer to type this as a `Partial`.

For now, I just added non-null assertions at all current usage locations, as we do generally feature detect before using these fields. However, hopefully this `Partial` type will make it harder to accidentally call a function which might not be supported.

PR Close #60209
2025-03-05 13:42:40 -08:00
Doug Parker
391f833cc0 refactor(devtools): ignore getInjector when it is not supported (#60206)
Previously Angular DevTools would throw when run on an application which does not support `getInjector`, now it safely ignores it and assumes dependency injection is not supported.

PR Close #60206
2025-03-05 12:05:45 -08:00
AleksanderBodurri
22d88b06fb fix(devtools): handle case where router tree does not exist (#60221)
Previously this was throwing errors in applications with no Router token.

Now it skips emitting events for the router tree when it is unable to find the Router token.

Note: If these events don't emit, DevTools treats the RouterTree feature as disabled.

PR Close #60221
2025-03-05 12:05:01 -08:00
Doug Parker
e51a885d27 refactor(devtools): ignore ng.applyChanges if not supported (#60207)
Previously Angular DevTools would throw if `ng.applyChanges` was not defined. Now DevTools silently ignores the issue, assuming `mutateComponentOrDirective` was sufficient to update the application.

PR Close #60207
2025-03-05 16:53:56 +00:00
AleksanderBodurri
d260ca3091 feat(core): emit template function for template related profiler hooks (#60174)
Previously, the profiler would only emit the specific template event and context when a template is created/updated, but not the template function related to the event.

This commit emits this function by using the third argument of the profiler function, which previously was only used for lifecycle hooks and output listeners. This commit also renames this arg to eventFn to express that it varies depending on the event type emitting from the profiler.

Note: this change is fully backwards compatible, since previously these template events did not use the third arg of the profiler function.

PR Close #60174
2025-03-03 22:03:44 +00:00
Doug Parker
d9af1bbf52 release: bump Angular DevTools version to 1.0.24 (#60148)
PR Close #60148
2025-03-03 17:12:23 +00:00
hawkgs
c2a46d2217 refactor(devtools): use more appropriate cursor types while panning in the tree vis (#60141)
Use `grab` and `grabbing` cursors while panning. They are the de facto standard.

PR Close #60141
2025-02-27 18:31:02 +00:00
hawkgs
b07010087a fix(devtools): minor UI/UX improvements of the Injector Providers panel (#59531)
- The token rendered in the first col of the table is now being truncated in favor of the horizontal scroll of the panel which should make the log button accessible/visible all the time
- Introduced a "No such providers" label when a filter is applied
- The icon of the logProvider button has been substituted with `code` (as per the doc)
- The font size and width of the provider type filter have been slightly improved

PR Close #59531
2025-02-26 12:34:40 -05:00
hawkgs
911a210ff0 refactor(devtools): introduce tree-visualizer-host (#59916)
The purpose of this component is purely to encapsulate and offload the styles from `devtools.component.scss` since it wasn't very clear what their scope is.

PR Close #59916
2025-02-26 12:18:06 -05:00
lilbeqiri
9ed4b54166 feat(devtools): add the onpush label for marked onpush components in the components tree view (#60059)
For components that are marked as onpush, a label will be displayed in the components tree view.

PR Close #60059
2025-02-26 11:20:22 -05:00
hawkgs
a0f37224c3 refactor(devtools): use new theme mixins in the stylesheets (#59978)
Use the newly introduced theme mixins in the stylesheets.

PR Close #59978
2025-02-25 14:15:16 -05:00
hawkgs
e970ad0cdb refactor(devtools): redesign dependency resolution path visualization (#60011)
Use the new UI and drop the `InjectorTreeVisualizer` dependency. Additionally, use concrete values for `SerializedInjector.type` type instead of `string`.

PR Close #60011
2025-02-25 14:07:06 -05:00
hawkgs
1618595473 refactor(devtools): drop @ from inputs and outputs label (#60053)
Drop '@' from inputs and outputs label to fit in with the new signal-based API.

PR Close #60053
2025-02-24 10:49:12 -05:00
hawkgs
c513e5dc2b refactor(devtools): fix component inspector highlighting (#59995)
Use `position: absolute` instead of `position: fixed`. This fixes the odd behavior that can be reproduced when scrolling.

PR Close #59995
2025-02-20 11:56:08 -05:00
Doug Parker
be32d63652 docs: update zip command and link to recent DevTools commits (#59792)
`-x dist/` never worked for reasons I don't really understand. Historically I've just deleted `dist/` before zipping. I tried a few different approaches, but all of them lead to some form of "Name not matched" error in `zip` of the `dist/` directory. Instead I just opted to delete `dist/` as part of the zipping command.

The link to recent DevTools commits seems good enough to manually write a changelog. All relevant commits should be using `refactor(devtools)`, so the string "devtools" should definitely be in there.

PR Close #59792
2025-02-14 19:31:59 +00:00
Doug Parker
dcb23ef706 release: bump Angular DevTools version to 1.0.23 (#59931)
PR Close #59931
2025-02-14 16:31:37 +00:00
Doug Parker
adf2a0a2d6 release: bump Angular DevTools version to 1.0.22 (#59791)
PR Close #59791
2025-02-13 14:50:39 +00:00
hawkgs
4f3ad98466 refactor(devtools): styles management (#59589)
- Move all styles to ng-devtools/src/styles.
- Create a BrowserService that detects the browsers and adds it as a class to the body. Move global browser styles.
- Create theme mixins that incorporate the browser type into them.
- Refactor some of the affected code along with the introduced changes.

PR Close #59589
2025-02-12 10:47:02 -08:00
AleksanderBodurri
28dd04a866 fix(devtools): regressions in component tree (#59873)
This commit solves two cases

Bug: When a directive of the same name is selected, the property view tab would not update properly. This was caused by a signals refactor that changed the behaviour of a string input property to not re-render because the underlying signal did not change (string equality). This is fixed by converting this input into an object.

Bug: When a selected element is removed from the component tree, DevTools would not rerender the component tree properly and deselect that component. Now if DevTools detects that a component is removed, it re-renders the tree and deselects the component.

PR Close #59873
2025-02-12 09:22:28 -08:00
Sam Knutson
042ee75d1b docs: fix spelling of "set up" (#58362)
Fix spelling of the word "set up" in docs. "Setup" (one word) is a noun
whereas "set up" (two words) is a verb.

Fixes #58361

PR Close #58362
2025-02-03 13:50:49 -08:00
hawkgs
6ce8ed7404 refactor(devtools): select the root element by default (#59626)
Select the application root element when you start Angular DevTools.

PR Close #59626
2025-01-22 13:34:40 -08:00
Pawel Kozlowski
db745cd75f test(devtools): disable flaky highlighter test (#59561)
The test in question was very flaky on CI, example run:
https://github.com/angular/angular/actions/runs/12805645683/job/35702462974?pr=59557

Disabling as it is causing productivity loose for the team.

PR Close #59561
2025-01-16 12:19:39 +01:00
Doug Parker
c9eaf53b4f release: bump Angular DevTools version to 1.0.21 (#59548)
PR Close #59548
2025-01-15 16:48:00 -08:00
Pawel Kozlowski
9c835e89fe refactor(core): profiler takes null as a default instance (#59233)
Several profiler calls don't have any meaningful instance when
producing a profiling event. This commit changes the default
instance value to null to sreamline profiler invocations.

PR Close #59233
2025-01-14 12:35:21 -05:00
Andrew Kushnir
412ac303bc Revert "refactor(core): profiler takes null as a default instance (#59233)" (#59506)
This reverts commit c4ad8fb2e7.

PR Close #59506
2025-01-13 17:03:36 -05:00
hawkgs
0bb81c5ab4 feat(devtools): tone down obtrusive elements in the Injector Tree tab (#59499)
Some of the elements are a bit too large so they have been shrunken to fit in with the rest of the UI.

PR Close #59499
2025-01-13 15:06:24 -05:00
AleksanderBodurri
065e1187fc fix(devtools): remove property tab css that is hiding directive metadata (#59493)
It looks like this height property was redundant prior to upgrading to angular/material 19.1.0-rc.0. An interaction between this property and that update caused elements inside of material expansion panels to be hidden.

This PR removes this unnecessary height assignment entirely.

PR Close #59493
2025-01-13 14:48:01 -05:00
Pawel Kozlowski
c4ad8fb2e7 refactor(core): profiler takes null as a default instance (#59233)
Several profiler calls don't have any meaningful instance when
producing a profiling event. This commit changes the default
instance value to null to sreamline profiler invocations.

PR Close #59233
2025-01-13 10:52:19 -05:00
Doug Parker
c1bc06c337 release: bump Angular DevTools version to 1.0.20 (#59454)
PR Close #59454
2025-01-09 15:41:54 -05:00
Sumit Arora
a55575d4d6 fix(devtools): fixing dark mode colors for devtools and router tree (#59329)
added dark mode colors for devtools and router tree  and fixed the router tree legend rerendering issue

PR Close #59329
2025-01-09 10:32:41 -05:00
RafaelJCamara
5c9e84acd6 docs: update license URL from angular.io to angular.dev and year of license to 2025 (#59407)
PR Close #59407
2025-01-09 10:27:54 -05:00
Johnson Chu
9b8f699032 refactor: remove unnecessary // tslint:disable rule flags in devtools (#59365)
Files in the vendor directory have been excluded in tslint.json.

PR Close #59365
2025-01-07 16:06:21 +00:00
Johnson Chu
a6cdbec09f refactor: remove unnecessary TSLint rule flags (#59365)
There are many TSLint rule flags in the source code that have no effect, and they can be safely removed to keep the code clean.

PR Close #59365
2025-01-07 16:06:21 +00:00
Sheik Althaf
0bf6f7602e refactor(devtools): add split to the demo devtools app (#58818)
added split area component to demo component so that we can resize the devtools and demo app.

PR Close #58818
2025-01-06 16:22:01 +00:00
Sheik Althaf
d0cd74ace7 refactor(devtools): use signals for template properties in frame manager (#58818)
convert the frames and selectedFrame properties to signal so that it can react to changes on OnPush

PR Close #58818
2025-01-06 16:22:01 +00:00
Pawel Kozlowski
22f191f763 feat(core): extend the set of profiler events (#59183)
This commit extends the set of events understood by the
profiler integrated with the Angular time. The set got
extended to account for the recently added functionality
and mark entry point to the code execution points.

The new set of events can be visualised by the Angular
DevTools or other profiler integrations.

PR Close #59183
2024-12-18 09:34:06 -08:00
Doug Parker
9b0aab9b8c release: bump Angular DevTools version to 1.0.19 (#59225)
PR Close #59225
2024-12-17 12:46:39 -08:00
Sumit Arora
42b1662ae8 refactor(devtools): removing unused styles and addressing PR comments (#58213)
- removed unused styles
- refactored tests and adding types

PR Close #58213
2024-12-03 09:16:25 +01:00
Sumit Arora
ef10d528ed refactor(devtools): adds router graph implementation and demo (#58213)
Follow-up PR for https://github.com/angular/angular/pull/58086 & https://github.com/angular/angular/pull/58199.

Adds below features to Angular DevTools to display router graph:
- Add a new router example in the Angular DevTools demo application.
- Implement the router graph in the Angular DevTools to view the routes that are loaded in the application.

PR Close #58213
2024-12-03 09:16:25 +01:00
Sheik Althaf
96c90a5012 refactor(devtools): removed standalone: true (#58922)
Removed the default standalone true flag from all the component, directive and pipes

PR Close #58922
2024-11-27 18:09:00 +01:00
Sheik Althaf
f8e5119435 refactor(devtools): migrate devtools to prettier formatting (#58624)
Added html and scss to ng-dev formatter. This is reduce the formatting changes coming in PRs.

PR Close #58624
2024-11-19 16:31:24 -08:00
Sheik Althaf
ff734fd3ef refactor(devtools): use reactive APIs for queries and linkedSignal (#58464)
migrated the viewChild to signal api and used linkedSignal in place of effect and little code refactoring

PR Close #58464
2024-11-11 19:01:18 +00:00
Sheik Althaf
ca9998c6cf refactor(devtools): convert to bootstrap application for shell and demo apps (#58319)
Migrated the demo apps and shell-browser apps to use bootstrap application, simplifed routing and standalone components.

PR Close #58319
2024-11-05 07:35:43 +01:00
Sheik Althaf
d98d7dc1ec refactor(devtools): use signal apis in profiler and frame-selector (#57558)
Refactor the profiler and frame-selector components to use signal apis, in future we can make the components onPush and zoneless

PR Close #57558
2024-10-28 12:28:25 -07:00
Alan Agius
7de7c52769 build: remove usages of useDefineForClassFields: false (#58297)
When setting `"useDefineForClassFields": false`, static fields are compiled within a block that relies on the `this` context. This output makes it more difficult for bundlers to treeshake and eliminate unused code.

PR Close #58297
2024-10-28 12:26:05 -07:00
Matthieu Riegler
30766d6b77 refactor(devtools): Migrate with the schematic. (#58160)
All components, directives and pipes will now use standalone as default. Non-standalone decorators have now .

PR Close #58160
2024-10-14 14:58:57 +00:00
Sheik Althaf
1e50374d75 fix(devtools): avoid duplicate dependencies in injected services (#57564)
with latest signal apis there are duplicates dependencies are shown in injected services, this PR filters the depdencies by token and value

PR Close #57564
2024-10-08 09:29:18 -07:00
Matthieu Riegler
74a2a449bd refactor(devtools): remove unused imports. (#58057)
Thanks to the new extended diagnostic.

PR Close #58057
2024-10-04 13:27:34 +00:00
Andres Olivares
bb46b6b051 refactor(devtools): Use chrome.devtools.performance types (#58015)
The chrome.devtools.performance types were added to the DefinitelyTyped
module and as such we don't need to make use of any to circumvent
the missing types.

See: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/70231

PR Close #58015
2024-10-01 07:04:54 +00:00
Joey Perrott
9dbe6fc18b refactor: update license text to point to angular.dev (#57901)
Update license text to point to angular.dev instead of angular.io

PR Close #57901
2024-09-24 15:33:00 +02:00
AleksanderBodurri
9f4063b143 refactor(devtools): provide user with suggestions on why their angular application is not being detected in dev mode (#57861)
We've been seeing some reports about Angular DevTools being unable to detect applications running in dev mode.

This commit adds more context to the error message displayed when development mode is not detected and offers some possible resolutions.

Displays 3 common reasons why DevTools fails to detect an application running in dev mode. Links directly to angular.dev for relevant configurations.

Links to the Angular DevTools issue template if none of the suggestions work.

PR Close #57861
2024-09-23 16:08:16 +02:00
Sheik Althaf
8602729801 fix(devtools): remove existing highlight before highlighting another element (#57746)
In this PR we will remove the exiting highlight before highlighting the another element so that the highlight always be one

PR Close #57746
2024-09-23 16:00:23 +02:00
Sheik Althaf
4fa25cf328 refactor(devtools): use signal apis in visualizer and devtools-tabs (#57192)
Refactor the visualizer and devtools-tabs components to use signal apis, in future we can make the components onPush and zoneless

PR Close #57192
2024-09-05 17:23:34 +00:00
Sheik Althaf
7a4199a29a refactor(devtools): use signal apis for directive forest (#56998)
Refactor the directive-forest components to use signal apis, in future we can make the components onPush and zoneless

PR Close #56998
2024-09-04 21:00:12 +00:00
Doug Parker
1f87cba204 release: bump Angular DevTools version to 1.0.18 (#57585)
PR Close #57585
2024-09-03 10:43:21 -07:00
AleksanderBodurri
774d9832ab fix(devtools): correctly set environment injector path in the case where there are no element injectors (#57442)
Previously, when "Hide injectors with no providers" was toggled, it is possible for the injector tree visualizer to have no Element injectors to visualize. This caused a bug in the slicing logic that splits apart the environment and element injectors from DI resolution paths within the injector tree component in Angular DevTools.

Now, this logic is correctly handled when there are no element injectors to visualize.

PR Close #57442
2024-08-28 08:49:34 -07:00
AleksanderBodurri
99e40574cb fix(devtools): ignore DOM Nodes from other frames when performing render tree detection (#57518)
Previously, if an application had DOM Nodes injected into it from other frames, DevTools would fail to parse component trees with the render tree strategy properly because of an instanceof Node check that the framework performs.

Now we check for instanceof Node before even calling framework debug APIs on DOM nodes so that we can skip nodes that come from other frames entirely.

PR Close #57518
2024-08-27 13:19:35 -07:00
AleksanderBodurri
bfda774995 fix(devtools): catch invalidated extension error to prevent devtools from spamming console (#55697)
When a browser extension is updated it becomes invalidated on currently open pages. If that extension then tries to send a message to those pages through `chrome.runtime.sendMessage(..)` then an error is thrown in the console

For Angular DevTools, this results in spamming the console with "Uncaught Error: Extension context invalidated." errors.

This commit catches that error and removes the event listener that triggers the `chrome.runtime.sendMessage(...)` call.

PR Close #55697
2024-08-27 12:54:44 -07:00
Doug Parker
9aa94eb0e3 release: bump Angular DevTools to 1.0.17 (#57221)
PR Close #57221
2024-08-02 16:53:13 +00:00
Doug Parker
bd953c7847 docs(devtools): remove duplicate text at end of release.md doc (#57222)
Somehow the last few lines got duplicated at the end of this doc. Definitely not needed.

PR Close #57222
2024-08-02 16:52:41 +00:00
Andres Olivares
d26a91fddc refactor(devtools): Use Chrome DevTools Performance extension API (#55805)
This change is a proof of concept of how the new Chrome DevTools
Performance extension API (https://bit.ly/rpp-e11y) can be used to
surface Angular runtime data directly in the Chrome DevTools Performance
panel.

Specifically, it implements the following changes:

1. Use the profiling status notification API to toggle the Timing API:
The notification API is implemented under the
chrome.devtools.performance extension namespace and consits of two
events: ProfilingStarted and ProfilingStopped, dispatched when the
Performance panel has started and stopped recording, respectively. This
API is used to enable the Timings API when the recording has started in
the Performance panel and disable it when recording has stopped.

2. Use the User Timings `detail` field format specification of the
Performance extension API
(https://developer.mozilla.org/en-US/docs/Web/API/Performance_API/User_timing)
to inject data collected by the Angular Profiler into the
Performance panel timeline. Angular Profiler uses several hooks to
measure framework tasks like change detection. With this change, this
measurements are visible in the same context as the runtime data
collected by the browser in the Performance Panel timeline.

Note: to enable the user timings to be collected in the first place, one
needs to open the Angular DevTools panel so that the related artifacts
are loaded in the page. This shortcoming can be fixed in a follow up so
that the extra step isn't necessary.

PR Close #55805
2024-07-31 16:04:52 +00:00
Sheik Althaf
49884518a0 refactor(devtools): use signal apis in injection and router tree (#57047)
Refactor the injection and router tree components to use signal apis, in future we can make the components onPush and zoneless

PR Close #57047
2024-07-30 16:42:14 +00:00
Sheik Althaf
e0f606e4f1 refactor(devtools): use signal api in property view (#56995)
Refactor the property view components to use signal apis, in future we
can make the components onPush and zoneless

PR Close #56995
2024-07-18 15:23:32 -07:00
Denis Bendrikov
080e971db3 refactor(devtools): use dark scrollbars in dark mode (#56225)
Opt the devtools into the user's color scheme preferences

PR Close #56225
2024-06-10 13:55:43 -07:00
Tomasz Ducin
8a993de4cb refactor(devtools): update links to the new docs (angular.dev) (#56138)
This PR replaces all links available within the devtools to point
to the new docs.
The links to Input/Output (decorators) have been replaced with
their function (signal) counterparts: input, output.

PR Close #56138
2024-06-03 17:38:11 +00:00
Kristiyan Kostadinov
e5a6f91722 feat(core): support TypeScript 5.5 (#56096)
Updates the repo to add support for TypeScript 5.5. Includes resolving some compilation errors and broken tests.

PR Close #56096
2024-05-29 15:33:33 +02:00
Doug Parker
fb54863773 release: bump Angular DevTools to version 1.0.16 (#55715)
PR Close #55715
2024-05-08 11:11:28 -07:00
AleksanderBodurri
77ae5a391b refactor(devtools): remove git sha stamping from devtools build (#55694)
This stamping is interfering with publishing to the Firefox addons store by brining in the entirety of the `.git` directory as part of the source code necessary for a reproducible build, which Firefox requires as part of it's approval process.

In it's place, we are now using the extension version pulled from the manifest.

PR Close #55694
2024-05-06 16:02:36 -07:00
Alan Agius
72108bad4d build: update cross-repo angular dependencies (#55654)
See associated pull request for more information.

PR Close #55654
2024-05-03 08:04:40 -07:00
Doug Parker
58a8f124b0 refactor(devtools): set key in manifest.chrome.json (#55639)
This key comes from the release build of the Chrome extension. Setting it here configures the extension ID of a local build to match the extension ID of the public release. This makes Chrome recognize that local builds are the same extension leading to more intuitive behavior. It's also useful for allowlists of extension IDs to keep the local ID consistent.

PR Close #55639
2024-05-02 14:46:24 -07:00
Doug Parker
b44e35f472 release: bump Angular DevTools to 1.0.15 (#55643)
PR Close #55643
2024-05-02 13:37:34 -07:00
Doug Parker
7cea897132 release: bump DevTools to 1.0.14 (#55545)
PR Close #55545
2024-04-30 17:01:54 -07:00
Joey Perrott
fd544159e3 ci: complete migration to prettier formatting (#55580)
Format the remaining unformatted files in the repository

PR Close #55580
2024-04-29 14:00:16 -07:00
Matthieu Riegler
96972b45ec refactor(devtools): hide hydration error when the component tree is collapsed (#54912)
This commit improves the devtools UX.

PR Close #54912
2024-04-25 14:57:19 -07:00
Matthieu Riegler
e0096ef945 refactor(devtools): prevent dblclick on the expand arrow to show the element panel (#54912)
This will improve the UX

PR Close #54912
2024-04-25 14:57:18 -07:00
Matthieu Riegler
54de0f3f0b refactor(devtools): improve signal support. (#54912)
In some cases signals weren't unwraped thus not reading the value correctly. This commit fixes this issue.

PR Close #54912
2024-04-25 14:57:18 -07:00
Matthieu Riegler
8a6027de86 refactor(devtools): fix issue with virtual scroll viewport in the directive forest (#54912)
In some cases the height of the viewport wasn't calculated correctly because of extension tabs quirks. This commit fixes this issue.

Fixes #53704

PR Close #54912
2024-04-25 14:57:18 -07:00
Doug Parker
d2d275a275 docs(devtools): update README to be more clear for extension reviewers (#55406)
Mozilla requires add-ons to have reproducible builds and this is managed directly by human reviewers and need to understand how to build Angular DevTools correctly. This commit defines a reproducible way of building Angular DevTools which is useful for reviewers and contributers.

The actual changes I made include:
1. Moving local development content into `devtools/README` (deleting `devtools/DEVELOPING.md`) and explicitly stating the Node version as well as global Yarn install to be clear about the correct way to build the extension. This should make it easier for reviewers to understand and reproduce builds.
2. Moving release instructions to a separate doc to reduce noise as well as making some minor clean ups there.

I briefly considered pointing reviewers at a new `devtools/docs/reviewers.md` doc, but decided against it because I want these instructions to be maintained in a single location where contributors and reviewers use the same content. This way any changes don't miss one of these sets of users. If reviewers have trouble with this format (dev builds isn't useful to reviewers and some content is repeated from other docs for contributors) then we can consider splitting out to a separate `reviewers.md` file. But until then, I'd like to try sharing this content and see how it works out in practice.

PR Close #55406
2024-04-23 13:02:49 -07:00
AleksanderBodurri
efe78d5565 fix(devtools): allow DevTools to fail gracefully for unsupported versions of Angular. (#55233)
Angular DevTools depends on many modern Angular features in order to function. As a result, at present the last officially supported version is v12. Angular DevTools may function for some Angular 9, 10 and 11 applications, but they are not officially supported.

This commit fixes an issue where DevTools would not inject a backend script into an Angular application if it detected it was below version 12. This backend script is important because it's used to inform the DevTools panel that the inspected application is in fact Angular, but that it is not on a supported version.

Angular 9, 10 and 11 applications that successfully have Angular DevTools initialize will now have a red highlight and tooltip on their version number, informing the user that they are using Angular DevTools on a version of Angular that is no longer supported.

Angular DevTools for applications that are below version 9 will continue to display the "Angular Devtools supports Angular versions 12 and above" message.

PR Close #55233
2024-04-22 11:25:20 -07:00
Doug Parker
5f859727e2 release: bump Angular DevTools version to 1.0.13 (#55371)
PR Close #55371
2024-04-17 07:53:11 +02:00
garrettld
e18a0ed1a3 fix(devtools): fix padding in property tree view (#54648)
This import was missed when switching devtools to standalone.

fixes #54622

PR Close #54648
2024-04-01 10:52:37 -07:00
Matthieu Riegler
9a9ce0d419 refactor(devtools): prevent exeception on state serializer (#55061)
`Object.getPrototypeOf(obj)` returns `null` if `obj` is an empty object. `Object.getOwnPropertyDescriptors` throws on `null`/`undefined`

PR Close #55061
2024-03-28 09:14:23 -07:00
Doug Parker
abd973d0bb release: bump Angular DevTools version to 1.0.12 (#55056)
Also fixes a typo in release docs for the Firefox `zip` command.

PR Close #55056
2024-03-27 09:55:36 -07:00
AleksanderBodurri
d15dca054c fix(devtools): issue where backendReady race condition causes Angular not detected error (#54805)
Previously, a race condition could cause DevTools to enter a state where it can't detect an application on reload. This was caused by a sequencing issue between the content script connection, the devtools panel connection and an event "backendReady" that lets DevTools know when a particular frame is ready to be inspected.

This commit replaces the previously stored backendReady boolean with a promise, so that the devtools panel can eventually run a callback to connect to a content script when that content script emits it's backendReady message.

PR Close #54805
2024-03-26 09:19:06 -07:00
AleksanderBodurri
a3e67036f6 Revert "Revert "refactor(devtools): implement multiframe support in devtools page (#53934)" (#54629)" (#54805)
This reverts commit 133319eba0.

PR Close #54805
2024-03-26 09:19:06 -07:00
AleksanderBodurri
15b54ce8dd Revert "Revert "refactor(devtools): implement iframe support for Angular DevTools' browser code (#53934)" (#54629)" (#54805)
This reverts commit dd9f9d7d44.

PR Close #54805
2024-03-26 09:19:05 -07:00
Doug Parker
83d8c68690 release: bump Angular DevTools version to 1.0.11 (#54631)
PR Close #54631
2024-02-27 14:02:15 -08:00
Doug Parker
dd9f9d7d44 Revert "refactor(devtools): implement iframe support for Angular DevTools' browser code (#53934)" (#54629)
This reverts commit dd3dac9cc9.

PR Close #54629
2024-02-27 14:00:13 -08:00
Doug Parker
133319eba0 Revert "refactor(devtools): implement multiframe support in devtools page (#53934)" (#54629)
This reverts commit ebcdc8dc96.

PR Close #54629
2024-02-27 14:00:12 -08:00
Doug Parker
9ec22244ee docs(devtools): expand release docs (#54525)
This provides some more information on how to release and notably includes commands for zipping extension code and source code, which can otherwise be tricky to get exactly right.

PR Close #54525
2024-02-21 15:24:26 -08:00
Doug Parker
e9e5e255e9 release: bump Angular DevTools version to 1.0.10 (#54523)
PR Close #54523
2024-02-21 15:23:36 -08:00
AleksanderBodurri
ebcdc8dc96 refactor(devtools): implement multiframe support in devtools page (#53934)
In the Angular DevTools Chrome DevTools page:

- Angular DevTools is able to ask the background script to list each frame that has been registered on a page.
- Angular Devtools is able to ask the background script to "enable" the connection on a particular frame. This enables the messaging between the content script <-> background script <-> devtools page
- Implements detection of non unique urls on the inspected page

Limitations:
- The `inspectedWindow.eval` API is only able to target frames by frameURL. This means some features that integrate with Chrome DevTools like inspect element and open source will not be available when inspecting frames that do not have a unique url on the page.

PR Close #53934
2024-02-14 17:15:25 -08:00
AleksanderBodurri
dd3dac9cc9 refactor(devtools): implement iframe support for Angular DevTools' browser code (#53934)
Modifies the messaging layer of devtools to allow for switching communication between frames on a page. When served as a browser extension.

Design:
- When a page renders, DevTools installs a content script onto it through it's manifest file. The all_frames option is used here to install this script onto every frame in a page.
- When Angular is detected, the content script will install a backend script into it's frame.
- Each content script / backend script pairing is kept track of in the background script. This pairing represents an angular devtools context in a particular frame.
- Angular DevTools is able to ask the background script to list each frame that has been registered on a page.
- Angular Devtools is able to ask the background script to "enable" the connection on a particular frame. This enables the messaging between the content script <-> background script <-> devtools page

Limitations:
- The `inspectedWindow.eval` API is only able to target frames by frameURL. This means some features that integrate with Chrome DevTools like inspect element and open source will not be available when inspecting frames that do not have a unique url on the page.

PR Close #53934
2024-02-14 17:15:25 -08:00
Matthieu Riegler
35c617c2ac refactor(devtools): show tooltip for hydration icon on directive forest (#54326)
The MatTooltip was missing after migrating to standalone

PR Close #54326
2024-02-08 19:18:37 +00:00
Matthieu Riegler
b560e02cdf refactor(devtools): Add hydration informations (#53910)
This commit adds hydration informations to the devtools.
* List of hydrated/hydrated components
* Shows hydration overlays
* Shows hydration errors for NG0500, 501 & 502

PR Close #53910
2024-01-30 20:03:14 +00:00
Matthieu Riegler
93845373a3 refactor(devtools): migrate to standalone (#53998)
Migrated with the schematics and cleanup by hand.

PR Close #53998
2024-01-23 09:53:24 +01:00
Matthieu Riegler
ff5575ad0b refactor(devtools): remove date utility. (#53997)
We can use the `toIsoString()` function instead !

PR Close #53997
2024-01-23 09:52:14 +01:00
Joey Perrott
711cb41626 refactor(devtools): migrate devtools to prettier formatting (#53945)
Migrate formatting to prettier for devtools from clang-format

PR Close #53945
2024-01-19 19:09:54 +01:00
Tomasz Ducin
4be253483d refactor(devtools): improving type safety (#53436)
This PR reduces the number of unnecessary `any` occurrences in devtools packages.

PR Close #53436
2024-01-19 17:35:25 +01:00
lilbeqiri
8737544d69 build(devtools): prevent underscores from being added at build time (#53921)
Add the keepNames config property to esbuild in order to prevent prepending of underscores to the class names.

PR Close #53921
2024-01-18 10:22:12 +01:00
Matthieu Riegler
e227275087 refactor(devtools): Add support for signals. (#53269)
The devtools now support signals.
Writable signals of primitives are editable.
Object Signal and other non-writable signals (like computed) are not editable.

Co-authored-by: Tomasz Ducin <tomasz.ducin@gmail.com>

PR Close #53269
2024-01-17 16:47:17 -08:00
AleksanderBodurri
4ca81b09e8 docs(devtools): update development docs (#53948)
These docs are out of date with how we currently build devtools in dev mode and as a browser extension. This commit brings these docs up to date.

PR Close #53948
2024-01-16 19:17:18 -08:00
AleksanderBodurri
426bcb999a docs(devtools): remove devtools/CONTRIBUTING.md (#53948)
This is an artifact left over form the repo merge. There is already an existing CONTRIBUTING.md for this repo

PR Close #53948
2024-01-16 19:17:17 -08:00
Tomasz Ducin
2d7d4e2cf0 refactor(core): type-safe global ng (#53439)
This PR provides strict type definition for the window.ng object used
for both console debugging and devtools. `GlobalDevModeUtils` now
gathers all type information about all methods exposed on window.ng.

PR Close #53439
2024-01-09 12:17:48 -08:00
Charles Lyding
e149ebf228 build: update rxjs build version to v7 (#53500)
The version of rxjs used to build the repository has been updated to v7.
This required only minimal changes to the code. Most of which were type
related only due to more strict types in v7. The behavior in those cases
was left intact. The most common type related change was to handle the
possibility of `undefined` with `toPromise` which was always possible with
v6 but the types did not reflect the runtime behavior. The one change that
was not type related was to provide a parameter value to the `defaultIfEmpty`
operator. It no longer defaults to a value of `null` if no default is provided.
To provide the same behavior the value of `null` is now passed to the operator.

PR Close #53500
2023-12-18 16:25:37 +00:00
Matthieu Riegler
8195be1e09 refactor(devtools): run control flow migration. (#53353)
Let's update the devtools with the latest improvements !

PR Close #53353
2023-12-05 17:20:09 -08:00
Matthieu Riegler
6cd91c675c refactor(devtools): enables typescript strict option (#53340)
Enabling `strict` is part of an effort to improve the quality of the devtools code base.
One of the direct side effect is to enable `noImplicitAny`, `strictPropertyInitialization` and `strictBindCallApply`.

This commit also replaces `fullTemplateTypeCheck` with `stringTemplates`.

PR Close #53340
2023-12-05 12:42:56 -08:00
Tomasz Ducin
ba8dc2843a refactor(devtools): filtering providers by token within "injector tree" tab (#53313)
In some injectors, there are LOTS of providers, making it slightly inconvenient to search for a certain one. This commit introduces a search-by-token for providers of a specific injector.

PR Close #53313
2023-12-04 21:43:34 -08:00
Tomasz Ducin
cb500c7ee5 refactor(devtools): devtools support for maps and symbol description (#53167)
Added 2 tiny improvements:
- instead of "Symbol()", "Symbol(DESCRIPTION)" is displayed
- ECMAScript Maps are distinguished
Additionally:
- PropTypes has been moved to a separate file
- Simple unit tests covering each PropType except for PropType.Unknown

PR Close #53167
2023-11-30 09:45:13 -08:00
Matthieu Riegler
a429167994 fix(devtools): use a shared angular detection code (#51569)
This fixes an issue where an angular app exposes a global `ng` object that is not our `ng`.

fixes #51565

PR Close #51569
2023-11-30 09:40:11 -08:00
Doug Parker
e639bf4965 release: bump DevTools version to 1.0.9 (#52938)
PR Close #52938
2023-11-15 20:18:32 +00:00
AleksanderBodurri
3cf18bb6f2 fix(devtools): check for all new DI debug APIs before trying to determine resolution path providers (#52791)
Previously, some versions of Angular 16.1.x that had 3/4 of the new DI debug APIs would enter a code path that required them to have access to the 4th.

Now DevTools checks for the existence of all 4 explicitly before going down this code path.

PR Close #52791
2023-11-10 18:37:05 +00:00
Doug Parker
5ee935e7fe release: bump DevTools version to 1.0.8 (#52759)
PR Close #52759
2023-11-10 17:00:20 +00:00
AleksanderBodurri
d01f371d9a refactor(devtools): update Angular logo for extension and loading animation (#52546)
Previously these were using the pre v17 Angular logo.

Now these have been updated to use the new Angular logo for V17+.

PR Close #52546
2023-11-06 12:34:20 -08:00
AleksanderBodurri
63777d20d9 test(devtools): fix transformInjectorResolutionPathsIntoTree tests (#52489)
Previously transformInjectorResolutionPathsIntoTree returned an array, now it returns a tree node so we update the test cases to reflect that.

PR Close #52489
2023-11-03 17:37:55 -07:00
AleksanderBodurri
f4b915b77b feat(devtools): implement zoom and pan in injector graph visualizer (#52489)
Previously only the trackpad could be used to navigate this view.

Now we can zoom and pan around using our mouse wheel and scroll.

Additionally, this commit fixes many issues related to the visualization of the injector graph visualization, allowing it to be more compact without impacting legibility and minimizing edge collisions in larger graphs.

PR Close #52489
2023-11-03 17:37:55 -07:00
AleksanderBodurri
1f18c7464f perf(devtools): optimize injector graph discovery (#52489)
Our algorithm for discovering the injector graph of an application involves calculating resolution paths for each angular node on a page, and then using those paths to construct the underlying tree.

Along the we way we perform many expensive computations that are candidates for optimization through caching. This commit implements this caching, resulting in a substantial increase in performance for large applications.

PR Close #52489
2023-11-03 17:37:55 -07:00
AleksanderBodurri
ef12570e29 feat(devtools): squash multi providers into 1 and allow them to be logged to the console (#52489)
Implements a feature allowing users to visualize multiproviders as one row in the providers table.

Also enables the user to log to console any provider in the table. This log includes information about the provider selected, the injector it was configured in, and also calls `Injector.get(Token)` to determine the value the provider evaluates to in it's injector.

PR Close #52489
2023-11-03 17:37:55 -07:00
AleksanderBodurri
0bd0309088 refactor(devtools): stop inspector from changing tab to components (#52489)
Previously this was the only page that used the inspector, so we automatically changed the tab out of convenience.

Now, the injector tree tab also does uses the inspector for some functionality, so we disable this behaviour.

PR Close #52489
2023-11-03 17:37:55 -07:00
Aanchal Agarwal
25600375a3 docs: omit repetitions (#52413)
PR Close #52413
2023-11-03 07:46:54 -07:00
Alan Agius
d4bd3f198b build: configure tslint to ban performance.mark usages (#52505)
While `performance.mark` is available on all supported browsers and node.js version this API is not available in JSDOM which is used by Jest and Cloudflare worker.

PR Close #52505
2023-11-03 07:43:36 -07:00
AleksanderBodurri
8b91864d02 test(devtools): create unit tests for injector tree transformation functions (#51719)
Creates set of unit tests for each function in the data transformation pipeline that enables injector metadata to be visualized as d3 graphs.

PR Close #51719
2023-10-10 13:10:50 -07:00
AleksanderBodurri
8bdbbf4510 feat(devtools): Implement initial DI debugging features in devtools (#51719)
This commit introduces 2 new features into DevTools.

Directive level dependency inspection: Users can now view which dependencies their directives have injected in the property viewer tab. This view displays not only the dependency but also the resolution path that was used to service the injection.

Injector graph inspection: Users can now view a visualization of the element and environment hierarchies in their application. These trees are displayed separately but on the same page in the Injector Tree tab. User can click on individual injectors to view a list of all the providers configured in that injector, as well as highlight the resolution path from that injector to the root (with the corresponding environment injector connection highlighted as well).

PR Close #51719
2023-10-10 13:10:50 -07:00
Enea Jahollari
ee6c915c82 feat(devtools): added instances count and total time in bar chart (#50866)
In Devtools bar chart we can see the total time for all the directive instances in one change detection run.

This PR changes the bar chart to display the total count and time for all directive instances instead of showing the time for each directive instance separately in one change detection run.

PR Close #50866
2023-09-22 09:50:52 -07:00
Kristiyan Kostadinov
52cc7f839b build: align with internal tsconfig options (#51728)
Currently internally Angular has some customized tsconfig files, because we don't align with the tsconfig of the rest of g3. These changes enable `noImplicitReturns` and `noPropertyAccessFromIndexSignature` to align better with the internal config.

PR Close #51728
2023-09-12 11:39:42 -07:00
AleksanderBodurri
4b54947c97 fix(devtools): use the __ignore_ng_zone__ flag in devtools message bus' to prevent CD loop (#51339)
Updates ChromeMessageBus, SamePageMessageBus and IframeMessageBus to use this new flag in their emit methods.

PR Close #51339
2023-09-05 18:16:32 +00:00
Keith Li
dc4b4aa57e feat(devtools): Display getters and setters in devtools property viewer (#49695)
Display the function representations of get/set properties in the property viewer just like the existing UI for function properties

PR Close #49695
2023-09-01 14:41:04 +00:00
AleksanderBodurri
78afe889fd refactor(devtools): migrate material legacy components to mdc (#51590)
Removes all legacy angular material imports and moves devtools over to mdc.

PR Close #51590
2023-08-31 17:31:42 +00:00
Joey Perrott
1baeca87e3 fix(devtools): remove unnecessary escaping in regex expressions (#51554)
Correct various Useless regular-expression character escape issues.

PR Close #51554
2023-08-29 21:52:33 +00:00
aanchal
388d1db89d docs: add the title tag (#51233)
PR Close #51233
2023-08-01 12:15:11 -07:00
aanchal
584a32d8e3 docs: add the title tag (#51199)
PR Close #51199
2023-08-01 11:54:36 -07:00
Kristiyan Kostadinov
3a59de681f fix(devtools): ensure that inspected component label is always in the viewport (#50656)
Currently the label showing the component name is always positioned from the bottom/right edge of the element which may be outside of the viewport. These changes add some logic to fall back to a different position so that the label is always visible.

I've also cleaned the `highlighter.ts` file up a bit.

Fixes #48479.

PR Close #50656
2023-07-26 10:04:26 -07:00
alkavats1
1391a7e7e0 docs: updating the contribution guidline docs with the secure tag (#50618)
PR Close #50618
2023-06-22 09:41:26 -07:00
AleksanderBodurri
dbadfea67f feat(devtools): create demo application that uses standalone APIs and standalone components/directives/pipes (#48533)
The existing DevTools demo app that is used for developing on DevTools is exclusively an NgModule application. This commit creates a copy of the old demo app but with no NgModules and only standalone APIs/Components/Directives/Pipes

PR Close #48533
2023-06-12 12:51:24 +02:00
alkavats1
258c773188 docs: remove unused imports and improved the code (#50424)
PR Close #50424
2023-05-25 14:37:54 +00:00
BrianDGLS
24f7c1dc61 refactor(devtools): run spellcheck on devtools dir (#50445)
Correct typos in devtools dir.

PR Close #50445
2023-05-24 13:56:56 +00:00
AleksanderBodurri
a1dc3bb503 build(devtools): target es2020 explicitly (#50086)
We do this because of a bug caused by https://github.com/evanw/esbuild/issues/2950 and a recent change to how angular static properties are attached to class constructors. Targeting esnext or es2022 will cause the static initializer blocks that attach these static properties on class constructors to reference a class constructor variable that they do not have access to.

Because of this we explicitly target es2020 in our Angular DevTools builds.

PR Close #50086
2023-05-09 14:41:48 -07:00
AleksanderBodurri
aee526a08b build(devtools): make sure linker runs on fesm2022 bundles (#50086)
Since DevTools' Angular framework dependencies are built from local files, they are always up to date. [Recently](https://github.com/angular/angular/pull/49332) these dependencies started being published as fesm2022 instead of fesm2020. We also have an Angular dependency `ngx-flamegraph` that was built and published as fesm2020.

The easiest fix to make sure all of our Angular based dependencies are processed by the linker would be to update the filterPaths field in that file from `/fesm2020/` to `/fesm2020|fesm2022/`. When v16 releases, we can update ngx-flamegraph and publish it with the new APF, letting us change filterPaths to just `/fesm2022/`.

PR Close #50086
2023-05-09 14:41:48 -07:00
Matthieu Riegler
e60b3d45b9 build: remove unused deps (#50116)
* All `@types` package removed have typings in their package.
* brotli is unused
* tmp is unused
* vlq is unused

PR Close #50116
2023-05-08 14:33:20 -07:00
Matthieu Riegler
49386de19f docs: Specify when an app is debuggable by the DevTools. (#48970)
DevMode is when the ng debug object is available. `Optimization:true` is responsible for treeshaking everything behind `ngDevMode`.

Fixes #48968

PR Close #48970
2023-04-17 17:32:41 +00:00
Matthieu Riegler
6daa454e40 fix(devtools): Specify when an app is considered in dev mode. (#48970)
DevMode is when the ng debug object is available. `Optimization:true` is responsible for treeshaking everything behind `ngDevMode`.

PR Close #48970
2023-04-17 17:32:41 +00:00
Angular Robot
f023020368 build: update cross-repo angular dependencies (#49887)
See associated pull request for more information.

PR Close #49887
2023-04-17 15:46:39 +00:00
Andrew Scott
34b2d34d5b refactor(router): Remove RouterTestingModule in favor of RouterModule.forRoot (#49427)
`RouterTestingModule` is not needed as of v16. Instead, TestBed
automatically provides `MockPlatformLocation` in order to help test
navigations in the application. The location mocks in the
RouterTestingModule aren't necessary anymore.

There doesn't appear to be any real documentation around
`RouterTestingModule` other than the API docs.

PR Close #49427
2023-04-04 15:12:33 -07:00
Matthieu Riegler
ba3e9eac92 feat(devtools): Improve Set support in component properties. (#49316)
With this commit, Sets are displayed with the label Set(#) where # is the size of the set. They are not expandable/editable though.

Partial fix for #49312

PR Close #49316
2023-04-03 19:15:34 -07:00
Kristiyan Kostadinov
585e34bf6c feat(core): remove entryComponents (#49484)
`entryComponents` have been deprecated since version 9, because with Ivy they weren't necessary. These changes remove any remaining references.

BREAKING CHANGE:
* `entryComponents` has been deleted from the `@NgModule` and `@Component` public APIs. Any usages can be removed since they weren't doing anyting.
* `ANALYZE_FOR_ENTRY_COMPONENTS` injection token has been deleted. Any references can be removed.

PR Close #49484
2023-03-23 10:38:03 -07:00
Angular Robot
51d7cfbac6 build: update all non-major dependencies (#49267)
See associated pull request for more information.

PR Close #49267
2023-03-02 14:09:14 -08:00
Kristiyan Kostadinov
99d874fe3b feat(core): add support for TypeScript 5.0 (#49126)
Updates the project to support TypeScript 5.0 and to resolve any errors that came up as a result of the update.

PR Close #49126
2023-02-28 08:24:47 -08:00
Doug Parker
3c079a74c9 release: bump DevTools version (#49121)
PR Close #49121
2023-02-27 10:07:53 -08:00
Andrew Kushnir
83a6e203e3 refactor(compiler): drop obsolete NgFactory and NgSummary config options (#48268)
The options to generate NgFactory and NgSummary files were added to Ivy for backwards compatibility with ViewEngine. Since ViewEngine was deprecated and removed, the NgFactory and NgSummary files are no longer used as well.

This commit drops obsolete options to generate NgFactory and NgSummary files. Also, the logic that generates those files is also removed.

PR Close #48268
2023-02-21 13:03:59 -08:00
AleksanderBodurri
2ca49726ca refactor(devtools): consolidate devtools global styles into 1 file (#49001)
Previously the DevTools demo app and browser app had duplicated styles in their respective styles.scss files.

This commit creates a global styles.scss that is imported with sass @use into the demo and browser app styles.scss files. This will prevent any issues where css changes to one are missed in the other. Also reduces duplication of material css theme definitions by consolidating it inone place. The respective styles.scss files for the demo app and browser app continue to exist incase those need environment specific css. For example the browser app requires that height: 100% is set on a document in order to render properly in a browsers devtools tab.

PR Close #49001
2023-02-14 20:25:23 +01:00
AleksanderBodurri
3a688cb5ec build(devtools): fix issue where esbuild configs were not being set properly in DevTools (#48762)
Previously, a createConfig helper function was created to consolidate common esbuild configurations for DevTools. This function is asynchronous, but when it was used to set the configuration in various esbuild config files, it was used as if it was synchronous.

This commit fixes this issue by wrapping the output of the function in await, so that it propagates the configurations to esbuild correctly.

PR Close #48762
2023-01-18 10:45:13 -08:00
Paul Gschwendtner
c841da82c2 refactor: simplify devtools setup given recent ESM changes (#48521)
Since the `defaults.bzl` repo-wide macros are now supporting ESM,
the special spec-bundle logic from `devtools` can be removed.

Also the esbuild configurations need to be updated to account
for the recent dev-infra build-tooling changes. Also properly
now ensures that `aysnc/await` is downleveled for ZoneJS compatibility.

PR Close #48521
2022-12-19 19:50:44 +00:00
Lukas Matta
2e65a2bd84 fix(devtools): Replace material imports and styles (#48420)
In the #48216 Material deps were updated to v15,
but the components and modules in DevTools were not
updated to MDC nor replaced with the legacy definitions.

PR Close #48420
2022-12-13 13:22:25 -08:00
Alan Agius
612eaca3c5 build: update cross-repo dependencies to latest stable version (#48216)
With this change we update the cross-repo dependencies to the latest stable version

PR Close #48216
2022-11-29 12:29:46 -08:00
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
AleksanderBodurri
b6c90e8e0b fix(devtools): fix positioning of property explorer expansion icon (#47446)
At some point this went out of sync with the rest of the styling around it. This commit fixes the positioning.

PR Close #47446
2022-09-19 16:59:13 +02:00
Alan Agius
16f96eeabf refactor(compiler-cli): remove enableIvy options (#47346)
This option has no longer any effect as Ivy is the only rendering engine.

BREAKING CHANGE: Angular compiler option `enableIvy` has been removed as Ivy is the only rendering engine.

PR Close #47346
2022-09-06 11:33:48 -07:00
Paul Gschwendtner
b757b1387c build: update dev-infra packages and account for build-tooling split from ng-dev (#46976)
The dev-infra build tooling is now decoupled from `ng-dev`. This will
make it easier to update `ng-dev` without necessarily needing to upgrade
the whole build system, Bazel etc. This is useful when e.g. new release
tool features have been added and should also be ported to active LTS
branches.

PR Close #46976
2022-08-02 09:37:37 -07: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
Paul Gschwendtner
83ef9d2fd9 build: remove unused karma debug config file (#46491)
As part of the initial devtools migration (moving it into this repo with
Bazel), we copied some of the Bazel Karma debug config code since it was
not available from the shared dev-infra repo. We already switched to the
shared code that is now available, but were missing an now-unused file.

PR Close #46491
2022-06-24 13:09:25 -07:00
Paul Gschwendtner
d248d83c17 build: convert release package build scripts to typescript (#46456)
Follow-up to: cce395a928.

PR Close #46456
2022-06-22 14:35:31 -07:00
Paul Gschwendtner
ffedcdec08 build: replace copied spec_bundle rule in devtools with dev-infra rule (#46437)
Replaces the copied `spec_bundle` rule in the devtools folder with the
one provided by dev-infra. Initially we couldn't use the rule because
it wasn't available / and also later didn't work with the linker
version from `compiler-cli` built from `HEAD`.

PR Close #46437
2022-06-21 11:48:03 -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
SyedAhm3r
db841d02c9 fix(devtools): Variables initialized to undefined appearing as [setter] in property inspector (#45921)
Fixed the condition and added a test case to catch the fix

PR Close #45921
2022-05-16 10:28:04 -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
mgechev
216a966757 docs: simplify the DevTools readme and add publishing instructions (#45905)
Remove duplicate information. Add publishing instructions for Firefox
and Chrome.

PR Close #45905
2022-05-09 13:58:06 -07:00
mgechev
1a233c2c55 docs: update the Angular DevTools supported version in docs and README (#45902)
Ensure we document we support Angular v12 or older. Also remove Ivy as
a requirement because that's implicit.

PR Close #45902
2022-05-05 16:56:46 -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
a212fb4dde docs: update the Angular DevTools auto-generated READMEs (#45884)
Replace the auto-generated READMEs in the different Angular DevTools
submodules with brief descriptions.

PR Close #45884
2022-05-05 15:29:27 -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
Paul Gschwendtner
68a6a075f4 build: clean up references to old master branch (#45856)
Cleans up all references to the `master` branch we renamed to
`main` across Angular.

PR Close #45856
2022-05-04 16:23:33 -07:00
AleksanderBodurri
a521571e85 docs(devtools): create documentation on installing Angular DevTools in Safari (#45763)
With the introduction of many new devtools extensions APIs, it is now possible to install Angular DevTools in Safari.

This commit details how to convert an Angular DevTools build to a Safari web extension with Xcode and `xcrun safari-web-extension-converter `

PR Close #45763
2022-05-02 15:36:37 -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