Commit Graph

4290 Commits

Author SHA1 Message Date
Pete Bacon Darwin 4859c0947a build(docs-infra): implement full template checking for examples (#40930)
This commit turns on full template type checking and fixes the examples
that had errors.

PR Close #40930
2021-02-26 15:40:44 -08:00
Pete Bacon Darwin 03d92f75e6 build(docs-infra): enable Ivy in StackBlitz examples (#40930)
We need to explicitly set the `enableIvy` option in a tsconfig file
to tell StackBlitz not to use ViewEngine.

This commit will generate an appropriate tsconfig.json file in the
example data that is sent to StackBlitz, which matches the Ivy
setting of the AIO project itself.

PR Close #40930
2021-02-26 15:40:44 -08:00
George Kalpakas 272b5645c4 fix(docs-infra): improve the layout of the "Resources" page (#40944)
This commit improves the readability of the "Resources" page by limiting
the content's max width to 50em (which is 800px by default).

It also gets rid of custom color values and either uses the default
color or colors specified via Sass variables.

Before: ![resources page before][1]
After: ![resources page after][2]

This change has been extracted from #36045.

[1]: https://user-images.githubusercontent.com/8604205/108601949-104b4380-73a8-11eb-864b-948db8c36f80.png
[2]: https://user-images.githubusercontent.com/8604205/108602036-894a9b00-73a8-11eb-870d-39bea9b46d97.png

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas d3eff182e3 refactor(docs-infra): clean up styling of the `<aio-resource-list>` component (#40944)
This commit cleans up the styles and the elements/classes used for
styling the content of the `<aio-resource-list>` component.

This change has been extracted from #36045.

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas 00562ed935 fix(docs-infra): center the "Contribute" page (#40944)
This commit improves the layout of the "Contribute" page by centering
the content (similar to other marketing pages).

Before: ![contribute layout before][1]
After: ![contribute layout after][2]

This change has been extracted from #36045.

[1]: https://user-images.githubusercontent.com/8604205/108595056-5b545f00-7386-11eb-97b6-c3606dbfb5fa.png
[2]: https://user-images.githubusercontent.com/8604205/108595060-5becf580-7386-11eb-91fa-b2877f2a4691.png

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas 2af8099fbc fix(docs-infra): use up-to-date URLs in "Contribute" links (and replace deprecated `md-button`) (#40944)
This commit replaces some outdated URLs in "Contribute" links (on the
"Contribute" page):
- `github.com/angular/material2` --> `github.com/angular/components`
- `github.com/angular/angularfire2` --> `github.com/angular/angularfire`

It also replaces the deprecated `md-button` attribute with `mat-button`.

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas c4a9c003cb fix(docs-infra): remove unwanted underline when hovering over contributor info links (#40944)
This commit removes an unwanted underline effect when hovering over
contributor info links (`.contributor-info > .info-item`). This was
accidentally introduced in #40427.

Before: ![contributor info on hover before][1]
After: ![contributor info on hover after][2]

[1]: https://user-images.githubusercontent.com/8604205/108560170-045a7580-7305-11eb-98d2-4302d98581c6.png
[2]: https://user-images.githubusercontent.com/8604205/108560176-058ba280-7305-11eb-97eb-74cf2c830a39.png

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas d97b45d82a fix(docs-infra): make inline code stand out more (#40944)
This commit improves the styling of inline code blocks to make them
stand out more.

Before: ![code formatting before][1]
After: ![code formatting after][2]

This change has been extracted from #36045.

[1]: https://user-images.githubusercontent.com/8604205/108554295-8e521080-72fc-11eb-94e8-09246ae334c8.png
[2]: https://user-images.githubusercontent.com/8604205/108553733-c9077900-72fb-11eb-8001-1f0baf8b95bc.png

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas 516de34778 fix(docs-infra): improve the appearance of `.filter-button` elements (#40944)
This commit improves the appearance of `.filter-button` elements used to
jump between different categories in "Contributors" and "Resources" pages.

Before (wide screen): ![contributors buttons (wide screen) before][1]
Before (narrow screen): ![contributors buttons (narrow screen) before][2]
After (wide screen): ![contributors buttons (wide screen) after][3]
After (narrow screen): ![contributors buttons (narrow screen) after][4]

This change has been extracted from #36045.

[1]: https://user-images.githubusercontent.com/8604205/108414895-72376c00-7235-11eb-9537-7a7b059d09fe.png
[2]: https://user-images.githubusercontent.com/8604205/108414923-782d4d00-7235-11eb-8ba4-87a3a9ae14cd.png
[3]: https://user-images.githubusercontent.com/8604205/108414929-78c5e380-7235-11eb-807a-109b4200e64e.png
[4]: https://user-images.githubusercontent.com/8604205/108414942-7cf20100-7235-11eb-8ef0-9b2da397b3ee.png

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas ae50e40216 refactor(docs-infra): move `.filter-button` styles inside `.group-buttons` (#40944)
Since `.filter-button` elements only appear inside `.group-buttons`
elements, this commit moves `.filter-button` CSS styles inside
`.group-buttons` styles.

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas d6f6197728 fix(docs-infra): put the license references in a separate paragraph in the footer (#40944)
This commit improves how sentences are broken up into lines in the
footer (due to the limited max-width of the content) by moving the
license references in a separate paragraph.

Before: ![footer before][1]
After: ![footer after][2]

[1]: https://user-images.githubusercontent.com/8604205/108595211-593ed000-7387-11eb-8ee5-f13c8bf522f4.png
[2]: https://user-images.githubusercontent.com/8604205/108595214-5a6ffd00-7387-11eb-9a9d-dbaa2175f51f.png

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas 2475dbe7b2 refactor(docs-infra): remove redundant Sass mixin (#40944)
This commit removes the `bp()` Sass mixin, which was only used in one
place (and also included several unused code-branches).

PR Close #40944
2021-02-26 15:39:28 -08:00
George Kalpakas 2a518fb44c refactor(docs-infra): use Sass variables for colors used in themes (#40944)
This change has been extracted from #36045.

NOTE:
The color names for the RC theme were computed using
https://www.color-blindness.com/color-name-hue.

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:28 -08:00
George Kalpakas 6275346871 fix(docs-infra): increase margin of header-links (#40944)
This change has been extracted from #36045.

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:28 -08:00
Theoklitos Bampouris fb82558d78 docs: Change lexical in security guide (#41016)
Change `onerror` attribute reference to `script` element reference
PR Close #41016
2021-02-26 15:14:57 -08:00
cexbrayat 91cdc11aa0 fix(common): allow number or boolean as http params (#40663)
This change fixes an incompatibility between the old `@angular/http` package
and its successor (`@angular/common/http`) by re-introducing the types that were supported before.

It now allows to use number and boolean directly as HTTP params, instead of having to convert it to string first.

Before:

    this.http.get('/api/config', { params: { page: `${page}` } });

After:

    this.http.get('/api/config', { params: { page }});

`HttpParams` has also been updated to have most of its methods accept number or boolean values.

Fixes #23856

BREAKING CHANGE:

The methods of the `HttpParams` class now accept `string | number | boolean`
instead of `string` for the value of a parameter.
If you extended this class in your application,
you'll have to update the signatures of your methods to reflect these changes.

PR Close #40663
2021-02-26 12:03:50 -08:00
George Kalpakas 383d226118 fix(docs-infra): add links to glossary for terms on the "Press kit" page (#40945)
The "Press kit" page has a "Terminology" section that lists a couple of
terms (currently AOT and JIT compilation).

This commit adds links to the corresponding entries in "Glossary" to
make it easier for people to find out what the terms mean.

PR Close #40945
2021-02-26 08:28:22 -08:00
George Kalpakas 117c49f799 fix(docs-infra): more clearly separate different sections on the "Press kit" page (#40945)
This commit adds a horizontal line and some extra spacing between
different sections of the "Press kit" page to make it easier to identify
where one section ends and the next begins.

Before: ![presskit sections before][1]
After: ![presskit sections after][2]

[1]: https://user-images.githubusercontent.com/8604205/108739638-8208c600-753d-11eb-99bb-ea119640de39.png
[2]: https://user-images.githubusercontent.com/8604205/108745297-95b72b00-7543-11eb-9a35-56325477534b.png

PR Close #40945
2021-02-26 08:28:22 -08:00
George Kalpakas 78a70498b5 fix(docs-infra): improve the layout and appearance of the "Press kit" page (#40945)
This commit improves the layout and appearance of the "Press kit" page.
Most notable changes include:
- Center content and limit max width to 50em (which is 50px by default).
- Remove uppercase transform for headings.
- Use a two-column layout for icons (instead of one icon per row).
- Show "download" icons next to download links.

Before (wide): ![presskit page (wide) before][1]
Before (narrow 1/2): ![presskit page (narrow 1/2) before][2]
Before (narrow 2/2): ![presskit page (narrow 2/2) before][3]
After (wide): ![presskit page (wide) after][4]
After (narrow 1/2): ![presskit page (narrow 1/2) after][5]
After (narrow 2/2): ![presskit page (narrow 2/2) after][6]

This change is based on code from #36045.

[1]: https://user-images.githubusercontent.com/8604205/108739632-80d79900-753d-11eb-8ddc-ac542ec5b3ac.png
[2]: https://user-images.githubusercontent.com/8604205/108739641-82a15c80-753d-11eb-9b20-8119ad117460.png
[3]: https://user-images.githubusercontent.com/8604205/108739643-83d28980-753d-11eb-8afa-2d7a5e87d586.png
[4]: https://user-images.githubusercontent.com/8604205/108739638-8208c600-753d-11eb-99bb-ea119640de39.png
[5]: https://user-images.githubusercontent.com/8604205/108739642-8339f300-753d-11eb-9b25-5c1988adb1dd.png
[6]: https://user-images.githubusercontent.com/8604205/108739645-846b2000-753d-11eb-8ef3-b6a8b7c6d1ff.png

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40945
2021-02-26 08:28:21 -08:00
George Kapris 953e98e211 docs: Change grammatically in security guide (#40995)
Change `controller` reference to `component` reference
PR Close #40995
2021-02-26 08:25:21 -08:00
Alan Agius d51d39cb4c docs: update docs to use new zone.js entry-points (#40823)
In CLI version 12, the old style of imports is no longer supported.

PR Close #40823
2021-02-24 07:58:29 -08:00
Carl Fredrik Samson 03de2f2b78 docs: fix ch 4 so it compiles in strict mode (#40970)
Fixes error: `TS2564: Property 'heroes' has no initializer and is not definitely assigned in the constructor`
and makes `hero` property consistent with ch 3 (ref: #40942)

PR Close #40970
2021-02-24 07:57:53 -08:00
Kapunahele Wong 06d3267824 docs: improve accessibility for toh-pt1 example (#40560)
PR Close #40560
2021-02-23 10:41:56 -08:00
Kapunahele Wong 1f91672d50 docs: improve accessibility of toh2 example (#40575)
Increases contrast of example copy.
Explicitly references inputs from labels.
Updates screenshot of styles that aren't accessible.
Removes the term master.
Provides more detailed alternate text for the image.
Adds padding to input so it is an easier target for touch or pointer.

PR Close #40575
2021-02-23 10:41:05 -08:00
Kapunahele Wong 1f7921be33 docs: improve accessibility of tohpt3 (#40617)
PR Close #40617
2021-02-23 10:40:09 -08:00
Kapunahele Wong bd6f377db2 docs: improve accessibility of tohpt4 (#40622)
PR Close #40622
2021-02-23 10:39:44 -08:00
Kapunahele Wong 4d1299bd82 docs: improve accessibility of toh-pt5 example (#40632)
PR Close #40632
2021-02-23 10:39:13 -08:00
Kapunahele Wong edd26a2b79 docs: improve accessibility of toh-pt6 (#40805)
PR Close #40805
2021-02-23 10:38:50 -08:00
Kapunahele Wong 49e02ca7d6 docs: move JsonParser class above CustomJsonInterceptor (#40964)
This move fixes the error in StackBlitz of
Cannot access 'JsonParser' before initialization

PR Close #40964
2021-02-23 10:37:26 -08:00
Daniel Díaz b84f719747 docs: update year (#40925)
PR Close #40925
2021-02-22 12:37:40 -08:00
George Kalpakas 09e1e1935a refactor(docs-infra): convert Sass mixin from camelCase to kebab-case to follow Sass conventions (#40881)
This commit converts the last remaining camelCased Sass mixin
(`deployTheme`) to kebab-case (`deploy-theme`) to follow the Sass
conventions.

Discussed in
https://github.com/angular/angular/pull/40881#discussion_r577961617.

PR Close #40881
2021-02-19 09:14:59 -08:00
George Kalpakas 4b3e6b5a00 refactor(docs-infra): create mixin for styling marketing pages (#40881)
Previously, in order to apply some styles to marketing (i.e. non-docs)
pages, we listed the various `.page-*` classes that corresponded to docs
pages. This meant that adding/removing a marketing page required updates
in several places, which is error-prone.

This commit avoids this by using a Sass mixin for applying styles to
marketing pages.

PR Close #40881
2021-02-19 09:14:59 -08:00
George Kalpakas c5231ce1da refactor(docs-infra): remove duplicate or unused CSS styles (#40881)
This commit removes some CSS styles that have no effect (i.e. are
duplicates or overridden by other rules).

PR Close #40881
2021-02-19 09:14:59 -08:00
George Kalpakas 717590a732 fix(docs-infra): fix top margin of "Press kit" page on small screens (#40881)
Previously, the "Press kit" page had a larger top margin on smaller
screens, that seemed unnecessary.

This commit removes the extra top margin.

Before: ![presskit top section margin before][1]
After: ![presskit top section margin after][2]

[1]: https://user-images.githubusercontent.com/8604205/107988545-efb27080-6fd8-11eb-91d6-79651f2dffaf.png
[2]: https://user-images.githubusercontent.com/8604205/107988547-f04b0700-6fd8-11eb-9c4b-d444b39a34fe.png

PR Close #40881
2021-02-19 09:14:59 -08:00
George Kalpakas c704162800 fix(docs-infra): use consistent padding in marketing pages (#40881)
This commit makes the padding of the "Events", "Features" and
"Press kit" pages consistent with that of other marketing pages.

Before: ![presskit padding before][1]
After: ![presskit padding after][2]

[1]: https://user-images.githubusercontent.com/8604205/107986067-f8547800-6fd3-11eb-9164-51793e431d05.png
[2]: https://user-images.githubusercontent.com/8604205/107986064-f7234b00-6fd3-11eb-9050-ed7ec04e7443.png

PR Close #40881
2021-02-19 09:14:59 -08:00
George Kalpakas 09d36369b0 fix(docs-infra): make top-nav consistent across all marketing pages (#40881)
Previously, some of the marketing pages had different styles for the
top-nav than others (even if they had the same layout and
blue-background header). More specifically, the top-nav had a box-shadow
and it was absolutely positioned on some marketing pages, while it had
no box-shadow and was statically positioned on others.

This commit makes the appearance of marketing pages wrt the top-nav
consistent across all marketing pages by changing the styles for the
remaining pages:
- Contributors (`/about`)
- Contribute (`/contribute`)
- Press kit (`/presskit`)

Before: ![contribute topnav shadow before][1]
After: ![contribute topnav shadow after][2]

[1]: https://user-images.githubusercontent.com/8604205/107984898-a6aaee00-6fd1-11eb-8bf3-79393c8983ff.png
[2]: https://user-images.githubusercontent.com/8604205/107984900-a7438480-6fd1-11eb-8d9b-a643d69ab692.png

PR Close #40881
2021-02-19 09:14:59 -08:00
George Kalpakas b509a7dc42 fix(docs-infra): make the "Contributors" page header similar to other marketing pages (#40881)
Before (wide screen): ![contributors (wide screen) before][1]
Before (narrow screen): ![contributors (narrow screen) before][2]
After (wide screen): ![contributors (wide screen) after][3]
After (narrow screen): ![contributors (narrow screen) after][4]

[1]: https://user-images.githubusercontent.com/8604205/107983880-634f8000-6fcf-11eb-8ad9-5a5df65d3d5e.png
[2]: https://user-images.githubusercontent.com/8604205/107983893-6a768e00-6fcf-11eb-9ccd-158ec491404f.png
[3]: https://user-images.githubusercontent.com/8604205/107983903-6f3b4200-6fcf-11eb-94e1-182893b7a715.png
[4]: https://user-images.githubusercontent.com/8604205/107983895-6ba7bb00-6fcf-11eb-9ff5-59d221ba906d.png

PR Close #40881
2021-02-19 09:14:59 -08:00
George Kalpakas b0c8c4d696 fix(docs-infra): add spacing between past and future events sections (#40881)
This commit adds some more spacing between the past and future events
sections on the "Events" page.

Before: ![events spacing before][1]
After: ![events spacing after][2]

[1]: https://user-images.githubusercontent.com/8604205/107989711-82eca580-6fdb-11eb-837e-1255d439d51a.png
[2]: https://user-images.githubusercontent.com/8604205/107989708-81bb7880-6fdb-11eb-8cf4-4653254e1c37.png

PR Close #40881
2021-02-19 09:14:59 -08:00
George Kalpakas 71ccb545c6 refactor(docs-infra): create mixin for styling docs pages (#40881)
Previously, in order to apply some styles to docs (i.e. non-marketing)
pages, we listed the various `.folder-*` classes that corresponded to
docs pages. This meant that adding/removing a docs area required updates
in several places, which is error-prone.

This commit avoids this by using a Sass mixin for applying styles to
docs pages.

PR Close #40881
2021-02-19 09:14:59 -08:00
George Kalpakas 44e1f956d0 fix(docs-infra): ensure the main font is applied to inputs (#40881)
It turns out that `<input>` and `<button>` elements do not inherit the
`font-family` style from `<body>` by default, but rather use a
user-agent defined style. This means that their font-family might be
different than the one used in the rest of the page.

This commit fixes it by ensuring `<input>` (and other) elements inherit
their `font-family` style from their parent element.

Before: ![inputs font before][1]
After: ![inputs font after][2]

(The difference in font is subtle, but it's there.)

[1]: https://user-images.githubusercontent.com/8604205/107853245-76bae980-6e1d-11eb-8318-e5f6e13876cc.png
[2]: https://user-images.githubusercontent.com/8604205/107853246-77538000-6e1d-11eb-86f2-e3e7e41158f5.png

PR Close #40881
2021-02-19 09:14:59 -08:00
George Kalpakas 7bcef26852 refactor(docs-infra): remove unnecessary `font-family` styles (#40881)
This commit removes some unnecessary styles setting `font-family` to
`$main-font`. These styles are redundant, because the targeted elements
already inherit this style from `<body>`.

PR Close #40881
2021-02-19 09:14:59 -08:00
George Kalpakas 90a61618c7 refactor(docs-infra): remove unused CSS for the version selector (#40881)
This commit removes some CSS rules targeting `.doc-version select` in
the sidenav. These rules do not match any elements any more, since now
we use a custom `<aio-select>` component (instead of the `<select>`
element).

PR Close #40881
2021-02-19 09:14:59 -08:00
George Kalpakas 64efe38d66 fix(docs-infra): merge `docs` with `guide` and `start` with `tutorial` in search-results (#40881)
Previously, the `docs.md` guide was appearing under "OTHER" in search
results and the results for the `/start*` tutorial pages were appearing
under "START".

This commit changes this so that `docs.md` appears under "GUIDES" and
`/start*` appear under "TUTORIALS", since that is where they belong
conceptually.

It also changes the header of the guides search-area from "GUIDE" to
"GUIDES" and that of tutorials from "TUTORIAL" to "TUTORIALS".

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

[1]: https://user-images.githubusercontent.com/8604205/107811568-0ce80480-6d77-11eb-8652-e7a947c36e63.png
[2]: https://user-images.githubusercontent.com/8604205/107811569-0eb1c800-6d77-11eb-9a69-0000a3703c8a.png

PR Close #40881
2021-02-19 09:14:59 -08:00
George Kalpakas 4fac4a8880 fix(docs-infra): show the "Errors List" page under "ERRORS" in search results (#40881)
Previously, the "Errors List" page was appearing under the "OTHER"
section in search results.

This commit fixes this to make it appear under the "ERRORS" section.

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

[1]: https://user-images.githubusercontent.com/8604205/107691151-c1b8ed80-6cb3-11eb-8079-fcace685f0ec.png
[2]: https://user-images.githubusercontent.com/8604205/107691145-bfef2a00-6cb3-11eb-8523-b2747fa40469.png

PR Close #40881
2021-02-19 09:14:59 -08:00
George Kalpakas fb58a2bd54 fix(docs-infra): use relative URLs for internal links on error pages (#40881)
Previously, some of the links on the error pages had URLs prefixed with
`https://angular.io/`. This caused them to be treated as external URLs,
which had the following downsides:
- Links would always point to `angular.io` instead of the same version
  as the error page (e.g. `next.angular.io` or `v11.angular.io`).
- Dgeni would not be able to check that the URLs are valid (i.e. point
  to existing pages).
- An external link icon would incorrectly be shown next to the links on
  `angular.io`.

This commit fixes the links to use relative URLs.

PR Close #40881
2021-02-19 09:14:59 -08:00
George Kalpakas 51c7d32c09 fix(docs-infra): show external link icons for external links on error pages (#40881)
This commit adds error pages to the list of docs pages that have an
external link icon next to links to external URLs.

PR Close #40881
2021-02-19 09:14:59 -08:00
Kapunahele Wong d0b6270990 docs: edit Component lifecycle title (#40894)
PR Close #40894
2021-02-19 09:10:37 -08:00
Amadou Sall aed2782c4a docs: the token should be associated with LibHeaderComponent (#40922)
PR Close #40922
2021-02-19 09:07:00 -08:00
Kapunahele Wong 30d5e25a28 docs: edit attribute-directives.md, move best practice to styleguide (#39849)
PR Close #39849
2021-02-19 08:14:54 -08:00
DerekRTP 65baac6055 docs: update attribute-binding.md to correctly describe [attr.binding] rules (#40878)
PR Close #40878
2021-02-17 17:05:17 -08:00