Commit graph

360 commits

Author SHA1 Message Date
Shuaib Hasan Akib
70736309f5 docs: improve accessibility with descriptive link and main landmark
- Replaced <a><button></button></a> with a proper <a> containing text and
  aria-label to ensure links have discernible text.

- Added main tag in home page to provide
  a consistent main landmark, improving accessibility for screen readers
  and satisfying WCAG and Lighthouse requirements.

Fixes #65181.

(cherry picked from commit ee5947db38)
2025-11-17 16:32:05 +00:00
Shuaib Hasan Akib
c03b1fa8a0 fix(docs-infra): add bash language support for shell prompt rendering
Code blocks with `bash` language identifier were not rendering the `$`
prefix, while `shell` blocks did.

This ensures consistent command-line prompt rendering across both
`bash` and `shell` code blocks in the documentation.

(cherry picked from commit f462684211)
2025-11-17 16:31:31 +00:00
Cheng-Hsuan Tsai
7020ef6c60 docs(docs-infra): make show code button more discoverable when collapsed
(cherry picked from commit 48cff8c128)
2025-11-17 16:07:06 +00:00
Kristiyan Kostadinov
7ec9f357f4 fix(docs-infra): prevent example resets from affecting CDK
The example viewer has some `::ng-deep` styles that are used to reset global styles that leak into the live examples. It works by applying a style like `.docs-example-viewer-preview * {all: revert;}`.

The problem with this is that depending on when the first example is rendered, the styles will be lower or higher in the cascade, thus making the reset unreliable. Furthermore, it can affect structural styles from the CDK which intentionally have low specificity.

These changes move the resets into the global stylesheet to make them more predictable.

(cherry picked from commit 1ba50caefc)
2025-11-17 16:05:15 +00:00
Cheng-Hsuan Tsai
3228cce727 docs(docs-infra): enable tabs layout
(cherry picked from commit de234def0e)
2025-11-14 20:24:05 +00:00
cexbrayat
f550f4ab4a docs: ExperimentalIsolatedShadowDom mentions
(cherry picked from commit c137f1fe91)
2025-11-14 16:41:16 +00:00
Cheng-Hsuan Tsai
afeba79ac8 docs(docs-infra): hide file tabs when code example is hidden
(cherry picked from commit 6d8c3fc888)
2025-11-13 23:58:14 +00:00
Matthieu Riegler
4f6f9b8e8d docs(docs-infra): Add support for metadata on fenced code blocks
This will help us replace `docs-code` with inline code usages and prevent future indentation issues

(cherry picked from commit f737a9dd5c)
2025-11-13 17:36:17 +00:00
hawkgs
c133f48902 docs(docs-infra): improve playground layout
Improve the layout and optimize the empty space; Introduce some minor improvements to the code editor

(cherry picked from commit 7ab1b3a32a)
2025-11-13 17:07:58 +00:00
SkyZeroZx
31ca56aa20 docs: Fixed mermaid diagram node label contrast in dark mode
(cherry picked from commit b6a91d4c39)
2025-11-12 23:01:40 +00:00
Matthieu Riegler
5e86299ec4 docs(docs-infra): Add support for experimental enum entries
(cherry picked from commit 16e61f5dd0)
2025-11-11 08:46:09 -08:00
Alan Agius
3bed9f0f16
build: format md files
This commit configures prettier to format markdown files.
2025-11-06 10:07:13 -08:00
Miles Malerba
4bdd317596 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
Matthieu Riegler
01c5ba50d2 docs(docs-infra): fix heading layout on mobile
Long code blocks overflow the headings on narrow screen (like mobiles), this messes up the global layout of the page. With the ellipsis with fix that.

fixes #64845

(cherry picked from commit 7f44345db3)
2025-11-05 09:49:53 -08:00
marktechson
fcd5f9f0ef docs: add v21 landing page
Adds a new landing page for developer events, starting with the v21 page. It also includes an ICS file link for calendar invites. Also updated the tests for the docs-pill to support two new attributes so developers can add the event to their calendars.

(cherry picked from commit 7a422c209a)
2025-11-03 15:59:31 -08:00
Miles Malerba
981fabc9b6 feat(docs-infra): add support for namespaces
Adds support for generating docs for namespaces (and merged declarations
of namespace + type)

(cherry picked from commit 662f0e5c00)
2025-10-29 13:22:26 -07:00
SkyZeroZx
207a26c125 docs(docs-infra): Prevent empty extends clause in interface documentation
Interfaces with no extends clause were incorrectly rendered with a trailing extends keyword followed by nothing, resulting in invalid TypeScript syntax

(cherry picked from commit f3d056a065)
2025-10-29 18:48:35 +01:00
Shuaib Hasan Akib
ed500e42e6 fix(docs-infra): extract header attribute as title in multifile code snippets
The DocViewer component's getCodeSnippetsFromMultifileWrapper method was not
extracting the header attribute from nested <docs-code> elements, causing the
ExampleViewer to fall back to displaying file paths instead of custom headers
in tab labels.

This change adds title extraction from the header attribute when processing
multifile code snippets, ensuring that custom headers are properly displayed
in the code viewer tabs.

Fixes #64760

(cherry picked from commit 5d8b76b4fa)
2025-10-29 18:48:05 +01:00
Shuaib Hasan Akib
c0a50bf18f fix(docs-infra): update guide navigation to remain active with query params
The navigation list component was using `routerLinkActive` with
`{ exact: true }`, which required an exact URL match including query
parameters. When visiting `/update-guide?v=19.0-20.0&l=1`, the link
`/update-guide` didn't match, so the active class wasn't applied.

Updated `routerLinkActiveOptions` to ignore query parameters while
maintaining exact path matching so the navigation item stays highlighted
when interacting with the update guide form.

(cherry picked from commit 33a872d90a)
2025-10-28 15:58:29 +01:00
Shuaib Hasan Akib
e62da0d1c7 fix(docs-infra): preserve shell class for multifile code blocks
The ExampleViewer component was extracting only innerHTML from code
blocks in multifile examples, which lost the shell class applied by
the formatCode function. This caused the $ prompt to not appear for
shell commands in multifile blocks even when language="shell" was set.

Modified the Snippet interface to track shell language state and
updated getCodeSnippetsFromMultifileWrapper and getStandaloneCodeSnippet
methods to preserve the shell class. Updated example-viewer template
to conditionally apply the shell class to the code wrapper element.

Fixes inconsistency between standalone and multifile shell code blocks.

(cherry picked from commit 27e183330e)
2025-10-27 09:29:42 +01:00
Matthieu Riegler
d8388b210a docs(docs-infra): Support linking to individual playground templates
(cherry picked from commit 6e7b3c2aa6)
2025-10-24 18:47:14 +02:00
Matthieu Riegler
c89062b130 docs(docs-infra): enable strict templates
(cherry picked from commit 57af0d7e1b)
2025-10-24 15:23:32 +02:00
Matthieu Riegler
9126d0d616 docs(docs-infra): fix example viewer (#64580)
It was a regression introduced by #63915

PR Close #64580
2025-10-22 14:35:03 +00:00
SkyZeroZx
22270492f5 docs(docs-infra): Add OnPush change detection for components (#64570)
Improves Angular's OnPush change detection strategy for main and search history components

PR Close #64570
2025-10-22 14:34:26 +00:00
SkyZeroZx
5e55b87202 docs(docs-infra): Improves navigation list readability by balancing text wrapping (#64512)
Balances text wrapping for navigation items to enhance readability

PR Close #64512
2025-10-21 15:14:35 +00:00
Matthieu Riegler
54636eacca docs(docs-infra): Extract multiple extends statements for interfaces (#64539)
fixes #64528

PR Close #64539
2025-10-20 21:18:13 +00:00
SkyZeroZx
ecb2507c8b docs(docs-infra): Corrects repo name typo in entry parsing logic (#64487)
Ensures the repository reference uses the correct name to prevent confusion and maintain consistency across generated documentation entries.

PR Close #64487
2025-10-17 14:52:24 +00:00
Matthieu Riegler
ae4880f5fd docs(docs-infra): fix mobile banner layout (#64408)
PR Close #64408
2025-10-15 10:41:04 -07:00
Angular Robot
002481b27b build: update all non-major dependencies (#64399)
See associated pull request for more information.

PR Close #64399
2025-10-14 09:25:42 -07:00
Matthieu Riegler
3e3b6e8134 docs(docs-infra): Fix animation bug on iPhones (#64342)
PR Close #64342
2025-10-13 08:25:47 -07:00
Matthieu Riegler
59c152833e docs: add check for non-existing anchor (#64309)
This is only for the anchors on the same document for now.
Commit also includes some reformating.

fixes #64303

PR Close #64309
2025-10-10 06:43:51 -07:00
Shuaib Hasan Akib
489711d75c docs(docs-infra): add rel="noopener" to external links with target="_blank" in ExternalLink directive (#64276)
PR Close #64276
2025-10-09 05:29:30 -07:00
Angular Robot
cb6f8d4228 build: update all non-major dependencies (#64265)
See associated pull request for more information.

PR Close #64265
2025-10-09 05:23:34 -07:00
SkyZeroZx
6bc391c3d4 refactor(docs-infra): replace @Input with signal input for ignoredElementsIds in ClickOutside directive (#64302)
replace @Input with signal input for ignoredElementsIds in ClickOutside directive

PR Close #64302
2025-10-09 05:21:02 -07:00
Matthieu Riegler
69b3c05b9e docs: add mentions host style bindings (#64257)
Also adds a section about css custom properties

fixes #64256

PR Close #64257
2025-10-07 20:39:40 -04:00
Matthieu Riegler
1ffc643737 docs(docs-infra): fix @example in class members (#64249)
eg: ApplicationRef

PR Close #64249
2025-10-06 15:11:31 -04:00
Shuaib Hasan Akib
015d582801 docs(docs-infra): keep file name visible when code block is hidden (#64204)
Ensures that file names remain visible even if the associated code block
is collapsed or hidden, improving readability and context in the docs.

PR Close #64204
2025-10-02 17:30:45 +00:00
Matthieu Riegler
563bc386b2 docs(docs-infra): fix app-scroller offset. (#64144)
Guide heading need different scroll offsets depending on the width of the screen. (The menu position varies).

PR Close #64144
2025-09-30 11:05:26 -04:00
Shuaib Hasan Akib
9a913dcfa9 docs(docs-infra): clean up code and use inferred types where possible (#64139)
PR Close #64139
2025-09-29 16:48:11 -04:00
Alan Agius
fc643c9044 build: adopt moduleResolution: "bundler" (#64125)
This commit updates the TypeScript configuration across the project to use `moduleResolution: "bundler"`. This modernizes our module resolution strategy to align with current TypeScript best practices and bundler behaviors.

The following changes are included:
- Updated `tsconfig.json` files to set `moduleResolution` to `"bundler"`.
- Updated the `rules_angular` bazel dependency to a version compatible with these changes.
- Adjusted related test files and golden files to reflect the new module resolution strategy.

PR Close #64125
2025-09-29 14:20:23 -04: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
hawkgs
6f9f1ca6fe docs(docs-infra): don't discard favorites in search history when reselected (#63906)
Do not downgrade favorites to recent search results when you reselect them via the search results list.

PR Close #63906
2025-09-22 14:22:19 +00:00
Matthieu Riegler
6782f7148d docs: remove api grouping toggle (#63961)
PR Close #63961
2025-09-19 22:13:21 +00:00
Shuaib Hasan Akib
cc1032bd92 docs(docs-infra): removed unused common module (#63915)
PR Close #63915
2025-09-19 14:44:44 +00:00
Matthieu Riegler
5eb9f57ae8 docs: Introduce API category sorting (#63914)
PR Close #63914
2025-09-19 14:44:10 +00:00
hawkgs
b4960da4f1 docs(docs-infra): store search result fragment in search history (#63866)
Store the search result page fragment/sub-label in the search history and render it in the history items.

PR Close #63866
2025-09-17 14:56:31 +00:00
hawkgs
39cbb97dfc docs(docs-infra): always include fragment in search results (#63866)
Always include page fragment/sub-title in the search dialog results.

PR Close #63866
2025-09-17 14:56:31 +00:00
Matthieu Riegler
d9369d199f docs(docs-infra): Show package name for API references (#63831)
PR Close #63831
2025-09-16 17:36:50 +00:00
Matthieu Riegler
331e35c283 docs(docs-infra): fix colors (#63842)
fixes #63841

PR Close #63842
2025-09-16 17:36:18 +00:00