Commit graph

382 commits

Author SHA1 Message Date
Joey Perrott
046501fd33 refactor(docs-infra): make docs-alert an inline token
Migrate docs-alert to be inline instead of block, this ensures that the content is placed within a <p> tag as expected. This is important
for ensuring that the iconography is placed correctly within the wrapper div generated for the alert. Additionally, we refactor the matcher
code to be more efficient, running with fewer loops.
2025-11-24 13:25:59 -05:00
Shuaib Hasan Akib
b26fe73a91 docs(docs-infra): keep 'Show code' button aligned right and prevent metadata wrapping
Ensures the example viewer header displays correctly by keeping the "Show code"
button aligned to the right and preventing metadata text from wrapping.
Improves layout consistency across documentation examples.
2025-11-24 12:23:36 -05:00
Matthieu Riegler
119c6ddaeb docs(docs-infra): simplify tab selection
Tab selection relied on the tabs being visible whe nthe example is loaded. That didn't work when `hideCode` was used.

fixes #65550
2025-11-24 10:24:39 -05:00
Kristiyan Kostadinov
26e2092dd1 test: remove unnecessary test calls
Removes calls to `TestBed.configureTestingModule` since they aren't necessary.
2025-11-24 10:18:18 -05:00
SkyZeroZx
46269be842 feat(docs-infra): add docs-image extension for enhanced image handling in markdown
Extends the Markdown parser to support `loading`, `decoding`, and `fetchpriority` attributes for images via curly brace syntax.
2025-11-21 13:24:59 -05:00
Joey Perrott
f61e61ac4f refactor(docs-infra): remove the multiple code example view modes
Rather than using multiple view modes for code examples, we can just treat the previous snippet mode as
as multifile mode that just only has one file in it.
2025-11-21 13:22:00 -05:00
Joey Perrott
88753d6a5a refactor(docs-infra): improve code efficiency for adding line numbers
Only run the code for adding line numbers if line numbers are required, otherwise skip the code block
2025-11-21 13:20:46 -05:00
Joey Perrott
a873c4eb1a refactor(docs-infra): remove the unnecessary whitespace using shiki
Use a transformer within shiki to remove the unnecessary whitespace between code lines
2025-11-21 13:20:46 -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
Joey Perrott
fee79e37d5 refactor(docs-infra): use shiki for highlighting
Use shiki to perform highlighting instead of a postprocessing action
2025-11-21 13:20:46 -05:00
Joey Perrott
a8f46e598a fix(docs-infra): link to the snippet location at the proper commit for examples
Within examples, we now link to the github URL using the commit that was made to create adev, rather than
always on main, which may change over time.
2025-11-21 13:19:53 -05:00
Jessica Janiuk
d42d7523ec build: bump adev version
Bump adev versions for v21 release
2025-11-19 12:09:26 -08:00
Matthieu Riegler
c7424c8f07 docs: fix docs heading alignment 2025-11-18 17:00:24 -08:00
Andrew Seguin
d4595791d6 docs: hide temporary prerender tabs and multifile docs sections 2025-11-18 14:54:48 -08:00
Amy Sorto
111a7644ef docs: update overview page 2025-11-18 14:54:08 -08:00
Cheng-Hsuan Tsai
d104acb286 docs(docs-infra): fix broken code tabs
When `<mat-tab-group>` is conditionally removed by `@if` it loses the
`<mat-tab>` projected content somehow.
2025-11-17 11:45:19 -08:00
Joey Perrott
7e70682f2b docs: update examples to latest Angular
Updates the adev examples to use Angular 21.0.0-rc.2
2025-11-17 11:17:58 -08:00
Cheng-Hsuan Tsai
4dc226231c docs(docs-infra): aria attribute typo 2025-11-17 09:29:26 -08:00
Cheng-Hsuan Tsai
138e65356b docs(docs-infra): set max-height to code example 2025-11-17 09:28:14 -08:00
Shuaib Hasan Akib
ee5947db38 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.
2025-11-17 08:32:00 -08:00
Shuaib Hasan Akib
f462684211 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.
2025-11-17 08:31:26 -08:00
Cheng-Hsuan Tsai
48cff8c128 docs(docs-infra): make show code button more discoverable when collapsed 2025-11-17 08:07:01 -08:00
Kristiyan Kostadinov
1ba50caefc 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.
2025-11-17 08:05:12 -08:00
Cheng-Hsuan Tsai
de234def0e docs(docs-infra): enable tabs layout 2025-11-14 12:24:01 -08:00
Angular Robot
5552707a97 build: update all non-major dependencies
See associated pull request for more information.
2025-11-14 08:54:51 -08:00
cexbrayat
c137f1fe91 docs: ExperimentalIsolatedShadowDom mentions 2025-11-14 08:41:13 -08:00
Cheng-Hsuan Tsai
6d8c3fc888 docs(docs-infra): hide file tabs when code example is hidden 2025-11-13 15:58:09 -08:00
Matthieu Riegler
f737a9dd5c 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
2025-11-13 09:36:13 -08:00
hawkgs
7ab1b3a32a docs(docs-infra): improve playground layout
Improve the layout and optimize the empty space; Introduce some minor improvements to the code editor
2025-11-13 09:07:53 -08:00
SkyZeroZx
b6a91d4c39 docs: Fixed mermaid diagram node label contrast in dark mode 2025-11-12 15:01:35 -08:00
Matthieu Riegler
16e61f5dd0 docs(docs-infra): Add support for experimental enum entries 2025-11-11 08:46:06 -08:00
Angular Robot
47f6f71fc4 build: update dependency marked to v17
See associated pull request for more information.
2025-11-10 07:54:08 -08:00
Alan Agius
26fed34e0e
build: format md files
This commit configures prettier to format markdown files.
2025-11-06 10:03:05 -08:00
Angular Robot
2b71181288 build: update all non-major dependencies
See associated pull request for more information.
2025-11-05 15:13:37 -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
Matthieu Riegler
7f44345db3 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
2025-11-05 17:49:43 +00:00
marktechson
7a422c209a 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.
2025-11-03 23:59:20 +00:00
Miles Malerba
662f0e5c00
feat(docs-infra): add support for namespaces
Adds support for generating docs for namespaces (and merged declarations
of namespace + type)
2025-10-29 20:22:21 +00:00
SkyZeroZx
f3d056a065 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
2025-10-29 18:48:30 +01:00
Shuaib Hasan Akib
5d8b76b4fa 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
2025-10-29 18:48:00 +01:00
Shuaib Hasan Akib
33a872d90a 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.
2025-10-28 15:58:25 +01:00
Shuaib Hasan Akib
27e183330e 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.
2025-10-27 09:29:37 +01:00
Matthieu Riegler
6e7b3c2aa6 docs(docs-infra): Support linking to individual playground templates 2025-10-24 18:47:09 +02:00
Matthieu Riegler
57af0d7e1b docs(docs-infra): enable strict templates 2025-10-24 15:23:26 +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