Commit graph

120 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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