Commit graph

145 commits

Author SHA1 Message Date
Milo
c4df77f4e5 feat(devtools): add an experimental signals toggle (#62218)
create an experimental toggle to allow opening the signals graph view

PR Close #62218
2025-06-24 09:41:10 +00:00
Milo
24d299ea97 refactor(devtools): connect signal graph into directive explorer (#62108)
add an open signal graph button that can be enabled from
devtools-tabs, display the signal graph in a split pane

PR Close #62108
2025-06-19 10:09:21 +02:00
Milo
89efd27884 refactor(devtools): create devtools signals view (#61919)
create a component for the devtools signal pane, including view source, view value, and flashing of node updates

PR Close #61919
2025-06-17 11:19:53 +02:00
hawkgs
132fd3c301 refactor(devtools): reorganize profiler components (#62073)
Reorganize the components under `[...]/devtools-tabs/profiler`.

PR Close #62073
2025-06-17 10:52:07 +02:00
hawkgs
be2747eb26 fix(devtools): errors caused by the injector tree (#62029)
Errors:
- Attempting to translate SVGs when the tab is not on focus (Regression from #61241)
- Null injector node focus error

Extra:
- Improve scoping of the injector-tree component class members

PR Close #62029
2025-06-13 12:34:06 +02:00
hawkgs
966f96ce4e refactor(devtools): use a ResizeObserver for the responsive split (#61525)
Do not rely on `window:resize` since the split can be resized by other split panels as well.

PR Close #61525
2025-06-12 10:08:54 +02:00
hawkgs
bd3dc192fd refactor(devtools): improve profiler recorder controls (#62010)
Reorganize the template and reduce the vertical space taken by the controls.

PR Close #62010
2025-06-12 10:07:21 +02:00
Milo
b9141da6fc refactor(devtools): use import type to improve performance (#61966)
fixes a few lint errors when including devtools in g3

PR Close #61966
2025-06-10 14:43:46 -07:00
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
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
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
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
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
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
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