Commit graph

119 commits

Author SHA1 Message Date
Matthieu Riegler
22d190c0b9 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:50 -08:00
Shuaib Hasan Akib
16191e7f53 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:04 +01:00
Shuaib Hasan Akib
766559e08c 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:28 +01:00
Shuaib Hasan Akib
14b5590f80 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:40 +01:00
Matthieu Riegler
b3f2ff1e07 docs(docs-infra): enable strict templates
(cherry picked from commit 57af0d7e1b)
2025-10-24 15:23:30 +02:00
Matthieu Riegler
00842026c4 docs(docs-infra): fix example viewer (#64580)
It was a regression introduced by #63915

PR Close #64580
2025-10-22 14:35:04 +00:00
SkyZeroZx
8244f187de 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:27 +00:00
SkyZeroZx
b11617dbab 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:36 +00:00
Matthieu Riegler
b3643e5e83 docs(docs-infra): fix mobile banner layout (#64408)
PR Close #64408
2025-10-15 10:41:05 -07:00
Shuaib Hasan Akib
e2820d1a2d 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:46 +00:00
Shuaib Hasan Akib
3598855d73 docs(docs-infra): clean up code and use inferred types where possible (#64139)
PR Close #64139
2025-09-29 16:48:13 -04:00
Matthieu Riegler
923c81c4a8 docs: remove api grouping toggle (#63961)
PR Close #63961
2025-09-19 22:13:22 +00:00
Shuaib Hasan Akib
e987d94276 docs(docs-infra): removed unused common module (#63915)
PR Close #63915
2025-09-19 14:44:45 +00:00
Matthieu Riegler
fe50e3647d docs: Introduce API category sorting (#63914)
PR Close #63914
2025-09-19 14:44:11 +00:00
hawkgs
5cc6c42acc 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:32 +00:00
hawkgs
97969b1c54 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:32 +00:00
Oleg Ivanitski
13e4255f9e fix(docs-infra): fix guide content width (#63798)
This commit fixes the width of the content section, specifically the
reactive forms and template-driven forms section

Closes #63798

PR Close #63798
2025-09-15 15:25:41 +00:00
Shuaib Hasan Akib
6178d36a7d docs(docs-infra): add missing type="button" for accessibility and to remove dev tools warning (#63784)
PR Close #63784
2025-09-15 15:25:09 +00:00
Cheng-Hsuan Tsai
f697995c26 docs(docs-infra): allow collapse code example (#63559)
PR Close #63559
2025-09-04 15:25:24 -07:00
Shuaib Hasan Akib
15fa2ce1c4 docs(docs-infra): apply migration script changes (#63514)
PR Close #63514
2025-09-02 09:32:01 -07:00
Shuaib Hasan Akib
e9096b9aab docs(docs-infra): properties should be readonly (#63492)
PR Close #63492
2025-08-29 14:06:34 -07:00
Shuaib Hasan Akib
a6a46e9839 docs(docs-infra): tooltip on hover and message after copied (#63167)
PR Close #63167
2025-08-27 16:56:45 -07:00
Shuaib Hasan Akib
40844876ea docs(docs-infra): mark properties as readonly if they shouldn't change (#63200)
PR Close #63200
2025-08-27 16:16:25 -07:00
Joey Perrott
705b94bd21 refactor: remove TODOs which have been corrected (#63421)
Remove TODOs which were addressed but the comment was not removed

PR Close #63421
2025-08-27 11:23:57 -07:00
Joey Perrott
10b0927e15 refactor: various build and import specificer fixes for strict deps (#63324)
Change direct deps in bazel targets and import specifiers within files to maintain strict deps requirements ahead of enabling strict deps tests in the repo

PR Close #63324
2025-08-22 14:45:34 -07:00
Matthieu Riegler
0da66e6d43 docs(docs-infra): lift circular imports (#63186)
This commit also adds adev on the cyclic import check.

PR Close #63186
2025-08-19 07:58:47 +00:00
Shuaib Hasan Akib
d8ac27f94a docs(docs-infra): replace Input by signal one (#63169)
PR Close #63169
2025-08-15 13:42:41 +02:00
Cheng-Hsuan Tsai
81751465b4 docs(docs-infra): add dark mode to example preview (#63171)
PR Close #63171
2025-08-15 13:41:09 +02:00
Jeremy Elbourn
4635095c01 fix(docs-infra): put content in <main> element (#63121)
This fix updates the adev `DocViewer` component to support rendering with the `main[docsViewer` selector so that the primary content for the page is inside of a `<main>` element (without introducing an extra DOM element).

PR Close #63121
2025-08-12 11:05:16 -07:00
Matthieu Riegler
9da26addfa docs: disable stackblitz examples (#62972)
This isn't supported ATM.

PR Close #62972
2025-08-04 11:39:38 +02:00
Joey Perrott
cbc258eec8 build: remove ts_project_interop infrastructure (#62908)
Remove the interop macros and final usages

PR Close #62908
2025-07-31 09:12:58 +00:00
Joey Perrott
e8c5603126 build: move all rule/macro loading into adev/defaults.bzl and fix intellisense loading (#62627)
Move all of our loading into a local defaults.bzl file instead of mixed loading via tools/defaults and adev/defaults

PR Close #62627
2025-07-14 15:47:05 -07:00
Matthieu Riegler
2d048d5520 test(docs-infra): Use the zoneless testing rule (#62596)
This will spare use the warning logs when the tests run.

```
      NG0914: The application is using zoneless change detection, but is still loading Zone.js. Consider removing Zone.js to get the full benefits of zoneless. In applications using the Angular CLI, Zone.js is typically included in the "polyfills" section of the angular.json file.
```

PR Close #62596
2025-07-14 11:36:43 -07:00
Matthieu Riegler
57e06c5232 docs(docs-infra): Add status to some guide entries. (#62614)
Guide entries can now have "new" or "updated" tags.

PR Close #62614
2025-07-14 09:58:14 -07:00
Joey Perrott
50a69dee6c build: only require workspace build packages for web tests when provided (#62443)
Only use the builds from the workspace as for the bootstrap scripts for web testing

PR Close #62443
2025-07-03 08:34:25 +00:00
Shuaib Hasan Akib
99069c2252 refactor(docs-infra): removed unused imports (#62441)
Cleans up instances of unused imports in a few shared docs components.

PR Close #62441
2025-07-03 08:11:45 +00: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
Joey Perrott
73434e366f build: migrate all dependencies for adev into adev/package.json (#62435)
Migrate the dependencies into the adev/package.json instead of importing from the the root package.json

PR Close #62435
2025-07-03 08:09:34 +00:00
Shuaib Hasan Akib
cd87a71e19 docs(docs-infra): replace deprecated RouterTestingModule with RouterModule.forRoot([]) (#62364)
PR Close #62364
2025-07-02 16:52:31 +00:00
Joey Perrott
4fae4dbba8 build: migrate adev to use packaged version of @angular/* packages (#62413)
Use the packaged versions of the packages instead of the local ts_project dependencies to prevent multiple versions of the deps to enter test bundles

PR Close #62413
2025-07-02 16:10:25 +00:00
Joey Perrott
ad89f80969 build: migrate adev to use new sass ruleset (#62297)
Use the new sass ruleset for bazel sass building in adev

PR Close #62297
2025-06-27 09:25:43 +00:00
Joey Perrott
b84859073b build: migrate to use web test runner rules (#62292)
Migrate karma tests throughout the repo to use the new web test runner based rule instead

PR Close #62292
2025-06-26 17:19:10 +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
hawkgs
0b1d0459a4 docs(docs-infra): retain the results in the search dialog while typing (#61935)
Due to `resource()` not retaining its value while there is a request in progress, the results list flickers. The new `searchResults` signal retains that previous value until the request is completed.

PR Close #61935
2025-06-11 13:34:45 +02:00
Andrew Kushnir
0bd7c7d469 Revert "docs(docs-infra): retain the results in the search dialog while typing (#61935)" (#61995)
This reverts commit dbdfc2a99a.

PR Close #61995
2025-06-10 18:25:53 -07:00
hawkgs
dbdfc2a99a docs(docs-infra): retain the results in the search dialog while typing (#61935)
Due to `resource()` not retaining its value while there is a request in progress, the results list flickers. The new `searchResults` signal retains that previous value until the request is completed.

PR Close #61935
2025-06-10 17:24:23 -07:00
hawkgs
e678050794 docs(docs-infra): implement search history (#61866)
Add history of searches to the search dialog of A.dev.

PR Close #61866
2025-06-06 12:36:23 -07:00
Matthieu Riegler
e555c7f0dd docs(docs-infra): use modern apis (#61706)
PR Close #61706
2025-06-03 10:28:20 -04:00
Matthieu Riegler
663975b4e7 docs: update learn-angular tutorial to use input/output (#61607)
This replaces the example that were using the decorators.

PR Close #61607
2025-05-29 17:50:30 -04:00
Hakeem
5735ea7115 docs(docs-infra): fix nav items active status is shown for multiple items (#61597)
PR Close #61597
2025-05-21 16:04:23 -07:00