528 Commits

Author SHA1 Message Date
Kam 23fe1a9116 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

(cherry picked from commit a9e3336aae)
2026-06-30 17:56:39 -07:00
Angular Robot 98ea50718a build: lock file maintenance
See associated pull request for more information.
2026-06-30 17:43:43 -07:00
Alan Agius 533e17f568 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.

(cherry picked from commit 7a7a612e48)
2026-06-30 17:41:31 -07:00
yamanerkam 9798af94e6 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

(cherry picked from commit cbd97072f4)
2026-06-30 17:39:38 -07:00
yamanerkam d34cd66e96 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.

(cherry picked from commit 00226e7d80)
2026-06-30 17:23:30 -07:00
Shuaib Hasan Akib b235278699 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.

(cherry picked from commit 3f9d0ee985)
2026-06-30 17:22:40 -07:00
Angular Robot 7766dc0ef4 build: lock file maintenance
See associated pull request for more information.
2026-06-23 10:44:38 -04:00
Kam c4d135df45 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.

(cherry picked from commit 642165f6fc)
2026-06-22 16:28:01 -04:00
Kam 0cd3d50de3 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.

(cherry picked from commit 50bb0d6bfe)
2026-06-22 16:05:49 -04:00
Kam 0db4bb0eb0 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

(cherry picked from commit 350763d84a)
2026-06-19 11:37:22 +02:00
yamanerkam c6b0b87306 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.

(cherry picked from commit e77a8a0c7a)
2026-06-18 14:06:26 -04:00
yamanerkam 73880c55fd 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.

(cherry picked from commit ffcc8eee98)
2026-06-18 10:52:40 -04:00
Matthieu Riegler 291d574b1d docs(docs-infra): remove deprecated ts flags
This fixes the playground & tutorials

(cherry picked from commit c23ddd6a99)
2026-06-18 15:29:44 +02:00
Angular Robot 8dec7753a3 build: lock file maintenance
See associated pull request for more information.

Closes #69368 as a pr takeover
2026-06-17 09:59:32 -07:00
Kam eafdbe008a 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.

(cherry picked from commit 43acead06d)
2026-06-15 15:58:04 +00:00
hawkgs 02c1652091 fix(docs-infra): stabilize html element scroll gutter
Stabilize `<html>` scroll gutter.

Fixes #69036

(cherry picked from commit db677a4349)
2026-06-12 16:19:36 +00:00
hawkgs b7aa8dca6b 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.

(cherry picked from commit 91ab7c6dea)
2026-06-12 16:08:06 +00:00
Matthieu Riegler 033aa9720d docs(docs-infra): Update navigation status
(cherry picked from commit 59e2041847)
2026-06-11 16:24:32 +00:00
KirtiRamchandani e7dae12c3d 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.

(cherry picked from commit b7cb5844cf)
2026-06-08 21:19:54 +00:00
KirtiRamchandani 1f0aeac008 fix(docs-infra): reserve scrollbar gutter for mobile nav
(cherry picked from commit bcb9f8da03)
2026-06-04 19:22:59 +00:00
Alan Agius 14fc4b1018 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.

(cherry picked from commit ba59de563f)
2026-06-03 18:19:27 +02:00
Pawel Kozlowski 24416ce92f docs: update tutorials and playground to v22.0.0
(cherry picked from commit 595660d796)
2026-06-03 17:11:43 +02:00
Matthieu Riegler 012609a714 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.

(cherry picked from commit ec4f08bb94)
2026-06-01 18:37:00 +02:00
Kristiyan Kostadinov 8061ca4cf3 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.

(cherry picked from commit 96ed0fe45b)
2026-06-01 11:34:45 +02:00
Kam 8f625e77bd refactor(docs-infra): extract magic 27 in navigation-list tooltip threshold
The matTooltip on navigation list items was disabled when the label was
shorter than the literal `27`, repeated across four bindings in the
template. Lift the value to a protected readonly field so the threshold
has a name and lives in one place.

(cherry picked from commit 34d577f697)
2026-05-28 16:08:17 +02:00
Bhuvansh855 554be43643 fix(docs-infra): improve inline code layout
Remove inline-block layout behavior from inline code elements
to improve wrapping and spacing in multiline documentation
paragraphs.

(cherry picked from commit fdf0bf9a62)
2026-05-27 10:52:20 -07:00
Kam 83026cf158 fix(docs-infra): make absolute angular.dev hrefs relative in CLI option descriptions
CLI option descriptions are sourced from `@angular/cli` schema JSON
files, several of which contain absolute `https://angular.dev/...` URLs
in their `description` text. Those URLs render with the external-link
icon and push preview users out to production when viewed on
`next.angular.dev` or other dev previews. The path bypasses the existing
`link.mts` ban on absolute angular.dev links because option descriptions
go through `marked.parse` directly, without `AdevDocsRenderer`. Rewrite
the rendered hrefs whose values begin with `https://angular.dev/` (or
the `http:` variant) to root-relative paths so the resulting anchors
route through Angular's Router and resolve against the active
deployment. Subdomains such as `next.angular.dev/...` are intentionally
not rewritten because they refer to genuinely different deployments.

Closes #68795

(cherry picked from commit 745ee71c25)
2026-05-20 10:28:33 -07:00
Matthieu Riegler efa2267394 docs(docs-infra): Show function args
With this change non-overloaded functions also show the params + return type in a dedicated block.

(cherry picked from commit 872853fbcb)
2026-05-18 13:22:34 -07:00
Matthieu Riegler 2c0e45b9d5 build: update cross-repo angular dependencies (22.0.x)
This PR also replaces the implementation of the select component on ADEV due to the aria breaking changes
2026-05-12 10:58:03 -07:00
Matthieu Riegler 3593ceb407 docs: update guides to use @Service
In the cases where it was preferable to use `@Service` in place of `@Injectable`

(cherry picked from commit 52a848790f)
2026-05-11 12:38:27 -07:00
SkyZeroZx 17a226d25d docs(docs-infra): use signals & improve types
Use signals to avoid markForCheck.

Simplify takeUntilDestroyed usage by relying on implicit DestroyRef.

Improve type safety by typing inject(ElementRef).

(cherry picked from commit a0b998e293)
2026-05-07 17:17:34 -07:00
Kristiyan Kostadinov 45a82b2751 fix(docs-infra): switch remaining adev services to @Service
Reworks all the remaining injectables in adev to use `@Service`.

(cherry picked from commit 1f238ab567)
2026-05-07 15:23:30 -07:00
Kam 441a00d665 fix(docs-infra): keep mobile nav drawers usable on small screens
On phones, opening the primary-nav drawer left the page behind it scrollable, and the secondary drawer's mask had no explicit height so long submenus got clipped above the page content. Lock the page with overflow: clip on :host:has(.adev-nav-primary--open) for phone-only (preserves the primary nav's sticky context), give the secondary mask height: 100dvh on tablet-landscape-down so it fills the visible viewport, and align the nav-list :host height to 100dvh too so its inner scroll matches.
2026-05-05 09:31:26 -07:00
Kam c2f7403774 fix(docs-infra): exempt form validator names from API auto-linking
Add required, pattern, min, max, minLength and maxLength to LINK_EXEMPT
so FieldState property names stop auto-linking to the validator
functions of the same name.
2026-05-01 15:58:43 -07:00
Angular Robot 9c7cbcd263 build: update all non-major dependencies
See associated pull request for more information.
2026-05-01 15:57:16 -07:00
SkyZeroZx d2c7b4e111 docs(docs-infra): Validate case-sensitive API symbol links in @link
Adds build-time validation for case-sensitive API symbols in `@link`. Avoid broken links
2026-04-27 17:01:40 -07:00
Kam 29081f7765 docs(docs-infra): improve Playground card on installation page
Updates the Playground card copy and adds a `titleInline` attribute on
<docs-card> so the icon and title sit on the same row. Existing cards
are unaffected.
2026-04-24 10:34:38 -07:00
Matthieu Riegler 74143523d5 docs(docs-infra): Use @Service instead of @Injectable
Dogfooding is always a good idea.
2026-04-23 11:21:40 -07:00
Angular Robot 5eee59406b build: update dependency diff to v9
See associated pull request for more information.
2026-04-15 10:20:07 -04:00
Kam c8e23d3a9d fix(docs-infra): prevent inline code wrapping in CLI reference table
Inline code elements inside table cells inherited `width: 100%` from
the global code styles, causing short codes like `s`, `dev` to stack
vertically instead of rendering on the same line. Add `min-width` to
table cells containing code to ensure proper inline layout.
2026-04-14 18:29:10 +03:00
Kam c3d4be4a61 docs(docs-infra): fix card container overflow on mobile viewports
Override h2 min-width in docs-card-container-header for small screens
and add docs-content container query fallback to hide SVG illustrations.
2026-04-13 11:09:46 +03:00
Angular Robot c7518a4ed6 build: update cross-repo angular dependencies
See associated pull request for more information.

Closes #67980 as a pr takeover
2026-04-08 11:04:49 -07:00
Angular Robot b16a8a32d8 build: update dependency marked to v18
See associated pull request for more information.
2026-04-08 09:40:25 -07:00
Kam 8132a96884 docs(docs-infra): preserve navigation origin when clicking cross-category links
When a sidebar item links to a page in a different category (e.g., Route
transition animations under Animations links to a Routing page), clicking
back navigates to the main menu instead of the originating category.

Store the originating category in NavigationState when clicking a
cross-referenced item, so the back button returns to the correct section.
2026-04-07 09:46:18 -07:00
funsaized d95e856a25 fix(docs-infra): align search result icon with text on mobile
On narrow viewports, the search result icon was pushed to its own flex line when the title text was too long, causing vertical misalignment.

The fix wraps the title text and package badge in a single container that manages its own flex layout, preventing the icon from being separated from the text on narrow viewports.

Fixes #68005
2026-04-06 10:57:09 -07:00
SkyZeroZx ab9910c17c docs(docs-infra): Adds anchor links to class member headers for linking
Adds anchor links to class member headers for direct linking.
Add test to ensure anchors render correctly.

Fixes #67970
2026-04-02 08:40:46 -07:00
SkyZeroZx ff2ba7c864 docs(docs-infra): replace wait with debounce for search
Replaces custom search debounce with `debounced`
2026-03-27 13:57:15 +01:00
Matthieu Riegler 1938054f34 docs(docs-infra): remove explicit OnPush 2026-03-25 12:58:39 -07:00
SkyZeroZx 6d2eed61a1 docs(docs-infra): fix aria-label parsing breaking headings
Strip all HTML tags and escape quotes in aria-label to avoid breakage
2026-03-23 10:33:15 -07:00
SkyZeroZx ad3991cd0b docs(docs-infra): replace non-interactive buttons with spans
These elements are not interactive, so using <button> is misleading for accessibility
(screen readers and keyboard navigation expect an action).
2026-03-23 10:24:08 -07:00