Commit graph

394 commits

Author SHA1 Message Date
Shuaib Hasan Akib
7f8ffa3304 fix(docs-infra): prevent readonly TypeScript keyword from being linked
This updates the docs infrastructure to avoid incorrectly linking the `readonly` keyword in TypeScript examples.

Fixes #65632
2025-12-03 16:30:51 +01:00
Joey Perrott
34bedae101 docs: rename visibleRegion to region
Use the attribute region instead of visibleRegion
2025-12-03 10:06:01 +01:00
Joey Perrott
9b3b5fb4cf refactor(docs-infra): extract only the visibleRegion
Previously we extracted the regions and only made the visible region visible on the page, but since there is not a need for the
non-visible code to be presented, we don't need to include it in the generated code snippets.
2025-12-03 10:06:01 +01:00
Matthieu Riegler
a784995a98 docs(docs-infra): Show examples on function overloads 2025-12-02 12:13:11 +01:00
Joey Perrott
a16a70ca74 refactor(docs-infra): move header id tracking into RendererContext
Move the header id tracking into the renderer context rather than a global state.  Since the RendererContext is
initialized for each execution of the marked parser, we can store the context of which header ids have been seen within
a single page there which allows us to run these parse interactions in parallel.
2025-12-02 12:03:34 +01:00
Joey Perrott
8b296543ae refactor(docs-infra): transform all headings using the built in transformer
Rather than manually calling the transformer we use for headings from within a render function, we now properly call into the Renderer to do them
via the tokens they are require instead.  This is being done to allow us to have a per Renderer instance of state instead of a global state, which will
allow us to run marked async and hopefully speed up the pipeline
2025-12-02 12:03:34 +01:00
SkyZeroZx
4e89bc6244 feat(docs-infra): Adds copy link to anchor functionality
Enables copying a direct link to any section by clicking its anchor. Also updates the aria-label to remove the code tag
2025-12-01 19:19:31 +01:00
SkyZeroZx
2d854e01bc docs(docs-infra): Improves symbol linking for Angular Aria selectors
Improves the symbol linking logic to handle Angular component selectors (e.g., ngCombobox). It attempts to convert Angular selector patterns to their corresponding class names, improving navigation to Angular API documentation.
2025-12-01 18:47:19 +01:00
Shuaib Hasan Akib
313454bf17 fix(docs-infra): truncate long TOC items and add title tooltips
Long TOC entries now truncate with …, and a title attribute is added to display the full label on hover.

Fixes: #65727
2025-12-01 18:43:46 +01:00
Angular Robot
42e73ff9ce build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-26 15:50:56 -05:00
Matthieu Riegler
1c3868198e docs(docs-infra): fix visible lines/regions
fixes #65552
2025-11-26 13:43:37 -05: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
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