51 Commits

Author SHA1 Message Date
Kam b9cbc5fbbe fix(docs-infra): match card grid row gap to column gap
The `:not(.docs-card-container) .docs-card` selector was meant to give
standalone cards a vertical margin, but no element has the
docs-card-container class, so it matched every card. Cards in a grid
without a header picked up the 1rem margin on top of the 1.25rem grid
gap, leaving rows 52px apart while columns are 20px apart (for example on
/reference/migrations, /guide/i18n and /roadmap).

Apply the margin only to cards that are not direct children of a card
grid.
2026-09-11 10:41:51 -07:00
Kam efe1aae1cd 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`.
2026-08-03 09:20:15 -07: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
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 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
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
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
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 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
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
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
Bhuvansh855 fdf0bf9a62 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.
2026-05-27 10:52:14 -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
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
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
Matthieu Riegler cc07d46e49 docs(docs-infra): fix deprecation style for light theme 2026-03-19 15:00:27 -07:00
Alan Agius efcf76ea61 feat(docs-infra): add hideDollar option to hide the dollar sign prefix in shell code blocks.
The dollar sign is not always required.
2026-02-23 09:08:51 -08:00
SkyZeroZx 1771d54fb7 docs(docs-infra): fixed missing gray color palette definitions for light and dark modes
Adds the missing gray color palette definitions for both light and dark modes
2026-02-19 08:54:57 -08:00
SkyZeroZx 0b9d1cfb7b docs(docs-infra): simplify external link rendering for pill
Renders the external link icon for docs pills using CSS instead of a `docs-icon` component.
2026-02-09 12:19:07 -08:00
Matthieu Riegler 3411638f65 docs(docs-infra): prefer/avoid code block styling
fixes #65866
2025-12-09 09:23:12 -08:00
Shuaib Hasan Akib 4b9fffaa79 docs(docs-infra): hide trailing empty line in code examples
Add CSS rule to hide the last empty line in code blocks to prevent displaying
unnecessary empty lines when source files end with a newline character.
The empty line remains in the DOM for proper copy-paste functionality.
2025-12-09 09:17:41 -08:00
SkyZeroZx ef034c15c1 docs(docs-infra): renders inline code snippets in docs pills
Improves the rendering of `DocsPillRow` to correctly display inline code snippets (using backticks) within the pill labels.
2025-11-25 18:30:05 -05:00
Joey Perrott 8ec0a4ee5c refactor(docs-infra): drop support for providing a file diff in docs-code
Drop support for exposing a diff view in the docs-code element as it is unused and costly to even check for
2025-11-21 13:20:46 -05:00
Amy Sorto 111a7644ef docs: update overview page 2025-11-18 14:54:08 -08:00
SkyZeroZx b6a91d4c39 docs: Fixed mermaid diagram node label contrast in dark mode 2025-11-12 15:01:35 -08:00
Miles Malerba 59635bba34 docs: improve docs generation for namespaces (#64747)
Improves docs epxerience for interfaces / type aliases that are merged
with a namespace.

PR Close #64747
2025-11-05 22:42:59 +00:00
hawkgs 0b2018d153 docs(docs-infra): align docs-step number to the heading (#64035)
Fix misaligned number element.

PR Close #64035
2025-09-24 18:31:42 +00:00
Cheng-Hsuan Tsai 60267282c7 docs(docs-infra): fix docs-card padding (#64004)
PR Close #64004
2025-09-23 14:18:31 +00:00
Matthieu Riegler 331e35c283 docs(docs-infra): fix colors (#63842)
fixes #63841

PR Close #63842
2025-09-16 17:36:18 +00:00
Matthieu Riegler d53ac26d4e docs(docs-infra): new home page (#63662)
ADEV is getting a new home page!
This is a first iteration.

PR Close #63662
2025-09-16 16:21:32 +00:00
Matthieu Riegler 7d6ae95807 docs(docs-infra): fix mermaid rendering (#63311)
A recent update of mermaid change the html output. `rect` became `path`.

fixes #63308

PR Close #63311
2025-08-21 10:06:32 -07:00
Cheng-Hsuan Tsai b9a134b8eb docs(docs-infra): fix codeblock styles (#63153)
PR Close #63153
2025-08-14 22:04:39 +02:00
Cheng-Hsuan Tsai 621d077746 docs(docs-infra): fix inconsistent codeblock styles (#63041)
PR Close #63041
2025-08-07 09:09:21 -07:00
Shuaib Hasan Akib 9fc1383115 refactor(docs-infra): cleanup lines in scss (#62438)
Cleans up some of the scss code.

PR Close #62438
2025-07-03 08:11:09 +00:00
Saujan Ghimire d4b96f8c20 docs: embeded best practices in page (#62173) (#62198)
PR Close #62198
2025-06-24 08:52:24 +00:00
Matthieu Riegler 44782beea7 docs(docs-infra): fix & simplify scrolling for code blocks (#62179)
PR Close #62179
2025-06-23 14:19:34 +02:00
Andrew Kushnir 4c14503efb Revert "docs: embeded best practices in page (#62173)" (#62193)
This reverts commit 286f9f573e.

PR Close #62193
2025-06-22 09:14:11 -07:00
Matthieu Riegler 286f9f573e docs: embeded best practices in page (#62173)
PR Close #62173
2025-06-20 15:29:24 -07:00
Hakeem 08eded75ff docs(docs-infra): fix callouts icon collision with the content (#61664)
PR Close #61664
2025-06-05 10:00:30 +02:00
ahmadhakeem18 20fdeab612 docs(docs-infra): fix the global layout of the site (#58831)
take the full width of the page for all the pages that use docs-viewer, also reserve an area for table of contents on-demand

Resolves: #52648

PR Close #58831
2025-05-09 10:24:13 -07:00
Matthieu Riegler 201e02b161 docs(docs-infra): fix alert header inlining (#60708)
PR Close #60708
2025-04-30 08:18:07 -07:00
Hryhorii Avcharov 4078895caf docs: fix mermaid event node text visibility in light mode (#60124)
PR Close #60124
2025-02-27 00:27:12 +00:00
hawkgs 6cd6780d38 docs(docs-infra): fix SCSS build-time warnings (#59115)
Fix SCSS "declarations after nested rules" and `@import` warnings.

PR Close #59115
2025-01-14 11:09:23 -05:00
Meehdi ad65da6139 docs: fix mermaid polygon node text visibility in dark mode (#59285)
Fix visibility issue with text inside polygon nodes in mermaid diagrams when using dark mode theme to ensure proper contrast and readability

PR Close #59285
2025-01-06 16:12:51 +00:00
hawkgs 225b5fa23a docs(docs-infra): make font styles consistent in the API code ToC (#59072)
Since code lines are wrapped in `<button>`-s, the native font styles overrides the parent's one which results in the font-family and font-size (esp. Safari) difference. This change fixes that.

PR Close #59072
2024-12-12 16:19:45 -08:00
Kristiyan Kostadinov 5b5418c893 refactor(docs-infra): fix build-time warnings (#59100)
Fixes a bunch of warnings around an upcoming Sass breaking change https://sass-lang.com/documentation/breaking-changes/mixed-decls/. Also fixes one unused standalone import.

PR Close #59100
2024-12-10 13:40:11 -08:00
hawkgs 8d6ea5bae3 docs: fix missing alert block styles in the API reference (#59020)
Substitute legacy alert classes with the new ones.

PR Close #59020
2024-12-04 11:02:42 +01:00
ahmadhakeem18 61b39ddaa6 docs(docs-infra): Fix overflow styles in cards code examples (#58704)
PR Close #58704
2024-11-18 13:35:15 -08:00
wlotherington d3f8153917 docs(docs-infra): change mermaid diagram colors (#58223)
Change diagram colors to:

- Better match the overall site theme.
- Improve dark theme.
- Make the diagram easier to understand. "Unchecked" nodes have no color and "Checked" nodes match the color of the "Event" node that triggered the change detection.

Fixes #56314

PR Close #58223
2024-10-16 16:46:16 +00:00