Commit Graph

20422 Commits

Author SHA1 Message Date
George Kalpakas 5a7eba294a fix(docs-infra): improve line-spacing between TOC items (esp. for wrapped lines) (#40802)
Previously, the line-spacing between different TOC items was almost the
same as that between wrapped lines of the same item. This made it more
diffucult to distinguish the different items.

This commit fixes this by reducing the line-spacing between wrapped
lines of the same item and keeping a larger line-spacing between
different items.

Before: ![toc line-spacing before][1]
After: ![toc line-spacing after][2]

[1]: https://user-images.githubusercontent.com/8604205/107255272-ccb81780-6a40-11eb-9612-4e7b2058417d.png
[2]: https://user-images.githubusercontent.com/8604205/107255280-cd50ae00-6a40-11eb-8f60-9ce8fba10e12.png

PR Close #40802
2021-02-16 08:39:49 -08:00
George Kalpakas 9740b1bb62 fix(docs-infra): fix sidenav top position on narrow screens (#40802)
On larger screens the top-bar has a height of 64px. On screens smaller
than 600px, the top-bar has a height of 56px. As a result, the sidenav
should have a top position of 56px on screens smaller than 600px and
64px on other screens.

Previously, the style setting the top position to 56px was tied to the
presence of the `.collapsed` class, which depends on whether the sidenav
is docked or not. The change from docked to collapsed sidenav, however,
happens at 992px. As a result, the sidenav had an incorrect top position
(56px instead of 64px) on screens between 600px and 991px.

This commit fixes this by ensuring the change of the top position for
the sidenav happens at 600px.

PR Close #40802
2021-02-16 08:39:49 -08:00
George Kalpakas 01ed63522a fix(docs-infra): improve line-spacing between search results (esp. for wrapped lines) (#40802)
Previously, the line-spacing between different search result items was
the same as that between wrapped lines of the same result. This made it
difficult to distinguish the different results.

This commit fixes it by reducing the line-spacing between wrapped lines
of the same result item and keeping a larger line-spacing between
different results.

Before: ![search-results before][1]
After: ![search-results after][2]

[1]: https://user-images.githubusercontent.com/8604205/107229685-ca48c400-6a26-11eb-8161-0c0768b10a2d.png
[2]: https://user-images.githubusercontent.com/8604205/107229691-ccab1e00-6a26-11eb-9594-d4c37d0d72b2.png

PR Close #40802
2021-02-16 08:39:49 -08:00
George Kalpakas 2a302dd3cf fix(docs-infra): avoid page-breaks inside an image when printing (#40802)
Previously, when printing, a page-break could be inserted inside an
image (contained in a `.lightbox` element).

This commit ensures no page-breaks are inserted inside `.lightbox`
elements (which contain images).

Before: ![print-page-break before][1]
After: ![print-page-break after][2]

[1]: https://user-images.githubusercontent.com/8604205/106939709-48f0e900-6729-11eb-912c-e5cd0cb40897.png
[2]: https://user-images.githubusercontent.com/8604205/106939707-48585280-6729-11eb-8d5f-a12312f32056.png

PR Close #40802
2021-02-16 08:39:49 -08:00
George Kalpakas c98ab1f9e7 fix(docs-infra): fix search results top padding when a notification is visible (#40802)
Previously, when a notification was visible at the top of the page, the
search results pane had more top padding than necessary.

This commit fixes it by removing the extra padding.

Before: ![search-results before][1]
After: ![search-results after][2]

[1]: https://user-images.githubusercontent.com/8604205/106938100-3970a080-6727-11eb-8ae8-4e7a33af1daf.png
[2]: https://user-images.githubusercontent.com/8604205/106938103-3aa1cd80-6727-11eb-96f5-f607bde314be.png

PR Close #40802
2021-02-16 08:39:49 -08:00
George Kalpakas 93e2aea4bd fix(docs-infra): dim line-numbers in code examples (#40802)
This commit ensures that the line-numbers in code examples appear
"dimmed" to make it clearer that they are not part of the actual code.

Based on the CSS rules, it seems that the intention was to make it so,
but the color was incorrectly set on the `<ol>` elements instead of
targeting `li::marker`.

Before: ![line-numbers before][1]
After: ![line-numbers after][2]

[1]: https://user-images.githubusercontent.com/8604205/106937191-23aeab80-6726-11eb-9178-bdc067fa3d09.png
[2]: https://user-images.githubusercontent.com/8604205/106937184-227d7e80-6726-11eb-81d1-f709537b6a56.png

PR Close #40802
2021-02-16 08:39:48 -08:00
George Kalpakas 8cea3be8f7 fix(docs-infra): fix vertical alignment of contributor info items (#40802)
This commit fixes the vertical alignment of info items (i.e. links to
bio, Twitter, website) in the contributor list.

Before: ![contributor alignment before][1]
After: ![contributor alignment after][2]

[1]: https://user-images.githubusercontent.com/8604205/106926453-ca407f80-6719-11eb-9580-8614cc4f4907.png
[2]: https://user-images.githubusercontent.com/8604205/106926469-cd3b7000-6719-11eb-8ba8-c8ae01996c02.png

PR Close #40802
2021-02-16 08:39:48 -08:00
George Kalpakas 8f7fea4ad8 fix(docs-infra): clear unneeded DOM nodes in `CodeExample/TabsComponent` (#40802)
Both `CodeExampleComponent` and `CodeTabsComponent` components receive
some code via content projection, grab the projected content and pass it
through to a `CodeComponent` instance for formatting and displaying.

Previously, the projected content was kept in the DOM (hidden). This
unnecessarily increased the number of DOM nodes.

This commit fixes this by clearing the projected DOM nodes once their
content has been captured.

PR Close #40802
2021-02-16 08:39:48 -08:00
Brandon Winchester 7fa881919b docs: Add documentation about the CLI failing (#35385)
The CLI seems to throw very non-descriptive errors. Adding a section to help users troubleshoot lazy-loading modules.

PR Close #35385
2021-02-16 08:04:05 -08:00
Pete Bacon Darwin 529f0a83cb docs(http): add custom JSONParser example (#40645)
Update the HTTP guide and associated example to demonstrate
how an interceptor can be used to provide a custom JSON parser.

Resolves #21079

PR Close #40645
2021-02-16 08:03:33 -08:00
Enea Jahollari 19114dc11e docs: remove unnecessary `<hr />` tags in Getting Started sections (#40693)
After the docs UI redesign `h2` tags got a border top.
`border-top: 1px solid #dbdbdb;`;
In the sections of Getting Started guide in order to separate
`What's next` from above content an `<hr />` tag was used,
that now becomes unnecessary.

This commit removes unnecessary `<hr />` tags.

PR Close #40693
2021-02-16 08:00:42 -08:00
Dan Levy 72db3e8d54 docs: add camelCase example to style notation (#40699)
PR Close #40699
2021-02-16 07:59:40 -08:00
Pete Bacon Darwin 8945d7c7c1 build(docs-infra): add a link to `usage notes` from `description` (#40835)
The "Usage Notes" section is often at the bottom of a long page of content
which can make it difficult to discover. This commit adds a link at the
end of the "Description" if there is a "Usage Notes" section on the page.
This link should help the reader to discover that there is more information
available further down the page.

This is basically a marginal fix. The longer term fix should be to
consider what content goes in which sections and how they should
be laid out on the page.

See #40753

PR Close #40835
2021-02-16 07:47:08 -08:00
Kristiyan Kostadinov f2ee9d5679 refactor(docs-infra): use CDK clipboard service (#40840)
The CDK has had a service for copying strings to the clipboard. These changes switch
AIO to it, rather than having to maintain a custom solution.

PR Close #40840
2021-02-16 07:43:56 -08:00
Alexey Elin 5f0c219883 docs: fix schematics' package name for `ng generate` sub-commands (#40846)
PR Close #40846
2021-02-16 07:43:02 -08:00
Daniel 67d85b3680 docs: capitalize Angular word in upgrade-setup.md file (#40862)
PR Close #40862
2021-02-16 07:42:35 -08:00
mgechev 72a00dcc6b docs: add a style recommendation for initializing inputs (#40698)
This practice is to better align with `strictPropertyInitialization`
which is coming by default with strict mode in v12.

PR Close #40698
2021-02-12 17:07:30 -08:00
Bjarki 980f6a4958 fix(core): address Trusted Types bug in Chrome 83 (#40815)
In Chrome 83 passing a TrustedScript to eval just returns the
TrustedScript back without evaluating it, causing the
newTrustedFunctionFor{Dev,JIT} functions to fail. This is a browser bug
that has been fixed in Chrome 84, and only affects Angular applications
running with JIT (which includes unit tests).

As a temporary workaround for users still on Chrome 83, detect when this
occurs in the newTrustedFunctionFor* functions and fall back to the
straightforward, non-Trusted Types compatible implementation. The only
combination that is left affected consists of Angular applications
running with JIT, that have explicitly configured Trusted Types in
enforcement mode, with users that are still on Chrome 83.

Also correct docstring for newTrustedFunctionForJIT.

PR Close #40815
2021-02-12 16:59:58 -08:00
mgechev 9661873df1 docs: add ng-conf 2021 (#40783)
PR Close #40783
2021-02-12 16:49:22 -08:00
Nils Mehlhorn 5554a3f174 docs: add NgRx book to resources (#39841)
PR Close #39841
2021-02-12 16:48:57 -08:00
Jeremy Elbourn bbbfa3e6bd docs: clarify that support schedule is subject to change (#40770)
Initially raised due to #39509, this change updates our
"Support policy and schedule" with the same disclaimer
from the "Release frequency" section above.

PR Close #40770
2021-02-12 16:14:52 -08:00
Sam Hrncir ccd10ea315 docs: Clarify new ng workspace options (#40816)
Hope this helps make the tutorial go even smoother for people after me.

PR Close #40816
2021-02-12 16:13:30 -08:00
JiaLiPassion 44b8b0ffe1 release: cut the zone.js-0.11.4 release (#40775)
PR Close #40775
2021-02-12 13:33:05 -08:00
Daniel cbb6b4a30b docs: capitalize Angular word in zone.md file (#40813)
PR Close #40813
2021-02-12 12:01:55 -08:00
Sam Hrncir b4c8143cc2 docs: Update start-deployment.md (#40817)
Updated section reference to current name listed in sidebar.
PR Close #40817
2021-02-12 09:30:03 -08:00
Pete Bacon Darwin 9cb43fb507 refactor(compiler-cli): implement `ɵɵngDeclarePipe()` (#40803)
This commit implements creating of `ɵɵngDeclarePipe()` calls in partial
compilation, and processing of those calls in the linker and JIT compiler.

See #40677

PR Close #40803
2021-02-12 09:00:16 -08:00
Sam Hrncir 6425a6d543 docs: typo fix (#40804)
PR Close #40804
2021-02-12 08:59:47 -08:00
George Kalpakas 9cdf654293 build(docs-infra): upgrade cli command docs sources to 84b99497f (#40824)
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](c61df5d30...84b99497f):

**Modified**
- help/generate.json
- help/new.json

PR Close #40824
2021-02-12 08:59:11 -08:00
George Kalpakas 43ecf8a77b feat(platform-server): allow shimming the global env sooner (#40559)
`@angular/platform-server` provides the foundation for rendering an
Angular app on the server. In order to achieve that, it uses a
server-side DOM implementation (currently [domino][1]).

For rendering on the server to work as closely as possible to running
the app on the browser, we need to make DOM globals (such as `Element`,
`HTMLElement`, etc.), which are normally provided by the browser,
available as globals on the server as well.

Currently, `@angular/platform-server` achieves this by extending the
`global` object with the DOM implementation provided by `domino`. This
assignment happens in the [setDomTypes()][2] function, which is
[called in a `PLATFORM_INITIALIZER`][3]. While this works in most cases,
there are some scenarios where the DOM globals are needed sooner (i.e.
before initializing the platform). See, for example, #24551 and #39950
for more details on such issues.

This commit provides a way to solve this problem by exposing a
side-effect-ful entry-point (`@angular/platform-server/init`), that
shims the `global` object with DOM globals. People will be able to
import this entry-point in their server-rendered apps before
bootstrapping the app (for example, in their `main.server.ts` file).
(See also [#39950 (comment)][4].)

In a future update, the [`universal` schematics][5] will include such an
import by default in newly generated projects.

[1]: https://www.npmjs.com/package/domino
[2]: https://github.com/angular/angular/blob/0fc8466f1be392917e0c/packages/platform-server/src/domino_adapter.ts#L17-L21
[3]: https://github.com/angular/angular/blob/0fc8466f1be392917e0c/packages/platform-server/src/server.ts#L33
[4]: https://github.com/angular/angular/issues/39950#issuecomment-747598403
[5]: https://github.com/angular/angular-cli/blob/cc51432661eb4ab4b6a3/packages/schematics/angular/universal

PR Close #40559
2021-02-12 08:55:25 -08:00
George Kalpakas 177eab2260 ci: add integration test for Angular Elemens with SSR (#40559)
This commit adds an integration test that uses `@angular/elements` with
`@angular/platform-server` in order to highlight a current
incompatibility. The issue will be fixed in a subsequent commit.

PR Close #40559
2021-02-12 08:55:25 -08:00
George Kalpakas b5efc95ae5 build(platform-server): add `domino` to the list of dependencies (#40559)
The `platform-server` package currently depends on the [domino][1]
package. This commit adds `domino` to the list of dependencies for the
`platform-server` `ng_module` target.

[1]: https://www.npmjs.com/package/domino

PR Close #40559
2021-02-12 08:55:25 -08:00
Sam Hrncir ca43938d24 docs: copy paste error (#40812)
The removed bit was copied and pasted from a previous section.  Not relevent for the particular step of the tutorial.
The removed bit can we found as intended in __Adding Navigation__ section.
PR Close #40812
2021-02-11 15:59:55 -08:00
Alex Rickabaugh 80f4ff3338 fix(compiler-cli): set TS original node on imported namespace identifiers (#40711)
This commit causes imports added by ngtsc's `ImportManager` to have their
TypeScript "original node" set to the generated `ts.ImportDeclaration`
statement.

In g3, the tsickle transformer runs after the Angular transformer and post-
processes Angular's compilation output. One of its post-processing tasks is
to transform generated imports and references to imported symbols from the
commonjs module system to the g3 module system. Part of this transformation
involves recognizing modules with specific metadata and altering references
to symbols from those modules accordingly.

Normally, tsickle can rely on TypeScript's binding for an imported symbol to
find its origin module and thus the correct metadata for the symbol. However
the Angular transform generates new synthetic imports which don't have such
binding information. Angular's imports are always namespace imports of the
form:

```
import * as qualifier 'module/specifier';
```

References to such an import are then of the form `qualifier.SymbolName`.

To process such imports properly, tsickle needs to be able to associate the
reference to `qualifier` in the expression `qualifer.SymbolName` with the
`ts.ImportDeclaration` statement that defines it. It expects to do this by
looking at the `ts.getOriginalNode()` for the `qualifier` reference, which
should be the `ts.ImportDeclaration`. This commit changes ngtsc's import
generation mechanism to set the original node on `qualifier` identifiers
according to this expectation.

This commit is not tested in the direct compiler tests, since:

1) there is no observable behavior externally from setting the original node
2) we don't have tests that intercept transformer operations (which could be
   used to directly assert against the AST nodes)
3) tsickle's published version does not (yet) contain the g3-specific
   transformations which rely on the original node and would thus allow the
   behavior to be observed.

Instead, we rely on the g3 testing suite to validate the correctness of this
fix. Breaking this functionality would cause g3 compilation errors for
targets, since tsickle would be unable to transform imports correctly.

PR Close #40711
2021-02-11 15:58:25 -08:00
Alan Agius 5eb195416b fix(compiler-cli): extend `angularCompilerOptions` in tsconfig from node (#40694)
TypeScript supports non rooted extends, we should do the same

b346f5764e/src/compiler/commandLineParser.ts (L2603-L2628)

Closes: #36715

PR Close #40694
2021-02-11 13:29:51 -08:00
Alan Agius 719f9ef7ac refactor(bazel): use `readConfiguration` to read config file (#40694)
With this change we clean up the parsing of tsconfig files.

PR Close #40694
2021-02-11 13:29:51 -08:00
Alan Agius b7c4d07e81 fix(compiler-cli): `readConfiguration` existing options should override options in tsconfig (#40694)
At the moment, when passing an Angular Compiler option
in the `existingOptions` it doesn't override the defined in the TSConfig.

PR Close #40694
2021-02-11 13:29:51 -08:00
Joey Perrott dfc9f36dd8 build: update browserstacktunnel-wrapper (#40810)
Update browserstacktunnel-wrapper to address security vulnerabilities

PR Close #40810
2021-02-11 13:11:14 -08:00
Joey Perrott 09b5ad5733 build: update cldr-data-downloader (#40810)
Update cldr-data-downloader to address security vulnerabilities.

PR Close #40810
2021-02-11 13:11:14 -08:00
Joey Perrott af6451060d build: update gulp and gulp-conventional-changelog (#40810)
Update gulp and gulp-conventional-changelog to address security vulnerabilities.

PR Close #40810
2021-02-11 13:11:14 -08:00
Joey Perrott e27787a583 build: remove jpm dependency (#40807)
Remove our dependency on jpm as it goes unused in our repository.

PR Close #40807
2021-02-11 12:30:55 -08:00
Joey Perrott fcf00de864 ci: remove BES usages from CI (#40809)
Removes BES configuration from CI bazel configuration as it is increasingly seeing timeouts
causing failures, but the uploaded results go largely unlooked at.

PR Close #40809
2021-02-11 12:28:55 -08:00
Joey Perrott 267c566baf Revert "fix(router): fix load interaction of navigation and preload strategies (#40389)" (#40806)
This reverts commit e9a19a6152.

PR Close #40806
2021-02-11 11:59:10 -08:00
GChuf f72626d3cc build: Update dependencies (#40726)
Updates some dependencies.

PR Close #40726
2021-02-11 11:17:21 -08:00
Paul Gammans e9a19a6152 fix(router): fix load interaction of navigation and preload strategies (#40389)
Fix router to ensure that a route module is only loaded once especially
in relation to the use of preload strategies with delayed or partial
loading.

Add test to check the interaction of PreloadingStrategy and normal
router navigation under differing scenarios.
Checking:
 * Prevention of duplicate loading of modules.
   related to #26557
 * Prevention of duplicate RouteConfigLoad(Start|End) events
   related to #22842
 * Ensuring preload strategy remains active for submodules if needed
   The selected preload strategy should still decide when to load submodules
 * Possibility of memory leak with unfinished preload subscription
   related to #26557
 * Ensure that the stored loader promise is cleared so that subsequent
   load will try the fetch again.
 * Add error handle error from loadChildren
 * Ensure we handle error from with NgModule create

Fixes #26557 #22842 #26557

PR Close #40389
2021-02-11 09:15:09 -08:00
Joey Perrott c22ae5d9b9 fix(dev-infra): update npm package subsitutions to reflect no longer having an imported workspace (#40785)
Update replacements of the `//dev-infra/` piece of bazel path segments to reference the `@npm//`
workspace rather than creating its own workspace.

PR Close #40785
2021-02-11 09:13:00 -08:00
Joey Perrott 2d7bc1d301 ci: Remove language-service from testing group (#40795)
Much like the compiler-cli, the language-service package has internal testing
tools that are not intended for external use and do not need fw-testing review.
See #40679.

PR Close #40795
2021-02-11 09:03:23 -08:00
waterplea 7ca244a38b docs(core): add missing dot at the end of the sentence (#40800)
PR Close #40800
2021-02-11 09:00:51 -08:00
waterplea ef8bf6745c docs(core): fix typo in interpolation property description (#40800)
PR Close #40800
2021-02-11 09:00:51 -08:00
Joey Perrott 68da05dc47 Revert "ci: Remove language-service from testing group (#40787)" (#40794)
This reverts commit 06671e85f9.

PR Close #40794
2021-02-10 16:06:21 -08:00
kirjs c56ecab515 feat(common): support ICU standard "stand alone day of week" with `DatePipe` (#40766)
This commit adds support for Finnish full date formatting,
as well as `c/cc/ccc/cccc/ccccc/cccccc` date formats in the `DatePipe`.

Fixes #26922

PR Close #40766
2021-02-10 16:03:06 -08:00