Commit graph

16 commits

Author SHA1 Message Date
mgechev
bf428775a4 fix(devtools): change links to the angular repo (#44885)
Use proper reporting and source code links in the DevTools UI.

PR Close #44885
2022-02-02 15:33:17 -08:00
JimMorrison723
d41dedb85b fix(devtools): highlighter should only show the hovered component's name (#44863)
The used children property on a HTMLCollection does not contain text elements. Because of this, the highlighter overlay text never got fully cleared.

PR Close #44863
2022-02-01 21:28:09 +00:00
JimMorrison723
3f0a2d3120 fix(devtools): show date type property value in preview (#44864)
Values of Date properties were not shown in the preview. It was formatted to a simple string thus not giving valuable info to the developer.

PR Close #44864
2022-01-31 19:32:47 +00:00
Paul Gschwendtner
7b7d644286 refactor: fix type checking error with devtools state-serializer spec (#44735)
Fixes an error in the satte-serializer spec:

```
devtools/projects/ng-devtools-backend/src/lib/state-serializer/state-serializer.spec.ts:103:60 - error TS2345: Argument of type '{ name: string; children: { name: string; children: { name: number; children: { name: number; children: { name: string; }[]; }[]; }[]; }[]; }[]' is not assignable to parameter of type 'NestedProp[]'.
  Type '{ name: string; children: { name: string; children: { name: number; children: { name: number; children: { name: string; }[]; }[]; }[]; }[]; }' is not assignable to type 'NestedProp'.
    Types of property 'children' are incompatible.
      Type '{ name: string; children: { name: number; children: { name: number; children: { name: string; }[]; }[]; }[]; }[]' is not assignable to type 'NestedProp[]'.
        Type '{ name: string; children: { name: number; children: { name: number; children: { name: string; }[]; }[]; }[]; }' is not assignable to type 'NestedProp'.
          Types of property 'children' are incompatible.
            Type '{ name: number; children: { name: number; children: { name: string; }[]; }[]; }[]' is not assignable to type 'NestedProp[]'.
              Type '{ name: number; children: { name: number; children: { name: string; }[]; }[]; }' is not assignable to type 'NestedProp'.
                Types of property 'children' are incompatible.
                  Type '{ name: number; children: { name: string; }[]; }[]' is not assignable to type 'NestedProp[]'.
                    Type '{ name: number; children: { name: string; }[]; }' is not assignable to type 'NestedProp'.
                      Types of property 'children' are incompatible.
                        Type '{ name: string; }[]' is not assignable to type 'NestedProp[]'.
                          Property 'children' is missing in type '{ name: string; }' but required in type 'NestedProp'.

103     const result = deeplySerializeSelectedProperties(dir1, QUERY_1_2);
```

PR Close #44735
2022-01-27 21:51:28 +00:00
AleksanderBodurri
8fb3aed874 docs(devtools): update comment to better reflect what angular version is running in g3.
PR Close #43473
2022-01-26 14:18:32 -08:00
AleksanderBodurri
445fbf81fd refactor(devtools): bring the angular devtools directory into the root bazel workspace
Previously devtools used a nested workspace for its bazel configurations. This meant framework dependencies were consumed via npm.

Now devtools is part of the root bazel directory that all other files in this codebase fall under. This allows us to build devtools using local angular packages, removing the need to consume these dependencies with npn. This is useful because we no longer have to update these dependencies with an automated tool like renovate, and our CI tests will always run against the most up to date framework packages.
2022-01-26 16:35:31 -05:00
AleksanderBodurri
7ed57f29ea refactor(devtools): add override to classes that extend abstract classes in the devtools directory
Previously the typescript override keyword was not on these methods. Now that devtools uses the tslint config in angular/angular (because of the no-implicit-override-abstract rule) we need to add these key words explicitly to method overrides. That is what this commit does.
2022-01-26 16:35:31 -05:00
AleksanderBodurri
2a1ff17b42 refactor(devtools): run tslint --fix on devtools codebase
This commit runs tslint --fix with the angular/angular tslint configuration on the files inside the devtools codebase.

Notably, the file-header rule in `tslint.json` was missing a default attribute. This commit adds that default attribute and sets it to the
license header that is present in all files in this repo. After running tslint --fix with this default added, this commit added the license header to all files in the devtools directory. Note for the reviewer: the automatically added license headers were added as comments with the "/*!" prefix. Since we want these comments removed in builds, and the rest of the codebase uses "/**", a simple find and replace was performed on the devtools directory to change these prefixes to "/**".
2022-01-26 16:35:31 -05:00
AleksanderBodurri
6b06fa3f78 refactor(devtools): make bazel labels follow snake case convention
Previously, camel case was used for bazel labels in the devtools directory. This commit changes these labels to snake case except in the case where the label is identical to the directory name that the BUILD file is in.
2022-01-26 16:35:30 -05:00
AleksanderBodurri
8b84412d76 refactor(devtools): run ng-dev format on angular devtools files
Formats the entire devtools directory with the ng-dev formatting tool. Previously we relied on prettier, so this commit also remove prettier from devtools' dependencies.
2022-01-26 16:35:30 -05:00
AleksanderBodurri
34385014b0 test(devtools): fix some flakey cypress tests
Uses `cy.contains` as one command to optimize cypress' retry-ability mechanism

Affected tests are in:

`property-update.e2e.js` and `view-component-metadata.e2e.js`
2022-01-26 16:35:30 -05:00
AleksanderBodurri
c24924cbd7 build(devtools): use ng-dev stamp tooling to stamp the latest git SHA in devtools
Previously, we were using ngx-build-plus with a custom webpack config to determine the git SHA at runtime.

Now, after migrating to bazel and transfering to angular/angular, this commit uses ng-dev to stamp the latest git SHA directly in angular devtools' application environment.

This commit also removes the old webpack configs.
2022-01-26 16:35:30 -05:00
AleksanderBodurri
6a659a592e ci: remove bazel cypress tests
Previously we were running Cypress with bazel in an effort to save on CI time when devtools dependencies did not change. This commit reverts to running Cypress manually, until we can revisit building devtools with local Angular packages to save CI time.
2022-01-26 16:35:30 -05:00
AleksanderBodurri
0a948fb2ef build: configure circleci for angular devtools ci
Sets up commands in circleci config to test angular devtools.
2022-01-26 16:35:30 -05:00
AleksanderBodurri
82d46b20b1 refactor(devtools): run ng-dev format on bazel files in devtools directory 2022-01-26 16:35:30 -05:00
AleksanderBodurri
528f33d13d refactor(devtools): prepare codebase for migration to angular/angular repo 2021-11-21 20:23:18 -05:00