Commit graph

163 commits

Author SHA1 Message Date
Alan Agius
654e6da588 fix(docs-infra): update docs-alert and re-enable tests (#60827)
Before this commit, the docs-alert tests were failing. This also ensures that `NOTE:` is always capitalized.

PR Close #60827
2025-04-10 11:21:12 -04:00
Paul Gschwendtner
7fc14d7f26 build: fix adev first party linking and re-enable tests (#60825)
This commit attempts to finally fix the long-standing first-party
package linking issue with the rather tricky `rules_nodejs` toolchain.

I've verified that no version of e.g. `@angular/core` ends up in the
Bazel sandbox. This is achieved by also filtering transitive Angular
deps for first-party linked packages. e.g. `@angular/docs`.

In addition, `@angular/docs` accidentally ended up bundling parts of
Angular core because it relied on an entry-point that was not part of
the "well known externals". As part of the ongoing `ng_package`
update/rewrite, we should look into disabling bundling of ANY external
dependency/module. This is possible because we use relative imports
inside APF packages as of recently!

This commit should allow us to develop and continue new compiler
features, without having to temporarily (or longer) disable all
`angular.dev` unit tests!

Fixes #54858.

PR Close #60825
2025-04-10 14:19:52 +00:00
Matthieu Riegler
ba79f23e2e refactor(router): remove dependency on @types/dom-view-transitions (#60731)
The types have been shipped in TS 5.6

PR Close #60731
2025-04-08 09:01:41 -07:00
Andrew Scott
9228a73363 feat(docs-infra): Add Navigation API adapter to adev (#60722)
This adapter adds an integration with the Navigation API, allowing
SPA Router navigations to be displayed more fully in the browser UI.
With this, site visitors will be able to see that a page is loading via
the loading spinner in the tab. They will also have access to cancel the
navigation with the browser UI via the "stop" button or by pressing the
escape key (only relevant for slower connections).

* https://github.com/WICG/navigation-api
* https://developer.mozilla.org/en-US/docs/Web/API/Navigation_API

PR Close #60722
2025-04-04 11:46:00 -07:00
hawkgs
9fde57b1b6 docs(docs-infra): fix home animation text width on small devices; fix snackbar colors (#60745)
The text used to exceed the viewport width.

PR Close #60745
2025-04-04 09:44:44 -07:00
hawkgs
4f86f3f106 docs(docs-infra): fix algolia icon in the search dialog on safari (#60702)
The icon used to have zero height due to its display property.

PR Close #60702
2025-04-02 16:19:46 +00:00
Matthieu Riegler
2af330df61 docs(docs-infra): Search results as HTML (#60394)
fixes #60384

PR Close #60394
2025-04-02 11:32:57 +00:00
Angular Robot
4f5216e8fe build: update all non-major dependencies (#60659)
See associated pull request for more information.

PR Close #60659
2025-04-01 12:23:08 +00:00
Sheik Althaf
f7a0b8eede refactor(docs-infra): migrate adev to signal-based queries (#58646)
Used migration schametic to migrate to signal based queries and little manual migration where setter is used

PR Close #58646
2025-03-31 20:16:39 +00:00
Alan Agius
9e8a1c933f refactor(docs-infra): minor clean up in testing helpers (#60581)
Modernize code of testing-helper

PR Close #60581
2025-03-27 18:12:31 +00:00
Alan Agius
d4e73f0fd8 refactor(docs-infra): remove redundant overrides in FakeWebContainer (#60581)
This is required to fix
```
adev/shared-docs/testing/testing-helper.ts💯12 - error TS2416: Property 'on' in type 'FakeWebContainer' is not assignable to the same property in base type 'WebContainer'.
  Type '{ (event: "port", listener: PortListener): Unsubscribe; (event: "server-ready", listener: ServerReadyListener): Unsubscribe; (event: "error", listener: ErrorListener): Unsubscribe; (event: "preview-message", listener: PreviewMessageListener): Unsubscribe; }' is not assignable to type '{ (event: "port", listener: PortListener): Unsubscribe; (event: "server-ready", listener: ServerReadyListener): Unsubscribe; (event: "preview-message", listener: PreviewMessageListener): Unsubscribe; (event: "error", listener: ErrorListener): Unsubscribe; (event: "xdg-open", listener: OpenListener): Unsubscribe; (ev...'.
    Types of parameters 'event' and 'event' are incompatible.
      Type '"xdg-open"' is not assignable to type '"port"'.

100   override on(event: 'server-ready', listener: ServerReadyListener): Unsubscribe;
               ~~
```

See: https://github.com/angular/angular/actions/runs/14098789522/job/39491059550?pr=60526

PR Close #60581
2025-03-27 18:12:31 +00:00
hawkgs
b938f0ce94 docs(docs-infra): fix navigation component UI bugs (#60583)
- Detachment of the navigation from the left window border
- Odd horizontal scroll when there is a URL fragment and the viewport width <900px

PR Close #60583
2025-03-27 18:11:38 +00:00
hawkgs
8559c794a8 docs(docs-infra): fix CSS media queries boundaries (#60564)
Make lower boundaries exclusive, so we avoid conflicts with the upper boundaries.

PR Close #60564
2025-03-26 20:47:32 -07:00
Matthieu Riegler
c6ef75bdea docs(docs-infra): Use AlertSeverityLevel values for alerts (#60532)
PR Close #60532
2025-03-26 20:38:11 -07:00
Matthieu Riegler
1339f06ebe docs(docs-infra): Improve markdown generation for code examples. (#60408)
Markdown requires code blocks (```) to start without white spaces. With this change we ensure that `@example` blocks with leading spaces are well supported.

fixes #60407

PR Close #60408
2025-03-21 14:35:19 -07:00
Kristiyan Kostadinov
b26b0abad6 fix(docs-infra): host binding type issues (#60481)
Resolves typing issues inside host binding in adev.

PR Close #60481
2025-03-20 11:55:52 -07:00
Alan Agius
afc1d01f7e build: lock file maintenance (#60456)
See associated pull request for more information.

Closes #60413 as a pr takeover

PR Close #60456
2025-03-19 15:49:26 +01:00
Alan Agius
8e48bc9a82 docs(docs-infra): add support for @example (#60443)
In TSDoc, we currently handle the `@usageNotes` annotation, but this is not a standard TSDoc tag. Instead, the `@example` annotation is the correct standard, which is used in the Angular CLI repo and on the SSR package.

This change ensures that `@example` is treated the same as `@usageNotes` during the transform process and also handle multiple instances of `@example` on the same tag.

PR Close #60443
2025-03-18 18:14:10 +01:00
Matthieu Riegler
d1e4be7e25 Revert "docs(docs-infra): temporary removal of core/rxjs-interop dependency (#60234)" (#60395)
This reverts commit fa712aede5.

PR Close #60395
2025-03-18 18:13:20 +01:00
Matthieu Riegler
a43570d623 docs(docs-infra): fix & enable shared-docs tests (#60409)
This commit includes a refactoring that removes `TableOfContentsScrollSpy` as this is only directly handled via a browser API.

PR Close #60409
2025-03-17 18:33:45 +01:00
Alan Agius
ea6cc64639 build: update cross-repo angular dependencies (#60387)
See associated pull request for more information.

Closes #59956 as a pr takeover, `@angular/build-tooling` has been rolled back as due to missing `@aspect_rules_js`.

PR Close #60387
2025-03-14 14:43:24 +01:00
Paul Gschwendtner
4fa5d18e5a feat(bazel): support bundling .d.ts with code splitting (#60321)
Instead of relying on Microsoft's API extractor for `d.ts` bundling,
we are switching to Rollup-based `.d.ts` bundling.

This allows us to support code spliting, even for `.d.ts` files,
allowing for relative imports to be used between entry-points, without
ending up duplicating `.d.ts` definitions in two files. This would otherwise cause
problems with assignability of types.

It also nicely integrates into our existing rollup configuration, and
overall simplifies the `ng_package` rule even further!

Notably `tsup` also uses this rollup plugin, and it seems to work well.
Keep in mind that Microsoft's API extractor is pretty hard to integrate,
caused many problems in the past, and isn't capable of code splitting.
This aligns our d.ts bundling with the .mjs bundling (great alignment).

PR Close #60321
2025-03-11 13:03:08 -07:00
Matthieu Riegler
db5963797d docs(docs-infra): Extract class constructors (#60302)
fixes #59180

PR Close #60302
2025-03-10 16:05:02 -07:00
Alan Agius
45f899a272 refactor: replace fast-glob usage with tinyglobby (#60264)
Usage of the `fast-glob` package has been replaced with the `tinyglobby` package. The change reduces the number of transitive dependencies related to these packages from 17 to 2 while also maintaining equivalent functionality. This was also changed in the Angular CLI packages.

PR Close #60264
2025-03-07 10:57:23 -08:00
Matthieu Riegler
aa1ab41e6c docs(docs-infra): enable & fix tests (#60220)
PR Close #60220
2025-03-06 14:33:48 -08:00
Matthieu Riegler
fa712aede5 docs(docs-infra): temporary removal of core/rxjs-interop dependency (#60234)
To work around the limitation of #54858, this commit removes temporarly the dependency to `core/rxjs-interop` to allow the removal of the microtask effect which was pulled by that entry.

This commit is intented to be reverted once the next patch/next is released.

PR Close #60234
2025-03-06 12:48:55 -08:00
Matthieu Riegler
e16bbcdc51 docs(docs-infra): fix initial TOC selection (#60240)
PR Close #60240
2025-03-06 07:55:42 -08:00
Matthieu Riegler
68368f6214 docs(docs-infra): Use intersectionObserver for TOC (#60166)
Using IntersectionObservers simplfies the code and doesn't rely on APIs that will trigger a reflow.

PR Close #60166
2025-03-05 12:09:45 -08:00
Matthieu Riegler
286e4da52b docs(docs-infra): Throw error at build time for invalid links (#59162)
PR Close #59162
2025-03-04 20:07:23 +00:00
hawkgs
2b114e784d docs(docs-infra): API doc content rendering fixes (#60116)
The PR introduces a few doc content rendering fixes:
- Fix highlighted section heading styles (regression from #59965).
- Convert JSDoc links within 'Usage Notes' sections to HTML and render them.
- Add IDs to doc content headings. This, by itself, makes these headings available in the page ToC.

PR Close #60116
2025-03-04 17:46:30 +00:00
Miles Malerba
2e03a8685b docs(docs-infra): Improve support for @link within the jsdoc. (#60201)
PR Close #60201
2025-03-04 17:13:42 +00:00
Matthieu Riegler
ba94f6f84f docs(docs-infra): hide github link for external repos. (#60114)
fixes #60113

PR Close #60114
2025-03-04 17:02:37 +00:00
Matthieu Riegler
1bf7494bb3 docs(docs-infra): remove animation package (#60165)
PR Close #60165
2025-03-04 17:01:46 +00:00
Matthieu Riegler
09e17eb718 docs(docs-infra): wait for the DOM to be rendered (#60163)
the code inside `renderExample` is explicitly querying the DOM. We need to wait for it to be rendered for those functions to work.

PR Close #60163
2025-03-04 16:58:14 +00:00
Hakeem
a0dc0cb331 docs(docs-infra): add a tooltip to show the full text when nav item text is lengthy (#59038)
PR Close #59038
2025-02-27 18:25:19 +00:00
Hakeem
e935ff11e2 docs(docs-infra): handle long names in the sub nav (#59038)
PR Close #59038
2025-02-27 18:25:18 +00:00
ColinJolivet
08d9081573 refactor(docs-infra): remove expand button in example viewer if there is no hidden lines (#59086)
Remove the expand button of an example viewer if there is no hidden lines in it, in order not to confuse people

PR Close #59086
2025-02-27 15:48:02 +00: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
Matthieu Riegler
65e54ae56c docs(docs-infra): remove explicit dectectChanges() (#60098)
PR Close #60098
2025-02-26 12:00:57 -05:00
hawkgs
8145b6e7a4 docs(docs-infra): fix the top position of the search dialog (#60012)
Instead of centering the dialog, fix the top position in such way that when the results container is full, the dialog looks centered. This prevents the dialog from "jumping" when you type and the results change.

PR Close #60012
2025-02-24 10:44:18 -05:00
Charles Lyding
17c84e5a03 docs: use @angular/build directly in example/tutorial projects (#60046)
By using the `@angular/build` package directly within projects for each
example and tutorial, the total install size can be reduced. This lowers the amount
of time required to be spent setting up the dependencies in browser
before the example is displayed.

The `@angular/build@19.2.0-next.2` package currently has a total unpacked size of ~115 MB.
The `@angular-devkit/build-angular@19.2.0-next.2` package currently has a total unpacked size of ~291 MB.

This also removes the now unneeded `NG_BUILD_PARALLEL_TS=0` environment variable usage.

PR Close #60046
2025-02-24 10:14:17 -05:00
Angular Robot
b6fa69f2c0 build: update dependency shiki to v3 (#59986)
See associated pull request for more information.

PR Close #59986
2025-02-18 16:50:02 +00:00
hawkgs
ea5b7371e5 docs(docs-infra): fix card highlighting in the API reference details page (#59965)
Drop `pointer-events: none` and update the member card highlighting mechanism.

PR Close #59965
2025-02-18 14:56:48 +00:00
Matthieu Riegler
c3e95ef1d5 docs(docs-infra): attemp to fix flaky mermaid test (#59994)
This test has 2 async parts, loading the markdown file and the marked parsing.
First attempt to fix the flakiness is by inline the markdown file.

If this test timeouts again in the future it means the timeout is related to marked itself (and the dynamic import of mermaid).

PR Close #59994
2025-02-18 14:55:49 +00:00
Angular Robot
47d5e1e275 build: update dependency jsdom to v26 (#59444)
See associated pull request for more information.

PR Close #59444
2025-02-14 17:59:57 +00:00
hawkgs
b6733eeea4 docs(docs-infra): drop tabs layout from the API reference details page (#59068)
Drop the tabs in favor of a single page separated by sections.

PR Close #59068
2025-02-13 14:58:33 +00:00
Matthieu Riegler
0d88463a66 docs(docs-infra): inline example in description (#59908)
fixes #59905

PR Close #59908
2025-02-12 09:21:49 -08:00
Matthieu Riegler
9ed9c40479 docs(docs-infra): remove non-necessary files from playground zip. (#59728)
fixes #56739

PR Close #59728
2025-01-28 20:34:23 +01:00
Matthieu Riegler
e98b0f1d39 docs(docs-infra): Check for files without using / as root. (#59726)
In certain circonstances, a leading slash in the file paths created a incorrect unarchived project.

fixes #57075

PR Close #59726
2025-01-28 20:33:23 +01:00
Matthieu Riegler
97897eebd8 docs(docs-infra): Remove leading path from zipped files. (#59726)
In certain circonstances, a leading slash in the file paths created a incorrect unarchived project.

fixes #57075

PR Close #59726
2025-01-28 20:33:23 +01:00