554 Commits

Author SHA1 Message Date
Angular Robot 6c6f3d346f build: lock file maintenance
See associated pull request for more information.
2026-08-04 08:26:26 -07:00
Kam baff4d07aa fix(docs-infra): keep inline code in links as an atomic inline box
Inline code inside a link renders as a chip with its own background. Text
decoration propagates from the anchor and cannot be cancelled by a descendant,
so with the chip laid out as a regular inline box the link underline is drawn
straight across it.

Lay the chip out as an atomic inline box, which the propagated decoration is not
drawn across. This applies to the link rule only; code outside of links keeps
`display: inline` for wrapping in multiline paragraphs, and the link rule
already sets `white-space: nowrap`.

(cherry picked from commit efe1aae1cd)
2026-08-03 16:20:18 +00:00
Kam fcaf15a0a4 fix(docs-infra): fix undefined CSS custom properties in shared-docs styles
Two custom properties in the shared-docs styles reference tokens that are
defined nowhere, so the declarations are invalid at computed-value time.

_kbd.scss sets the <kbd> text color with var(---tertiary-contrast); the extra
leading dash points at an undefined property with no fallback, so the color
resolves to the inherited value instead of the intended --tertiary-contrast.

_colors.scss builds --light-pink-to-light-purple-horizontal-gradient from
var(--light-purple), which is not defined anywhere (the sibling token is
--light-violet, defined in the same file), invalidating the gradient. The
gradient is not currently referenced, so this corrects a latent malformed
declaration rather than a visible bug.

Point both at the defined tokens: --tertiary-contrast and --light-violet.

(cherry picked from commit e70994bdc3)
2026-07-29 09:44:41 -07:00
Kam a7d67f9ccc fix(docs-infra): fix malformed --webgl-page-background declaration
In the light theme block of _colors.scss, --webgl-page-background and
--webgl-gray-unfilled were written on a single line without a separating
semicolon, and --webgl-page-background wrapped --page-background in an
invalid nested var(). As a result --webgl-page-background got a garbage
value and --webgl-gray-unfilled was never defined in the light theme.

Split them into two well-formed declarations and drop the nested var(),
matching the structure already used in the dark theme block.

(cherry picked from commit 91822538fe)
2026-07-29 09:04:14 -07:00
Angular Robot 77c5815faf build: lock file maintenance
See associated pull request for more information.
2026-07-29 08:47:16 -07:00
Kam ab52df470a fix(docs-infra): fail the guide build when a markdown file starts with a BOM
A leading UTF-8 byte order mark (U+FEFF) before the first `#` stops the
Markdown parser from recognizing the heading, so the guide renders its
title as a paragraph and drops the standard docs header. The character
is invisible, so it cannot be caught in review.

Add a check in the guides generation pipeline that throws when a source
file starts with a BOM, failing the build with the offending file name.
This sits alongside the existing unknown-anchor check and prevents the
regression fixed in #69889 from recurring.
2026-07-22 14:26:19 +02:00
Kam d2c0e1ec77 feat(docs-infra): bookend the tutorials with Angie
The tutorial intro and "next steps" pages were plain headings with no
send-off. Bookend each tutorial with Angie: a greeting pose welcoming
learners on the intro page, and a superhero pose congratulating them on
the completion page, each beside a speech bubble.

The bubble treatment from the 404 page lived inside the not-found
component, so it's extracted into a reusable docs-content style
(docs-tutorial-mascot) usable from tutorial markdown, and applied to the
intro and completion pages of the Learn Angular, Signals, and Signal
Forms tutorials.
2026-07-21 11:03:21 +02:00
Angular Robot 3c9820f3e0 build: lock file maintenance
See associated pull request for more information.
2026-07-21 10:58:37 +02:00
Kam 6a3487f7b7 feat(docs-infra): greet visitors with Angie in the cookie popup
The cookie consent popup showed only text and two buttons. Add the
Angie greeting pose to it so the first thing a new visitor sees carries
the same mascot treatment already used across the docs (the 404 page,
empty search results, the preview error state).

The message and mascot sit in a flex header row; the two action buttons
now share the row equally so they fill the card instead of leaving a
trailing gap. Layout only, the consent behaviour is unchanged.
2026-07-15 11:54:50 -07:00
Angular Robot 2732c5f63c build: lock file maintenance
See associated pull request for more information.
2026-07-14 07:59:16 -07:00
Shuaib Hasan Akib aca7371431 fix(docs-infra): don't show $ prompt on empty lines
Fenced shell code blocks prepended a `$` prompt to every rendered line  via a CSS `::before`, including blank lines are not commands to run.
2026-07-13 11:50:09 -07:00
Kam e6378eb330 fix(docs-infra): avoid search dialog empty-state flicker while re-querying
The search dialog picked its empty state ("Start typing" vs "No results
found") with `!resultsResource.hasValue()`, which during a re-query looks
identical to a freshly opened dialog since the resource resets its value and
reports `loading`. This flipped the message and mascot back to "Start typing"
mid-search, causing a question -> magnifying-glass -> question flicker on every
keystroke. Add an `emptyState` signal that holds the previous state while a
search is settling, so the dialog only changes once results resolve.
2026-07-10 10:58:53 -07:00
Kam 95fbd0bd48 feat(docs-infra): add Angie mascot to adev empty and error states
Several adev states show only plain text today. This brings the Angie
mascot into them for warmer, more on-brand empty states, with no change
to copy or behavior:

- Search dialog: a magnifying-glass Angie on "Start typing to see
  results", a questioning Angie on "No results found".
- API reference: a questioning Angie on "No API items found." and on the
  package filter's "No results found".
- Deprecated API pages: the back-turned orthos pose in the shared
  deprecation warning.

The mascots are decorative (aria-hidden) and sized per placement; the
poses are added as SVG assets under assets/images/angie/.

Also moves the Shiki highlighter init in the jsdoc-transforms spec into a
beforeAll, fixing a flake where the spec failed under randomized test
order.
2026-07-08 12:18:42 -07:00
SkyZeroZx c1829f6d7c docs(docs-infra): Add build-time validation for API and guide links using route manifest
Adds build-time validation to catch broken, stale, or miscased internal documentation links in both JSDoc and markdown, including `/api/` and `/guide/` URLs and their fragments. Updates the documentation pipeline to share the canonical route manifest, ensuring that all references are checked against the current navigation structure.
2026-07-08 10:24:47 -07:00
Kam 5ec0b1668b fix(docs-infra): disable nav-list tooltip on mobile
On mobile, focusing a long nav item shows a matTooltip that escapes the
drawer, ignores inner scroll, and blocks scrolling while open. Suppress
it on mobile using the existing isMobile helper.
2026-07-07 09:54:47 -07:00
Kam 4b0c066e22 fix(docs-infra): keep mobile nav open when closing the search dialog
Backdrop clicks on the search dialog were also closing the open mobile nav drawers. Adds an id to `<dialog>` and references it from both navs' `docsClickOutsideIgnore` arrays.
2026-07-07 09:54:14 -07:00
Angular Robot 3da6d058d3 build: lock file maintenance
See associated pull request for more information.
2026-07-07 09:48:35 -07:00
Kam 551cb3b8b5 fix(docs-infra): lock background scroll while the search dialog is open
The search dialog (Cmd/Ctrl+K) opens as a native modal via `showModal()`, but the
page behind it stayed scrollable, so scrolling drifted the underlying content
beneath the blurred backdrop.

`body` already reserves a stable scrollbar gutter, so setting `overflow: hidden`
while the dialog is open blocks background scrolling with no layout shift. The rule
keys off the dialog's `[open]` state, so it restores automatically on every close
path (Escape, click-outside, navigation) with no script involved.
2026-07-06 13:48:53 -07:00
Kam 95a953145e fix(docs-infra): restyle prefer/avoid code block headers
The "Prefer" / "Avoid" code block headers rendered the style label as
plain inline text joined to the title with a bare "-" separator, giving
the two block types little visual distinction. The taller label also left
the prefer/avoid header at a different height from the plain filename
header, so the copy button's single "top" value could not center it in
both.

Style the label as a small uppercased pill tinted with the block's style
color, drop the "-" separator, add a subtle inset accent under the header,
and swap the heavier "dangerous" icon on "Avoid" for "close". Give every
header a fixed height with box-sizing: border-box and vertically center
its contents so all variants render at the same height and the copy button
stays centered.

This supersedes #69638, folding in its centering fix for the copy button
offset that #69030 introduced.
2026-07-06 13:48:14 -07:00
Kam 12a4e60a4a fix(docs-infra): prevent tab labels from being clipped
The active docs tab applied a 2px bottom border that inactive tabs lacked,
which shrank the active label's content box and clipped its descenders. It
also set `line-height: 1.5` only on the active label, so switching tabs
nudged the text. Reserve the border as transparent on every tab and recolor
it on the active one, and share the label `line-height`, so the letters are
no longer cut and the label stays put when switching.
2026-07-06 13:46:40 -07:00
aparziale 207abf1140 fix(docs-infra): strip newlines from class signature in API gen
Prevents multiline generics or implements clauses from breaking the
rendered class signature in the API reference docs.
2026-07-06 13:44:17 -07:00
Shuaib Hasan Akib 892a6eb69a fix(docs-infra): add target="_blank" to external links in @see JSDoc tags
External links rendered via `@see {@link ...}` and `@see [label](url)`
were not opening in a new tab. The `getHtmlAdditionalLinks` function
now sets `target: '_blank'` on `LinkEntryRenderable` objects whose URL
is external, and `docs-pill-row.tsx` passes the `target` attribute to
the rendered anchor tag.

Fixes: #69593
2026-07-06 13:39:48 -07:00
Kam e4ffb24ecb fix(docs-infra): keep copy link icon out of the search index
The copy link button rendered its icon as a Material Symbols ligature text node, and since the button is appended inside each heading's `.docs-anchor`, that text leaked into the heading and the Algolia crawler indexed values like `Descriptionlink`. The glyph is now rendered via a `::before` pseudo-element using the icon codepoint, so no `link`/`check` text exists in the DOM and headings index correctly again.
2026-07-06 13:39:11 -07:00
Kam a9e3336aae fix(docs-infra): improve code selection contrast in dark mode
The ::selection background mixes only 10% of the accent color into
--octonary-contrast. In dark mode --octonary-contrast resolves to
gray-900 (#151417), which is the same color code blocks use as their
background, so selected code renders ~90% code-background and is almost
invisible.

Add a .docs-dark-mode ::selection override that raises the tint to 30%
so highlighted text stays legible over the near-black surface. Light
mode is unchanged, as its selection already contrasts the white page.

Fixes #69507
2026-06-30 17:56:35 -07:00
Alan Agius 7a7a612e48 docs: remove fixed font-size from table headers in docs
Removes the fixed font size from table headers to ensure they scale properly and do not appear smaller than the table content.
2026-06-30 17:41:27 -07:00
yamanerkam cbd97072f4 fix(docs-infra): don't auto-link code symbols used as link text
When an inline code symbol is used as the text of an explicit markdown
link (e.g. [`httpResource`](/guide/http/http-resource)), the codespan
renderer recognized it as an API symbol and wrapped it in a second
anchor pointing at the API reference. This produced nested <a> tags, so
the explicit link was effectively replaced by the API symbol link.

Disable auto-linking while rendering a link's inner tokens so the
explicit href is preserved, matching the pattern already used by the
heading and docs-card renderers.

Fixes #69549
2026-06-30 17:39:34 -07:00
yamanerkam 00226e7d80 fix(docs-infra): align and highlight external-link icon in nav sidebar
The open_in_new icon on external navigation items stayed grey on hover
and sat inset from the chevron column, so it never matched the chevron
items visually.

- Add a hover rule so the icon brightens to --primary-contrast along
  with the label, matching the chevron/text behaviour.
- Override the 1rem max-width reserve inherited from
  .docs-faceted-list-item-text by chaining both classes the span carries
  (.docs-external-link.docs-faceted-list-item-text), so the icon lines up
  with the chevrons at the link's end-padding. Using :host was avoided
  because it breaks the nested `a:hover &` selector.
2026-06-30 17:23:26 -07:00
Shuaib Hasan Akib 3f9d0ee985 fix(docs-infra): support header values containing apostrophes
Update the `headerRule` regex to capture the complete quoted header value. The previous pattern excluded quote characters from the content and failed to parse headers such as:

```angular-ts {avoid, header: "Can't inject interface"}
```

The new pattern matches everything between the opening and closing quote delimiters.
2026-06-30 17:22:35 -07:00
Angular Robot 681148c674 build: lock file maintenance
See associated pull request for more information.
2026-06-23 15:00:31 -04:00
Kam 642165f6fc fix(docs-infra): remove white flash on example viewer tab labels
The code tabs rendered by the example viewer (e.g. the npm/pnpm/yarn/bun
install tabs) paint their active label as transparent text clipped to a
gradient. Material's MDC tab styles add `transition: color 0.15s linear`
to `.mdc-tab__text-label`, plus a 100ms delay on the active tab. Because
that transition animates `color` from the solid label color to
transparent, the solid color stays visible on top of the gradient for
~100ms when a tab is activated, which reads as a white flash.

Disable the transition on these labels so the color switches instantly,
and target `.mdc-tab__text-label` directly (instead of a generic `span`)
so `color: transparent` drives the gradient clip cleanly.
2026-06-22 16:27:57 -04:00
Kam 50bb0d6bfe fix(docs-infra): prevent inline code in table headers from wrapping mid-word
When a documentation table has a wide content column, the narrow header
columns get squeezed and inline-code header labels break mid-word at
their hyphens. On the MCP server tools page this rendered the `local-only`
and `read-only` column headers as `local-` / `only` and `read-` / `only`.

Apply `white-space: nowrap` to `code` inside `th` so header tokens stay on
a single line. The rule is scoped to headers, whose labels are always
short, so long code signatures in body cells continue to wrap and no
table gains a horizontal scrollbar.
2026-06-22 16:05:44 -04:00
Kam 350763d84a fix(docs-infra): restore adev build under stricter ts_project deps
The cross-repo dependency update in #69410 bumped rules_angular, whose
ts_project now requires every entry in `deps` to provide the JsInfo
provider. Two adev targets passed deps that don't, so `bazel build
//adev:build` fails analysis and the adev CI check has been red on main
since that PR.

Make generate_nav_items return JsInfo (with the generated routes.json as
its sources) so navigation-entries can keep importing routes.json through
its deps. Also drop the spurious deps entry on llms_lib: llms.mts reads
llms-list.md at runtime via readFile rather than importing it, and the
file is already provided to the binary via data.

Fixes #69429
2026-06-19 11:37:17 +02:00
yamanerkam e77a8a0c7a fix(docs-infra): align the page title with its edit action
The page title row (`.docs-page-title`) relied on the default flex
alignment, so the edit icon next to the title did not line up with the
title text. Add `align-items: baseline` so the icon sits on the title's
baseline.
2026-06-18 14:06:22 -04:00
yamanerkam ffcc8eee98 fix(docs-infra): correct select dropdown scrolling, sizing, and selection
Several issues in the shared docs `Select` component (used by the API
reference package filter):

- The options list never scrolled: its element used a class with no styles,
  so the intended max-height/overflow rule was dead. Point it at the styled
  class so long lists scroll within the popover.
- Selecting an option now closes the popup instead of leaving it open.
- Clip the trigger and popover corners (overflow: hidden) so their rounded
  borders render cleanly, and align the popover width with the trigger.
- Drop the selected-option checkmark. The component is single-select and
  already marks the selection with a highlight, so the tick was misleading.
- Remove the unused `disabled` input.
2026-06-18 10:52:35 -04:00
Matthieu Riegler c23ddd6a99 docs(docs-infra): remove deprecated ts flags
This fixes the playground & tutorials
2026-06-18 15:29:39 +02:00
Angular Robot 2d2d5fc362 build: lock file maintenance
See associated pull request for more information.

Closes #69367 as a pr takeover
2026-06-17 09:12:30 -07:00
Kam 43acead06d fix(docs-infra): use a facade for docs-video to fix Firefox embeds
Follow-up to #69205. After switching adev's COEP to `credentialless`, the
cross-origin YouTube iframe in `<docs-video>` loads in Chromium and Safari but
not Firefox, whose `credentialless` policy does not extend to nested frames. The
result was a COEP error screen instead of the player.

Render `<docs-video>` as a lightweight thumbnail facade instead of embedding the
iframe directly. The thumbnail is a cross-origin subresource, so it loads under
`credentialless` in every browser. `DocViewer` then upgrades the facade to the
inline player on hydration in browsers that can load the embed (Chromium,
Safari), preserving the previous behavior there. On Firefox the facade stays a
plain link that opens the video on YouTube (with autoplay), which replaces the
error screen.

The thumbnail uses `maxresdefault` and falls back to `hqdefault` when a video
has no max-resolution image.
2026-06-15 08:58:00 -07:00
hawkgs db677a4349 fix(docs-infra): stabilize html element scroll gutter
Stabilize `<html>` scroll gutter.

Fixes #69036
2026-06-12 09:19:32 -07:00
hawkgs 91ab7c6dea fix(docs-infra): add explicit font styles to docs-primary-btn
Add font family, size and weight to the `.docs-primary-btn`. This guarantees that applying the class to non-button elements, like anchors, will results in the same visual representation.
2026-06-12 09:08:02 -07:00
Jessica Janiuk dcc4fe06b9 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-06-11 13:04:18 -07:00
Matthieu Riegler 59e2041847 docs(docs-infra): Update navigation status 2026-06-11 09:24:28 -07:00
Matthieu Riegler f2b642b10a docs(docs-infra): remove test related deps
They were unused. (it makes maintenance less confusing)
2026-06-10 11:08:57 -07:00
Angular Robot 0a9ff4ea47 build: update all non-major dependencies
See associated pull request for more information.
2026-06-09 11:07:34 -07:00
KirtiRamchandani b7cb5844cf fix(docs-infra): avoid code copy button overlap
Reveal code copy controls on hover and focus so long code snippets stay readable while keyboard access and copy state feedback remain intact.
2026-06-08 14:19:49 -07:00
Angular Robot 21e8ad37d9 build: update jasmine dependencies to v6
See associated pull request for more information.
2026-06-08 10:13:32 -07:00
KirtiRamchandani bcb9f8da03 fix(docs-infra): reserve scrollbar gutter for mobile nav 2026-06-04 12:22:54 -07:00
Alan Agius ba59de563f refactor(docs-infra): rename tutorial & example package.json.template to package.json
Rename the tutorial and example template packages' package.json.template files to package.json on disk.

To comply with ng_package limitations (which forbids floating package.json files in package output), we added a copy_file rule in the BUILD files to generate the .template files during build/packaging, and excluded the source package.json files from the filegroups. This keeps package.json as standard files in the source tree while preserving docs packaging and runtime logic.
2026-06-03 18:19:17 +02:00
Pawel Kozlowski 595660d796 docs: update tutorials and playground to v22.0.0 2026-06-03 17:11:37 +02:00
Matthieu Riegler ec4f08bb94 docs(docs-infra): simplify code block styles
#68940 introduced a regression that broke style for wrapped `code` blocks.
Simplifying the style by droping the unecessary gradient + before workaround fixes the issue.
2026-06-01 18:36:50 +02:00
Kristiyan Kostadinov 96ed0fe45b fix(docs-infra): round up media queries
Uses 1px increments for media queries, rather than the 0.01px we have now which seem to be a bit too precise and cause the UI to be stuck between states in some cases.

I've also removed some unnecessary `calc`, because the calculation is happening inside Sass already.

Fixes #69020.
2026-06-01 11:34:38 +02:00