Commit graph

405 commits

Author SHA1 Message Date
Joey Perrott
bbbe477f47 refactor: migrate animations to prettier formatting (#53977)
Migrate formatting to prettier for animations from clang-format

PR Close #53977
2024-01-19 20:08:57 +01:00
Andrew Scott
5ae85e4849 refactor(core): node removal notifies scheduler only when animations are enabled (#53857)
Node removal is immediate and does not require change detection to run
when animations are not provided. This refactor makes the animation
engine notify the scheduler rather than doing it on all node removals.

PR Close #53857
2024-01-19 10:28:24 +01:00
Jeremy Elbourn
91f250dab7 build: configure cross-pkg resolution for api extraction (#52499)
This commit adds path mapping and source dependencies necessary to fully
resolve types during api doc extraction.

PR Close #52499
2024-01-05 11:27:34 -08:00
Joey Perrott
c4de4e1f89 refactor(docs-infra): build adev application using local generated assets (#53511)
Use local generated assets to build adev application.

PR Close #53511
2023-12-20 14:49:31 -08:00
Matthieu Riegler
d7e7409e81 refactor(animations): drop convertToMap & copyStyles and use native functions. (#52441)
`copyStyles` was side-effectful and also returned a value : not great.

PR Close #52441
2023-12-14 12:33:24 -08:00
Matthieu Riegler
d28ce0a4cf refactor(animations): use a spread operator instead of custom copyObj (#52441)
Using the spread operator is the fastest way to shallow copy an object.

PR Close #52441
2023-12-14 12:33:24 -08:00
Matthieu Riegler
6a347d36eb refactor(animations): use a spread operator to convert an iterable to an array. (#52441)
Using the spread operator is the fastest way to convert an iterable to an array.

PR Close #52441
2023-12-14 12:33:24 -08:00
Matthieu Riegler
635c3b4fa8 refactor(animations): use existing helper methods. (#52441)
Saving a few bytes.

PR Close #52441
2023-12-14 12:33:24 -08:00
Matthieu Riegler
5ee11a74ec fix(animations): prevent the AsyncAnimationRenderer from calling the delegate when there is no element. (#52570)
This happens when `issueAnimationCommand` is invoked

fixes #52538

PR Close #52570
2023-11-13 16:29:18 +00:00
arturovt
a02a745a4a fix(animations): remove finish listener once player is destroyed (#51136)
This commit removes the `finish` listener from the Animation object once
the animation is finished, effectively resolving a memory leak. Previously,
the `finish` listener captured `this`, which prevented `this` from being garbage collected.

PR Close #51136
2023-11-02 10:29:38 -07:00
Alan Agius
19a426d54e build: update node.js engines version to be more explicate about v20 support (#52448)
This commit adds Node.js 20 as explicitly supported version to match the Angular CLI engines.

See: https://github.com/angular/angular-cli/pull/26173

PR Close #52448
2023-10-31 14:18:36 -07:00
Andrea Canciani
fc9ba3978c refactor: fix a number of typos throughout the codebase (#52249)
Fix some typos such as `boostrap`, `propery` and more, both in
documentation and in code (comments, identifiers).

PR Close #52249
2023-10-25 16:51:24 -07:00
Jan Kuehle
ebbc7a27e8 refactor: change public const enums to enums (#51670)
Angular recently gained a local compilation mode (see commit
345dd6d81a). This is intended to be used
with the TypeScript compiler option isolatedModules, which bans imports
of const enums.

This changes all const enums tagged with @publicApi to regular enums.

Fixes #46240

PR Close #51670
2023-10-25 10:39:18 -07:00
Kristiyan Kostadinov
c07805612f test(core): clean up unnecessary nesting in old tests (#52239)
A lot of our tests are wrapped in `{}` which serves no purpose, aside from increasing the nesting level and, in some cases, causing confusion. The braces appear to be a leftover from a time when all tests were wrapped in a `function main() {}`. The function declaration was removed in #21053, but the braces remained, presumably because it was easier to search&replace for `function main()`, but not to remove the braces at the same time.

PR Close #52239
2023-10-19 09:26:15 -07:00
Matthieu Riegler
1c4a3677eb refactor(animations): make AnimationBuilder tree-shakable (#52097)
This commit allows also to use the `AnimationBuilder` when using `provideAnimationsAsync()`

fixes #52096

PR Close #52097
2023-10-12 18:13:22 +02:00
Jeremy Elbourn
fcc000e803 build: add targets for api doc generation (#52034)
This adds `generate_api_docs` targets to all of the packages for which we publish api reference docs. One known issue here is that any type information that comes from another package (e.g. router depending on core) currently resolve to `any` because the other sources are not available in the program. This can be tackled in a follow-up commit.

This commit also updates the install patch for `@angular/build-tools` to use the local version of compiler-cli.

PR Close #52034
2023-10-10 16:18:50 -07:00
Matthieu Riegler
75d610d420 fix(platform-browser): set animation properties when using async animations. (#52087)
Animations properties set on the default renderer weren't set on the animation renderer once it was loaded. This commit fixes this.

PR Close #52087
2023-10-10 11:59:13 -07:00
Matthieu Riegler
5b375d106f fix(platform-browser): Fire Animations events when using async animations. (#52087)
Animations events registered against the default renderer weren't registered against the animation renderer once it was loaded. This commit fixes this.

fixes #52076

PR Close #52087
2023-10-10 11:59:13 -07:00
Matthieu Riegler
81e7f5be03 test(animations): update the integration test (#50738)
Let's have the same test app for async and eagerly loaded animations.

PR Close #50738
2023-09-29 10:49:41 -07:00
Matthieu Riegler
e753278faa feat(animations): Add the possibility of lazy loading animations code. (#50738)
`provideLazyLoadedAnimations()` returns providers which allow the lazy loading of the animation module.

Lazy loading of the animation code can shave off up to 16KB gzipped of the main bundle.

PR Close #50738
2023-09-29 10:49:39 -07:00
Jessica Janiuk
ac1afd8649 refactor: relocate animation renderer class for private exports (#51910)
this is a pre-emptive move of the animation renderer to prepare for #50738 to land safely.

PR Close #51910
2023-09-26 15:23:15 -07:00
Matthieu Riegler
0598613950 refactor(animations): deprecation of AnimationDriver.NOOP (#51843)
The `NoopAnimationDriver` as static property of `AnimationDriver` prevents it from being removed by tree shaking. This commit deprecates it and exposes the `NoopAnimationDriver` on the public API to replace its usage.

DEPRECATED:
The `AnimationDriver.NOOP` symbol is deprecated, use `NoopAnimationDriver` instead.

PR Close #51843
2023-09-22 12:15:45 -07:00
Matthieu Riegler
e5d327d049 refactor(animations): Use the Writable type when overwriting readonly properties. (#49754)
The `Writable` type is usefull when we want overwrite readonly properties and we still want to maintain code navigation/reference. It should be use instead of  type assertions.

PR Close #49754
2023-09-22 10:02:14 -07:00
Alan Agius
59aa0634f4 build: remove support for Node.js v16 (#51755)
BREAKING CHANGE: Node.js v16 support has been removed and the minimum support version has been bumped to 18.13.0.

Node.js v16 is planned to be End-of-Life on 2023-09-11. Angular will stop supporting Node.js v16 in Angular v17. For Node.js release schedule details, please see: https://github.com/nodejs/release#release-schedule

PR Close #51755
2023-09-13 10:49:06 -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
Matthieu Riegler
a1bad49703 refactor(animations): cleanup ahead of animation lazy loading (#51249)
There are no functional changes.

PR Close #51249
2023-08-31 18:35:48 +00:00
Joey Perrott
18be804c03 fix(animations): 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
Paul Gschwendtner
698c058e1c fix(animations): remove code duplication between entry-points (#51500)
The animations packages were duplicating a little bit of code due
to relative imports between entry-points. This caused bundlers to
inline shared functions twice in both FESM outputs.

PR Close #51500
2023-08-29 17:55:34 +00:00
Matthieu Riegler
10bab47b4f refactor(animations): remove unecessary interface (#50662)
`Animation` is provided by `lib.dom`.

PR Close #50662
2023-08-07 09:26:22 -07:00
Matthieu Riegler
a14bdfe859 fix(animations): Ensure elements are removed from the cache after leave animation. (#50929)
This commit fixes a memory leak.

`_namespaceLookup` was cleared before the call to `processLeaveNode()` which was using the lookup.
Without that lookup `clearElementCache()` wasn't called thus keeping a reference to the element.

Fixes #24197 & #50533

PR Close #50929
2023-07-11 08:28:10 -07:00
Matthieu Riegler
01e2bde0c0 refactor(animations): Fix JSDoc comment (#50893)
JSDoc comments should start with 2 stars or the annotations would not be picked up by the AIO workflow.

With this fix, the internal methods are no longer visible in the doc.

PR Close #50893
2023-06-30 11:49:29 -07:00
Alan Agius
29f6912e95 refactor(animations): remove redundant castings (#50860)
This commit removes unnecessary castings.

PR Close #50860
2023-06-27 06:27:15 -07:00
Alan Agius
0380564f85 fix(platform-browser): wait until animation completion before destroying renderer (#50860)
Prior to this commit, the renderer destroy method was being called before the animation complete. This is problematic when using `REMOVE_STYLES_ON_COMPONENT_DESTROY` as it causes the styles to be removed too early.

This commit, updates this destroy logic to be call the render destroy once the animations complete.

This has been reported internally in:
- http://b/271251353#comment12
- http://b/282004950#comment5

PR Close #50860
2023-06-27 06:27:15 -07:00
Andrew Kushnir
452a3e9ca0 Revert "fix(platform-browser): wait until animation completion before destroying renderer (#50677)" (#50857)
This reverts commit 2b55103e94.

PR Close #50857
2023-06-26 12:18:39 -07:00
Andrew Kushnir
ed8b088de2 Revert "refactor(animations): remove redundant castings (#50677)" (#50857)
This reverts commit d22734766b.

PR Close #50857
2023-06-26 12:18:38 -07:00
Alan Agius
d22734766b refactor(animations): remove redundant castings (#50677)
This commit removes unnecessary castings.

PR Close #50677
2023-06-26 09:02:42 -07:00
Alan Agius
2b55103e94 fix(platform-browser): wait until animation completion before destroying renderer (#50677)
Prior to this commit, the renderer destroy method was being called before the animation complete. This is problematic when using `REMOVE_STYLES_ON_COMPONENT_DESTROY` as it causes the styles to be removed too early.

This commit, updates this destroy logic to be call the render destroy once the animations complete.

This has been reported internally in:
- http://b/271251353#comment12
- http://b/282004950#comment5

PR Close #50677
2023-06-26 09:02:42 -07:00
Alan Agius
4550fe42f7 refactor: use queueMicrotask to schedule micro tasks instead of various helpers (#50485)
`queueMicrotask` is an API which is supported by all browser and Node.js versions.

PR Close #50485
2023-06-15 16:38:21 +02:00
Matthieu Riegler
7d4dc2285b docs(animations): Make links out of @see tags (#50110)
This commit is part of the work for #50097 to improve the linking on the online documentation.

PR Close #50110
2023-06-14 10:54:39 +02:00
Matthieu Riegler
0c441f6d64 refactor(platform-browser): Remove BrowserDetection (#50411)
Our tests should rely on the running browser.

PR Close #50411
2023-05-30 13:06:28 -07:00
Matthieu Riegler
bada9199f5 fix(animations): Trigger leave animation when ViewContainerRef is injected (#48705)
Injecting `ViewContainerRef` into a component makes it effectively a container. The leave animation wasn't triggered on containers before this fix.

fixes angular#48667

PR Close #48705
2023-05-25 14:40:34 -04:00
gdarnell
d0a5530f77 refactor: remove unnecessary array copying (#50370)
Removes `Array.from` and spread operators that have no functional effect.

PR Close #50370
2023-05-22 14:47:29 +00:00
Matthieu Riegler
ec968a99d5 refactor(animations): remove circular deps (#50049)
`AnimationDriver` was not used in shared.ts.

PR Close #50049
2023-05-04 08:58:25 +02:00
Andrew Kushnir
3bcbfecb78 refactor(platform-browser): log a warning when a custom or a noop ZoneJS is used with hydration (#49944)
Hydration relies on a signal from ZoneJS when it becomes stable inside an application, so that Angular can start serialization process on the server or post-hydration cleanup on the client (to remove DOM nodes that remained unclaimed).

Providing a custom or a "noop" ZoneJS implementation may lead to a different timing of the "stable" event, thus triggering the serialization or the cleanup too early or too late. This is not yet a fully supported configuration.

This commit adds a warning (non-blocking) for those cases.

PR Close #49944
2023-04-23 18:23:28 -07:00
Andrew Kushnir
b98ecbc0ce build: update minimum supported Node version from 16.13.0 -> 16.14.0 (#49771)
This commit updates the minimum supported Node version across packages from 16.13.0 -> 16.14.0 to ensure compatibility with dependencies.

PR Close #49771
2023-04-11 07:56:31 -07:00
Matthieu Riegler
40ed152d21 refactor(animations): remove #9100 todos. (#49407)
Breaking change: On `AnimationPlayer.setPosition` the argument is now of type `number`

PR Close #49407
2023-04-05 19:33:52 -07:00
Alan Agius
d37e21c582 refactor(animations): remove Domino specific logic (#49630)
These workarounds are no longer required following the fixes in https://github.com/angular/domino/pull/14/

PR Close #49630
2023-04-05 11:42:57 -07:00
Andrew Scott
8d91d74d46 refactor(core): Remove NG_DEV_MODE const (#49530)
From Joost: The locally defined NG_DEV_MODE does not work with ESBuild, as it doesn’t fold recursively

PR Close #49530
2023-03-22 15:31:48 -07:00
Matthieu Riegler
477237aa85 refactor(animations): handle #24571 todos (#49231)
This commit removes the remaining ones in animations code base

PR Close #49231
2023-03-06 18:45:33 +00:00
Alan Agius
f594725951 refactor(core): remove Node.js v14 support (#49255)
BREAKING CHANGE: Node.js v14 support has been removed

Node.js v14 is planned to be End-of-Life on 2023-04-30. Angular will stop supporting Node.js v14 in Angular v16. Angular v16 will continue to officially support Node.js versions v16 and v18.

PR Close #49255
2023-02-28 11:00:25 -08:00