From d0a748cc1bf5c56a881e317e689e27bd35975b4f Mon Sep 17 00:00:00 2001 From: Kam Date: Wed, 9 Sep 2026 00:01:43 +0300 Subject: [PATCH] docs(animations): stop the query() usage notes truncating at a code sample The `query()` usage notes contain this code sample: query(':self, .record:enter, .record:leave, @subTrigger', [...]) TypeScript's JSDoc parser treats whitespace followed by `@subTrigger` as the start of a new tag, even inside a fenced code block. The extraction ends up with a 145 character `@usageNotes` cut off mid-sample and a phantom `@subTrigger` tag holding the remaining 2453 characters, which the renderer discards. The result is that https://angular.dev/api/animations/query ends mid-line inside that code block. The "Entering and Leaving Elements" and "Usage Example" sections never render, and the two links pointing at the first of them, one in the same JSDoc and one in guide/animations/complex-sequences, both dead-end. Move the `@` token to the front of the selector so it follows a quote rather than a space. Order within a comma separated selector list is irrelevant, and the sample's own prose describes it as a set of tokens merged into one string. The rendered page grows from 7109 to 21269 bytes and gains the `entering-and-leaving-elements` and `usage-example` anchors. Rebuilding //adev/src/assets:content with and without the change alters 1 of 1565 pages. --- packages/animations/src/animation_metadata.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/animations/src/animation_metadata.ts b/packages/animations/src/animation_metadata.ts index e21daba5d19..885ae76aefd 100644 --- a/packages/animations/src/animation_metadata.ts +++ b/packages/animations/src/animation_metadata.ts @@ -1231,7 +1231,7 @@ export function useAnimation( * Tokens can be merged into a combined query selector string. For example: * * ```ts - * query(':self, .record:enter, .record:leave, @subTrigger', [...]) + * query('@subTrigger, :self, .record:enter, .record:leave', [...]) * ``` * * The `query()` function collects multiple elements and works internally by using