Commit Graph

4748 Commits

Author SHA1 Message Date
George Kalpakas fe3c79fe40 build(docs-infra): alphabetically sort all `navigationUrls` in `ngsw-config.json` (#42452)
This commit sorts all `navigationUrls` in `ngsw-config.json`
alphabetically.

This is in preparation of automatically generating the ServiceWorker
`navigationUrls` based on `firebase.json`.

PR Close #42452
2021-06-18 17:32:58 +00:00
George Kalpakas 932f246454 build(docs-infra): allow a trailing `/` in more `navigationUrls` globs in `ngsw-config.json` (#42452)
Previously, we were not consistent in allowing a trailing `/` in
`navigationUrls` globs in `ngsw-config.json`. And when we did, we used
two globs: one with and one without the trailing `/`.

This commit updates all appropriate `navigationUrls` globs to allow a
trailing `/`. It also merges the two glob patterns (the one with and the
one without the `/`) into one.

This is in preparation of automatically generating the ServiceWorker
`navigationUrls` based on `firebase.json`.

PR Close #42452
2021-06-18 17:32:58 +00:00
George Kalpakas 4635d4f957 build(docs-infra): remove redundant `navigationUrls` globs from `ngsw-config.json` (#42452)
This commit removes some `navigationUrls` globs from `ngsw-config.json`
that have no effect. More specifically:
- It removes globs of the form `!/**/xyz.html`, since these are already
  covered by the more generic `!/**/*.*` glob.
- It removes `!/api/**/NgFor`, since it does not have a corresponding
  redirect rule in `firebase.json`.

This is in preparation of automatically generating the ServiceWorker
`navigationUrls` based on `firebase.json`.

PR Close #42452
2021-06-18 17:32:58 +00:00
George Kalpakas 36fb5744db build(docs-infra): add missing redirect rule for `api/http` in `firebase.json` (#42452)
Previously, only sub-paths, such as `api/http/foo`, were redirected to
`guide/deprecations#http`.

This commit ensures that also `api/http` itself (which used to point to
the `http` module's API page) is redirected as well.

PR Close #42452
2021-06-18 17:32:58 +00:00
George Kalpakas c397b59855 test(docs-infra): ensure all redirect rules are tested (#42452)
This commit adds a test assertion to verify that all redirect rules
defined in `firebase.json` are tested, i.e. that each rule is applied to
at least one testcase from `URLS_TO_REDIRECT.txt`.

This will ensure that any redirect rules added in the future will be
tested.

PR Close #42452
2021-06-18 17:32:57 +00:00
George Kalpakas c66423ab2a test(docs-infra): unnest unnecessarily nested test suite (#42452)
Previously, the `destinations` test suite in
`testFirebaseRedirection.spec.ts` was nested under the
`with legacy URLs` test suite. However, the two suites are unrelated and
there is no reason to have them nested.

This commit moves the `destinations` test suite to be beside (instead of
inside) the `with legacy URLs` one.

PR Close #42452
2021-06-18 17:32:57 +00:00
George Kalpakas e0338189b3 test(docs-infra): add testcases for all redirect rules (#42452)
This commit adds testcases in `URLS_TO_REDIRECT.txt` for all redirect
rules defined in `firebase.json`. This ensures that all rules are tested
and work as expected.

PR Close #42452
2021-06-18 17:32:57 +00:00
George Kalpakas 0c105c38da fix(docs-infra): make `NotificationComponent` elements non-focusable when hidden (#42584)
Previously, the `NotificationComponent` would be hidden by reducing its
height to `0`. This allowed for a smoother hide animation when closing
the notification, but left the component's interactive elements
focusable via keyboard navigation. This was confusing for users, because
the focused elements would not be visible on the page.

This commit fixes the issue be also setting the `display` CSS property
to `none` when the `NotificationComponent` is hidden, thus ensuring that
its contents are not focusable via keyboard navigation.
(This does not affect the hide animation, since the `display` style is
not animatable and is only applied at the end of the animation.)

PR Close #42584
2021-06-18 17:32:26 +00:00
George Kalpakas 29302e3baa fix(docs-infra): remove redundant `MatIcon` element (#42584)
Previously, we included a dummy `MatIcon` element in `AppComponent` in
order to ensure that the `Material Icons` font would be requested (and
thus cached by the ServiceWorker) on every navigation. However, #41129
introduced the `ThemeToggleComponent`, which will be present on all
pages (since it is located in the top-menu) and relies on the
`Material Icons` font. Therefore, the work-around for loading the
`Material Icons` font is no longer necessary.

This commit removes the now redundant `MatIcon` from `AppComponent`.

PR Close #42584
2021-06-18 17:32:26 +00:00
George Kalpakas fd8f9ab4e8 fix(docs-infra): convert external links to `MatIconButton`s (#42584)
This commit changes the anchor elements used for external links to
`MatIconButton`s. While the appearance remains the same (with the
exception of hover/focus styles), this better aligns the styling of
external link icons with other nearby icon buttons (i.e. the theme
toggle) and alows as to simplify the CSS for external links (since much
of their styling is handled by Angular Material).

PR Close #42584
2021-06-18 17:32:26 +00:00
George Kalpakas 0f6ebe1ab5 refactor(docs-infra): remove redundant CSS rule (#42584)
Since we now use SVG for external link icons, there are no `<img>`
elements inside the anchor elements. So, the CSS rule does not match any
element and can be removed.

PR Close #42584
2021-06-18 17:32:26 +00:00
George Kalpakas 12644486f4 ci: start tracking CSS payload sizes for angular.io (#42584)
Previously, we only tracked the sizes of the eagerly loaded JS bundles.
However, the CSS styles (which also have a non-negligible size) must
also be downloaded and parsed by the browser, thus affecting the initial
rendering time.

This commit starts tracking the CSS styles payload sizes.
(Originally discussed in
https://github.com/angular/angular/pull/42584#discussion_r653787961)

PR Close #42584
2021-06-18 17:32:26 +00:00
Pete Bacon Darwin b037df28fd Revert "fix(docs-infra): do not redirect disambiguated URLs" (#42414)
This reverts commit 61ad68a586135a4d7b2b920fda0cb4238c6422fe, since there
are no longer any disambiguated paths that need special handling.

PR Close #42414
2021-06-17 18:14:53 +00:00
Pete Bacon Darwin 15fca6ca94 build(docs-infra): remove `disambiguator` doc-type (#42414)
Now that we disambiguate files by encoding the outputPath, there is
no need for the `disambiguator` doc-type.

PR Close #42414
2021-06-17 18:14:53 +00:00
Pete Bacon Darwin b0592c1be6 build(docs-infra): use case-insensitive encoding for content files (#42414)
To avoid having content files that have the same file path on case-insensitive
file-systems, we now encode the paths to remove uppercase characters.

PR Close #42414
2021-06-17 18:14:53 +00:00
Renovate Bot 0af9b89b86 build: update angular to v12.0.5 (#42588)
PR Close #42588
2021-06-17 18:08:55 +00:00
dario-piotrowicz eb04684ed3 fix(docs-infra): make anchor in list item inherit line-height (#42572)
in order to have a consistent line-height between list items containing
text and list items containing links the anchors should inherit the list
item's line-height

PR Close #42572
2021-06-16 14:03:32 -07:00
dario-piotrowicz 7b85a4d457 fix(docs-infra): add horizontal margins to nav menu (#42561)
add a 2px left and right margin to the aio-nav-menu to make
sure that the items outline doesn't get cropped

PR Close #42561
2021-06-16 14:02:53 -07:00
dario-piotrowicz 40612d1932 fix(docs-infra): fix width of sidenav icons (#42561)
make sure that the width of the sidenav chervon icon is 2.4rem
(this needs to be done using the flex property and not the
width one as that can change in flex containers)

also center chevron icon inside mat-icon container in order to maintain
the correct icon positioning at any font-size

PR Close #42561
2021-06-16 14:02:53 -07:00
dario-piotrowicz 91e307b59d fix(docs-infra): prevent vertical nav item overflowing (#42561)
prevent the overflowing unwanted effect that happens during
a nav item opening and closing (during the chevron rotation)

PR Close #42561
2021-06-16 14:02:53 -07:00
Dario Piotrowicz 3b81528ddd fix(docs-infra): improve card layout for different browser font sizes (#42533)
Remove the fixed height set on the card elements present in angular.io,
allowing the cards to have a dynamic height derived from their content
and thus removing overflow issues related to the browser's font-size,
make other minor css related adjustments to allow the card to look good
on the different browser's font-size settings

PR Close #42533
2021-06-16 14:02:24 -07:00
Pete Bacon Darwin 62aca30286 feat(docs-infra): add support for "special elements" (#41299)
This commit adds support for generating pages that document
special Angular elements, such as `ng-content` and `ng-template`,
which have special behavior in Angular but are not directives nor
components.

Resolves #41273

PR Close #41299
2021-06-16 14:01:16 -07:00
Daniel Trevino b52e93543f docs: add Daniel Trevino to contributors file (#42573)
PR Close #42573
2021-06-15 12:53:09 -07:00
Ankit Choudhary e7c69b8551 docs: Grammatical error (#42571)
Updated a minor grammatical error.
PR Close #42571
2021-06-14 09:59:14 -07:00
George Kalpakas 56a0582d79 fix(docs-infra): correctly serve `index.html` with a query string (#42547)
Previously, due to a bug in Firebase hosting, requests to
`/index.html?<query>` would lead to an infinite redirect and eventually
a failure. This affected, for example, cache-busting requests from the
ServiceWorker, which look like: `/index.html?ngsw-cache-bust=...`
For more details see
https://github.com/angular/angular/issues/42518#issuecomment-858545483

This commit temporarily works around the bug by explicitly redirecting
`/index.html?<query>` to `/?<query>`.

Fixes #42518

PR Close #42547
2021-06-14 09:57:30 -07:00
George Kalpakas 828fde6e0d feat(docs-infra): implement popup to inform about the use of cookies (#42259)
This commit adds a popup to angular.io to inform the user about the use
of cookies. Once the user confirms having read the info, the popup will
not be shown on subsequent visits.

This commit is partly based on angular/material.angular.io#988.

Fixes #42209

PR Close #42259
2021-06-14 09:54:08 -07:00
George Kalpakas 1a6a79b63a refactor(docs-infra): provide `local-/sessionStorage` via DI (#42259)
Previously, we had the same logic in a couple of places to safely access
the `Window`'s `local-/sessionStorage` and provide a no-op fallback if
necessary. Soon, we will need the same logic for the cookies popup
(see #42209).

This commit reduces code duplication by providing
`local-/sessionStorage` as injectables and sharing the logic for
accessing them safely. This also makes it easier to mock the storage in
tests without having to mess with the actual `Window` object.

NOTE:
This commit actually decreases the payload size in the `main` bundle by
40B.

PR Close #42259
2021-06-14 09:54:08 -07:00
George Kalpakas a7d1e65a51 test(docs-infra): fix warnings in `ThemeToggleComponent` unit tests. (#42259)
due to unknown `<mat-icon>` element

This commit fixes some warnings in the unit tests of the
`ThemeToggleComponent`, which were caused by the following:

- The `<mat-icon>` element used in `ToggleThemeComponent`'s template was
  not declared in tests.
- The `dark-theme.css` and `light-theme.css` files requested by
  `ToggleThemeComponent` were not available.

PR Close #42259
2021-06-14 09:54:08 -07:00
George Kalpakas edf3e5a9cf build(docs-infra): align code with new CLI v12 apps (#42259)
This commit aligns the angular.io config files more closely to how a
newly generated CLI v12 app would look like. This helps validate the
setup and makes it easier to apply new chages in the future (by
preventing the angular.io layout from deviating too much from the
default new app layout).

PR Close #42259
2021-06-14 09:54:08 -07:00
Andrew Scott 5161084917 docs: remove section on tables from docs style guide (#42330)
The approach for tables is more of an ad-hoc determination based on the
complexity of what's in them. If/when we enable formatting of markdown
files, that will also make the markdown format of tables easier to read
and more consistent.

fixes #23978

PR Close #42330
2021-06-11 11:47:03 -07:00
Mladen Jakovljević 0c13e2bf97 build(packaging): remove rehype (#42557)
`rehype` dependency is now moved to the `dgeni-package`, thus it can be removed from the main dependencies list

PR Close #42557
2021-06-11 08:00:49 -07:00
Renovate Bot 52e098730f build: update angular (#42461)
PR Close #42461
2021-06-10 14:08:42 -07:00
Pete Bacon Darwin 5e4a886259 docs: fix i18n guide typo (#42545)
Fixes #42538

PR Close #42545
2021-06-10 14:04:43 -07:00
gobika21 cddb3a88d3 docs: fix typo in "deploy multiple locales" section (#42541)
Fixes #42540

PR Close #42541
2021-06-10 14:03:34 -07:00
Pham Huu Hien ec90d8d5e5 docs: change field name from id to $id in schema.json file (#42528)
fix error "SchematicsMyService" schema is using the keyword "id" which its support is deprecated. Use "$id" for schema ID.

PR Close #42528
2021-06-10 14:03:00 -07:00
Aristeidis Bampakos aef489f139 docs: add note for naming libraries (#42335)
PR Close #42335
2021-06-10 13:58:41 -07:00
Kapunahele Wong e299683692 docs: improve accessibility of router example (#40914)
PR Close #40914
2021-06-10 10:28:33 -07:00
Alan Agius 665b986896 docs: CLI users polyfills (#42263)
With this change we remove polyfills that are listed in suggested/mandatory but are not needed by Angular CLI users, since the Angular CLI will include these polyfills by default.

Closes #39793

PR Close #42263
2021-06-09 16:10:47 -07:00
Pete Bacon Darwin e36c5b4c86 docs: fix `ngProjectAs` selector in example (#42523)
Fixes #42522

PR Close #42523
2021-06-09 12:10:20 -07:00
George Kalpakas 3c25242ada build(docs-infra): upgrade cli command docs sources to 18bbd044d (#42525)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](9cbb4059f...18bbd044d):

**Modified**
- help/generate.json

PR Close #42525
2021-06-09 09:14:39 -07:00
David Shevitz 3de774e778 docs: add guidance on adding filtering and sorting logic to componetns instead of pipes (#42368)
Fixes #41652

PR Close #42368
2021-06-08 17:53:30 -07:00
Renovate Bot 230f0c41b7 build: lock file maintenance (#42499)
PR Close #42499
2021-06-08 15:25:59 -07:00
Dylan Hunn 34ce635e3a feat(forms): undo revert and add ng-submitted class to forms that have been submitted. (#42132) (#42132)
As previously discussed in pull/31070 and issues/30486, this would be useful because it is often desirable to apply styles to fields that are both `ng-invalid` and `ng-pristine` after the first attempt at form submission, but Angular does not provide any simple way to do this (although evidently Angularjs did). This will now be possible with a descendant selector such as `.ng-submitted .ng-invalid`.

In this implementation, the directive that sets control status classes on forms and formGroups has its set of statuses widened to include `ng-submitted`. Then, in the event that `is('submitted')` is invoked, the `submitted` property of the control container is returned iff it exists. This is preferred over checking whether the container is a `Form` or `FormGroup` directly to avoid reflecting on those classes.

Closes #30486.

PR Close #42132.

This reverts commit 00b1444d12, undoing the rollback of this change.

PR Close #42132
2021-06-08 14:02:29 -07:00
Teri Glover 0777faccfb docs: Edited to remove jargon in Reference, Glossary, and Style sections (#42187)
PR Close #42187
2021-06-08 12:51:05 -07:00
kuncevic 2a28a1ddb2 docs: add Angular Rocks podcast (#42078)
PR Close #42078
2021-06-08 12:50:13 -07:00
Santosh Yadav 4975a106dc docs(platform-server): added commands for universal and add prerendering info (#36005)
Fixes #36004

PR Close #36005
2021-06-08 12:47:24 -07:00
Sam Severance f3fde4bbb5 docs: Add selector for `PeekABooDirective` (#42146)
PR Close #42146
2021-06-08 12:46:06 -07:00
Teri Glover 43b4a8c07c docs: Edited to remove jargon in Reference Errors (#42186)
PR Close #42186
2021-06-08 12:45:23 -07:00
Kapunahele Wong f33fa04fb8 docs: improve accessibility of animations example (#41385)
PR Close #41385
2021-06-08 12:43:32 -07:00
Kapunahele Wong 386550cdf3 docs: improve accessibility of reactive-forms example (#41252)
PR Close #41252
2021-06-08 12:42:20 -07:00