Commit Graph

921 Commits

Author SHA1 Message Date
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 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
George Kalpakas 013f7be0bc fix(docs-infra): fix top padding of main content when a notification is visible (#40802)
This commit fixes the top padding of the main content on the homepage
and other pages when a notification is visible at the top of the page.
The problem was particularly obvious on the homepage (see images below).

Before: ![homepage top-right before][1]
After: ![homepage top-right after][2]

[1]: https://user-images.githubusercontent.com/8604205/107394349-74e2e480-6b04-11eb-8853-71a153cdc459.png
[2]: https://user-images.githubusercontent.com/8604205/107394336-71e7f400-6b04-11eb-9ef0-ff82f6f27875.png

PR Close #40802
2021-02-16 08:39:49 -08:00
George Kalpakas fae0f1f213 fix(docs-infra): fix placement of TOC hover/active markers (dots) (#40802)
This commit fixes the placement of the TOC hover/active markers (dots)
so that they are horizontally in the middle of the marker "rail" and
vertically in the middle of the item's first line.

This commit also refactors the `_toc.scss` to be more DRY (wrt styling
the TOC markers/marker rail) and uses Sass variables and mixins to
ensure that the styling is kept up-to-date wrt future typography changes
to TOC items.

Before: ![toc marker before][1]
After: ![toc marker after][2]

[1]: https://user-images.githubusercontent.com/8604205/107270751-03e3f400-6a54-11eb-9d77-5b0a3cfb1c2b.png
[2]: https://user-images.githubusercontent.com/8604205/107270758-047c8a80-6a54-11eb-82c0-98b832c109a3.png

PR Close #40802
2021-02-16 08:39:49 -08:00
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
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
George Kalpakas 089a634053 refactor(docs-infra): use a single CSS class to target the API list container (#40704)
Previously, the API list container (in the template of the
`<aio-api-list>` component) had three different CSS classes
(`.api-list-container`, `.docs-content`, `.l-content-small`) that were
all used for styling it. This seemed unnecessary and made it more difficult
to see what styles were applied to the container.

This commit removes the extra classes and consolidates the styles under
the `.api-list-container` class (which was the most descriptive one).

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas defcd50b05 refactor(docs-infra): scope API list styles to the `<aio-api-list>` element (#40704)
This commit ensures that all styles for the API list page (which are
defined in `_api-list.scss`) only apply to elements inside an
`<aio-api-list>` element. This will prevent the styles accidentally
taking effect on a different part of the app.

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas ae1a00760d refactor(docs-infra): move common `.code-anchor` styles to `_code.scss` (#40704)
The `.code-anchor` class can be used anywhere where we have code
examples (including API pages and docs guides). Previously, global
styles for `.code-anchor` were defined in `_api-list.scss` (i.e. the
styles from `_api-list.scss` were also applied to `.code-anchor`
elements in other pages/components).

This commit moves the `.code-anchor` styles to `_code.scss`, which
contains other common code-related styles.

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas 60f6e177b8 refactor(docs-infra): move common `.symbol` styles to `_api-symbols.scss` (#40704)
The `.symbol` CSS class (which is primarily used to denote the type of
API symbols - classes, functions, interfaces, etc.) are used in several
places:
- In the API list page (with the corresponding styles defined in
  `_api-list.scss`).
- In search results (with the corresponding styles defined in
  `_errors.scss`).
- In error list page (with the corresponding styles defined in
  `search-results.scss`).
- In the `<aio-select>` component (with the corresponding styles defined
  in `_select-menu.scss`).

Previously, global styles for `.symbol` were defined in `_api-list.scss`
(i.e. the styles from `_api-list.scss` were also applied to `.symbol`
elements in other places/components). Also, some of the SCSS files
mentioned above defined some duplicate styles for `.symbol`.

This commit moves the `.symbol` styles to a new `_api-symbols.scss`
file, which contains common symbol-related styles.

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas bf63d92ea6 refactor(docs-infra): merge style rules in `_api-list.scss` (#40704)
This commit cleans up the styles in `_api-list.scss` by merging together
blocks that target the same elements.

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas d214e79485 refactor(docs-infra): remove unused styles from `_api-list.scss` (#40704)
This commit removes some styles from `_api-list.scss` that are no longer
used (i.e. either their CSS selectors do not match any element in the
app or they are overridden by other rules).

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas 3224c52503 refactor(docs-infra): scope TOC styles to the `<aio-toc>` element (#40704)
This commit ensures that all styles for the TOC (which are defined in
`_toc.scss`) only apply to elements inside an `<aio-toc>` element. This
will prevent the styles accidentally taking effect on a different part
of the app.

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas 67257aa64b refactor(docs-infra): merge style rules in `_toc.scss` (#40704)
This commit cleans up the styles in `_toc.scss` by merging together
blocks that target the same elements.

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas b0cf35b8ff refactor(docs-infra): scope select-menu styles to the `<aio-select>` element (#40704)
This commit ensures that all styles for the select-menu element (which
are defined in `_select-menu.scss`) only apply to elements inside an
`<aio-select>` element. This will prevent the styles accidentally taking
effect on a different part of the app.

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas 862fe82712 refactor(docs-infra): scope Resources styles to the `<aio-resource-list>` element (#40704)
This commit ensures that all styles for the "Resources" page (which are
defined in `_resources.scss`) only apply to elements inside an
`<aio-resource-list>` element. This will prevent the styles accidentally
taking effect on a different part of the app.

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas f1c7d2b865 refactor(docs-infra): merge style rules in `_resources.scss` (#40704)
This commit cleans up the styles in `_resources.scss` by merging
together blocks that target the same elements.

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas 8528717892 refactor(docs-infra): remove unused styles from `_resources.scss` (#40704)
This commit removes some styles from `_resources.scss` that are no
longer used (i.e. either their CSS selectors do not match any element in
the app or they are overridden by other rules).

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas becb8e751e refactor(docs-infra): merge style rules in `_presskit.scss` (#40704)
This commit cleans up the styles in `_presskit.scss` by merging together
blocks that target the same elements.

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas c3a81916c9 refactor(docs-infra): merge style rules in `_label.scss` (#40704)
This commit cleans up the styles in `_label.scss` by merging together
blocks that target the same elements.

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas 8a723daf6a refactor(docs-infra): remove unused styles from `_label.scss` (#40704)
This commit removes some styles from `_label.scss` that are no longer
used (i.e. their CSS selectors do not match any element in the app).

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas 8beb9ae94f refactor(docs-infra): fix indentation in `_label.scss` (#40704)
This commit makes the indentation in `_label.scss` consistent with that
in most other `.scss` files in `aio/`.

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas 489010c00a refactor(docs-infra): remove unused `_edit-page-cta.scss` file (#40704)
This commit removes the `_edit-page-cta.scss` file, which is no longer
used (i.e. the rules it contains do not match any element in the app).

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas 59c9825be7 refactor(docs-infra): merge style rules in `_details.scss` (#40704)
This commit cleans up the styles in `_details.scss` by merging
together blocks that target the same elements.

It also changes the `summary` selector to `details > summary`, but that
should not make any difference in practice, since `<summary>` elements
always appear as direct childs of `<details>`.

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas 7d45667873 refactor(docs-infra): scope contributor-list styles to the `<aio-contributor-list>` element (#40704)
This commit ensures that all styles for the contributor list (which are
defined in `_contributor.scss`) only apply to elements inside an
`<aio-contributor-list>` element. This will prevent the styles
accidentally taking effect on a different part of the app.

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas cb4b8d9ab4 refactor(docs-infra): remove unused styles from `_contributor.scss` (#40704)
This commit removes some styles from `_contributor.scss` that are no
longer used (i.e. either their CSS selectors do not match any element in
the app or they are overridden by other rules).

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas 852010e31a refactor(docs-infra): scope code example styles to the `<aio-code>` element (#40704)
This commit ensures that all styles for the code examples (which are
defined in `_code.scss`) only apply to elements inside an `<aio-code>`
element. This will prevent the styles accidentally taking effect on a
different part of the app.

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas b2ee4e2091 refactor(docs-infra): merge style rules in `_code.scss` (#40704)
This commit cleans up the styles in `_code.scss` by merging together
blocks that target the same elements.

It also normalizes the rules targeting Angular Material tabs to use
consistent selectors and use class names instead of tag names.

PR Close #40704
2021-02-09 10:47:19 -08:00
George Kalpakas 72814f9dc5 refactor(docs-infra): remove unused styles from `_code.scss` (#40704)
This commit removes some styles from `_code.scss` that are no longer
used (i.e. either their CSS selectors do not match any element in the
app or they are overridden by other rules).

PR Close #40704
2021-02-09 10:47:18 -08:00
George Kalpakas 6357532c59 refactor(docs-infra): move common `.group-buttons` styles to `_buttons.scss` (#40704)
Both `<aio-contributor-list>` and `<aio-resource-list>` contain
`.group-buttons` elements. Previously, global styles for
`.group-buttons` were defined in `_contributor.scss` (i.e. the styles
from `_contributor.scss` were also applied to `.group-buttons` in
`<aio-resource-list>`). Also, `_contributor.scss` and `_resources.scss`
defined some duplicate styles for `.group-buttons`.

This commit moves the `.group-buttons` styles to `_buttons.scss`, which
contains common button-related styles.

PR Close #40704
2021-02-09 10:47:18 -08:00
George Kalpakas b258b2901c refactor(docs-infra): scope top-menu styles to the `.app-toolbar` element (#40704)
This commit ensures that all styles for the app top-menu (which are
defined in `_top-menu.scss`) only apply to elements inside an
`.app-toolbar` element. This will prevent the styles accidentally taking
effect on a different part of the app.

PR Close #40704
2021-02-09 10:47:18 -08:00
George Kalpakas e3f5f9331b refactor(docs-infra): merge style rules in `_top-menu.scss` (#40704)
This commit cleans up the styles in `_top-menu.scss` by merging
together blocks that target the same elements.

It also makes similar changes to selectors in `_notification.scss` rules
that override top-menu styles (for consistency).

PR Close #40704
2021-02-09 10:47:18 -08:00
George Kalpakas c9a40257d4 refactor(docs-infra): scope nav-item styles to the `<aio-nav-item>` element (#40704)
This commit ensures that all styles for the sidenav nav-items (which are
defined in `_sidenav.scss`) only apply to elements inside an
`<aio-nav-item>` element. This will prevent the styles accidentally
taking effect on a different part of the app.

PR Close #40704
2021-02-09 10:47:18 -08:00
George Kalpakas e043e52a4f refactor(docs-infra): merge style rules in `_sidenav.scss` (#40704)
This commit cleans up the styles in `_sidenav.scss` by merging
together blocks that target the same elements.

It also applies the equivalent changes in `_notification.scss` rules
that override sidenav styles.

PR Close #40704
2021-02-09 10:47:18 -08:00
George Kalpakas c8b30f4fd9 refactor(docs-infra): remove unused styles from `_sidenav.scss` (#40704)
This commit removes some styles from `_sidenav.scss` that are no longer
used (i.e. either their CSS selectors do not match any element in the
app or they are overridden by other rules).

PR Close #40704
2021-02-09 10:47:18 -08:00
George Kalpakas d30b235522 refactor(docs-infra): remove unused styles from `_layout-global.scss` (#40704)
This commit removes some styles from `_layout-global.scss` that are no
longer used (i.e. either their CSS selectors do not match any element in
the app or they are overridden by other rules).

PR Close #40704
2021-02-09 10:47:18 -08:00
George Kalpakas 7777bc5018 refactor(docs-infra): scope footer styles to the `<aio-footer>` element (#40704)
This commit ensures that all styles for the page footer (which are
defined in `_footer.scss`) only apply to elements inside an
`<aio-footer>` element. This will prevent the styles accidentally taking
effect on a different part of the app.

PR Close #40704
2021-02-09 10:47:18 -08:00
George Kalpakas 568ecf352b refactor(docs-infra): merge style rules in `_footer.scss` (#40704)
This commit cleans up the styles in `_footer.scss` by merging together
blocks that target the same elements.

PR Close #40704
2021-02-09 10:47:18 -08:00
George Kalpakas f059824b17 refactor(docs-infra): remove unused styles from `_footer.scss` (#40704)
This commit removes some styles from `_footer.scss` that are no longer
used (i.e. either their CSS selectors do not match any element in the
app or they are overridden by other rules).

PR Close #40704
2021-02-09 10:47:18 -08:00
George Kalpakas 512a17db5d refactor(docs-infra): remove unused styles from `_content-layout.scss` (#40704)
This commit removes some styles from `_content-layout.scss` that are no
longer used (i.e. either their CSS selectors do not match any element in
the app or they are overridden by other rules).

PR Close #40704
2021-02-09 10:47:18 -08:00
Enea Jahollari c9fa59ac1f fix(docs-infra): switch code font from `Droid Sans Mono` to `Roboto Mono` (#40667)
`Droid Sans Mono` didn't look good on some screens.

Fixes #40666

PR Close #40667
2021-02-04 10:48:29 -08:00
George Kalpakas 11ca2f04f9 refactor(docs-infra): remove unused styles for `.heading` CSS class (#40427)
This commit removes some styles for the `.heading` CSS class which do
not have any effect (either because they are overridden in other rules
or because they do not make any difference).

NOTE:
The `.heading` class is kept in the HTML to make it easier to associate
the `.heading-children` element with its corresponding `.heading`
parent.

PR Close #40427
2021-02-02 12:04:55 -08:00
George Kalpakas d6ab339127 refactor(docs-infra): simplify the CSS rules for styling the "collapsed/expanded" sidenav icons (#40427)
This commit simplifies the styling of the "collapsed/expanded" icons in
sidenav nav-items with children by consolidating the CSS rules in one
block (instead of having duplicate blocks for different levels).

PR Close #40427
2021-02-02 12:04:55 -08:00
George Kalpakas 8736fcd3d9 fix(docs-infra): fix the styling of the cards in docs introduction page (#40427)
This commit fixes the layout and appearance of the cards shown in the
docs introduction page (`/docs`) in the following ways:

- Center the cards.
- Ensure two cards are shown per line (instead of 3 one the first line
  and 1 on the second).
- Adjust their widths to ensure their content fits well in them
  (given that the cards have a fixed height).
- Use more engaging styles to better indicate that the cards are
  clickable (as discussed [here][1]).

[1]: https://github.com/angular/angular/pull/40427#discussion_r560688953

PR Close #40427
2021-02-02 12:04:55 -08:00
George Kalpakas 6adf582510 refactor(docs-infra): clean up styles in `_card.scss` (#40427)
This commit cleans up the styles in `_card.scss` by:
- Fixing incosistenct indentation/newlines.
- Removing rules for unused selectors.
- Removing unnecessary styles.

PR Close #40427
2021-02-02 12:04:55 -08:00
George Kalpakas 7379caa4b2 fix(docs-infra): improve legibility and focus on content (#40427)
This commit changes the layout of the main content to improve
legibility, especially on wider screens:

- Limit main content width to 50em (800px by default).
- Center main content on the page.

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

PR Close #40427
2021-02-02 12:04:55 -08:00
George Kalpakas 1e95c41069 fix(docs-infra): improve typography styles (incl. bigger font size/line height) (#40427)
Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40427
2021-02-02 12:04:55 -08:00
George Kalpakas de1fd4b10d fix(docs-infra): make content links more prominent on hover (#40427)
Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40427
2021-02-02 12:04:55 -08:00
George Kalpakas a086976d68 fix(docs-infra): improve heading styles (#40427)
This commit includes some general improvements to heading styles
(font-weight, margin/padding). It also adds a horizontal separator above
`<h2>` headings to segment important sections more easily.
(As a consequence, we can remove several `<hr />` elements right before
`<h2>` headings.)

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

PR Close #40427
2021-02-02 12:04:55 -08:00
George Kalpakas 6e42d67c38 fix(docs-infra): fix padding in sidenav and ensure all nav-items have equal height (#40427)
This commit improves the padding nav-menus and nav-items in the sidenav.
It also ensures that all nav-items have the same height, regardless of
their level and of whether they have children or not.

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

PR Close #40427
2021-02-02 12:04:55 -08:00
George Kalpakas e6bed90e6e fix(docs-infra): remove uppercase style from sidenav nav-items (#40427)
Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40427
2021-02-02 12:04:55 -08:00
George Kalpakas 35cb39d75b fix(docs-infra): update the sidenav background to better distinguish from main content (#40427)
Previously, we used a box-shadow to indicate that the sidenav is
separate from the main content.

This commits updates the sidenav styling to remove the shadow and give
it a slightly different background color instead.

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

PR Close #40427
2021-02-02 12:04:55 -08:00
Pete Bacon Darwin d4f42b3223 build(docs-infra): implement `@reviewed` tag definition (#40582)
The `@reviewed` tag can be used to specify the date when the
document was last reviewed.

PR Close #40582
2021-01-28 09:04:49 -08:00
twerske 3cfb4b4ef9 docs: add embedded videos to error guides (#40453)
add embedded youtube videos
provide visual debugging for top errors

PR Close #40453
2021-01-20 08:47:00 -08:00
George Kalpakas 96690ed3a4 feat(docs-infra): add shortcuts for the angular.io PWA (#40393)
This commits adds some shortcut definitions for the angular.io PWA. The
user agent can use them to assemble a context menu to be displayed by
the operating system when a user engages with the app's icon. (In
addition, shortcuts provide an easy way for users to add links to
specific pages on their home screen.)

See [here][1] for more details on the `shortcuts` property of the PWA
manifest.

The choice of pages to create shortcuts to was influenced by the
following facts/criteria:
- It seems that only the first 4 shortcuts are displayed by Chrome (at
  least on my Android phone).
- Since the PWA is mostly used on mobile, I omitted pages that are less
  likely to be useful for mobile users (such as pages related to CLI).

[1]: https://developer.mozilla.org/en-US/docs/Web/Manifest/shortcuts

PR Close #40393
2021-01-15 10:38:39 -08:00
George Kalpakas 4065c98054 refactor(docs-infra): more some `pwa-manifest.json` keys to the top to improve readability (#40393)
This commit moves some properties with simple, string values in
`pwa-manifest.json` to the top (i.e. above the more lengthy `icons`
array) to make them easier to discover.

PR Close #40393
2021-01-15 10:38:39 -08:00
twerske fbfd4889a9 build(docs-infra): error guides in docs (#40060)
add /errors to docs
create formatting for error guides infra

PR Close #40060
2021-01-14 11:28:52 -08:00
Alexey Elin 9be9e466b1 docs: remove duplicated 'the' (#40333)
PR Close #40333
2021-01-07 13:09:34 -08:00
mgechev 9e6b3cffea docs: update homepage headline (#40056)
Reviving @stephenfluin's PR https://github.com/angular/angular/pull/37517

PR Close #40056
2021-01-06 07:02:30 -08:00
Alexey Elin df7ed4160f docs: remove -webkit-transition-timing-function CSS property (#40153)
Angular has stopped to support browser that requires that CSS property.
All supported browsers support standard transition-timing-function CSS property

PR Close #40153
2020-12-21 10:23:58 -08:00
Tasos Alexiou 356a256909 refactor(docs-infra): enable tslint rules for the angular.io app (#39307)
Signed-off-by: Tasos Alexiou <tasos@arrikto.com>

PR Close #39307
2020-12-17 10:02:38 -08:00
Pete Bacon Darwin 0817758b6a feat(docs-infra): add no upcoming events message (#40055)
This commit adds a message that is displayed instead
of the events table if there are no upcoming events.

Fixes #40052

PR Close #40055
2020-12-10 13:46:32 -08:00
George Kalpakas b596366c67 feat(docs-infra): add maskable PWA icon (#39928)
This commit adds a [maskable PWA icon][1] to ensure it looks good on
different devices/platforms. It also improves the PWA Lighthouse score
(from 96 to 100) by passing the [maskable icon audit][2].

For reference, the maskable icon can be previewed [here][3].

[1]: https://web.dev/maskable-icon/
[2]: https://web.dev/maskable-icon-audit
[3]:
https://maskable.app/?demo=https://user-images.githubusercontent.com/8604205/100861028-f16c9d80-3499-11eb-9341-beba69988cfa.png

PR Close #39928
2020-12-02 11:17:53 -08:00
Charles Lyding 318255a5f8 build: support building with TypeScript 4.1 (#39571)
TypeScript 4.1 is now used to build and test within the repository.

PR Close #39571
2020-11-25 11:10:01 -08:00
Marcono1234 3e1e5a15ba docs: update links to use HTTPS as protocol (#39718)
PR Close #39718
2020-11-20 12:52:16 -08:00
WilliamKoza b1d300dc26 fix(common): Prefer to use pageXOffset / pageYOffset instance of scrollX / scrollY (#28262)
This fix ensures a better cross-browser compatibility.
This fix has been used for angular.io.

PR Close #28262
2020-11-19 12:22:03 -08:00
George Kalpakas 935cf433ed fix(docs-infra): support recovering from unrecoverable SW states (#39651)
Occasionally, the SW would end up in a broken state where some of the
eagerly cached resources of an older version were available in the local
cache, but others (such as lazy-loaded bundles) were not. This would
leave the app in a broken state and a blank screen would be displayed.
See #28114 for a more detailed discussion.

This commit takes advantage of the newly introduced (in v11)
[SwUpdate#unrecoverable][1] API to detect these bad states and recover
by doing a full page reload whenever an [UnrecoverableStateEvent][2] is
emitted.

Partially addresses #28114.

NOTE:
Currently, `SwUpdate.unrecoverable` only works if the app has already
bootstrapped; i.e. if only lazy-loaded bundles have been purged from the
cache.
That should be fine in practice, since the cache entries are removed in
least-recently-used order. Thus the eagerly loaded bundles will be the
last to be removed from the cache (which rarely happens in practice).

[1]: https://v11.angular.io/api/service-worker/SwUpdate#unrecoverable
[2]: https://v11.angular.io/api/service-worker/UnrecoverableStateEvent

PR Close #39651
2020-11-19 12:13:23 -08:00
George Kalpakas 305d05545a refactor(docs-infra): make `SwUpdatesService` depend on `LocationService` (#39651)
Previously, the `LocationService` depended on the `SwUpdatesService`.
This felt backwards, since `LocationService` is a more low-level and
basic service and should not be depending on a service for a
higher-level, specific feature (ServiceWorkers).

This commit inverses the relation, making `SwUpdatesService` depend on
`LocationService` instead.

PR Close #39651
2020-11-19 12:13:22 -08:00
George Kalpakas 824f051843 test(docs-infra): use existing `MockLogger` class in `SwUpdatesService` tests (#39651)
Since we have a `MockLogger` class in `src/testing/`, there is no need
to create a new `MockLogger` class for the `SwUpdatesService` unit
tests.

This commit switches to using the `MockLogger` class from
`src/testing/`.

PR Close #39651
2020-11-19 12:13:21 -08:00
George Kalpakas 51fe0fe622 build(docs-infra): add new angular.io build configuration for release-candidates (#39470)
This commit adds a new build configuration/deployment mode (`rc`) for
deploying release-candidate versions to angular.io.

This is part of the work needed to prepare angular.io for our
[new versioning/branching process][1] (also tracked in #39366).

[1]: https://docs.google.com/document/d/197kVillDwx-RZtSVOBtPb4BBIAw0E9RT3q3v6DZkykU

PR Close #39470
2020-11-02 07:57:51 -08:00
George Kalpakas 0f584694cc refactor(docs-infra): use Sass mixin to simplify the creation of deployment mode themes (#39470)
Different deployment modes (such as `archive` and `next`) are identified
by the different colors used in prominent elements of the page, such as
the topbar and the footer.

Previously, the necessary styles for creating such a deployment mode
"theme" were duplicated for each mode.

This commit simplifies the creation/modification of a deployment mode
theme by introducing a Sass mixin that generates the necessary styles
(when provided with necessary theme colors).

PR Close #39470
2020-11-02 07:57:51 -08:00
George Kalpakas 5143d52d2b build(docs-infra): switch `deploy-to-firebase.sh` script to JS (#39470)
This commit switches the `deploy-to-firebase.sh` script, that we use for
deploying angular.io to production, from Bash to JavaScript. This makes
the script easier to maintain.

For the same reasons, it also switches the `deploy-to-firebase.test.sh`
script, that we use for testing the `deploy-to-firebase` script, from
Bash to JavaScript (using jasmine as the test runner).

Finally, this commit also updates ShellJS to the latest version to get
better error messages (including the actual error) when `exec()` fails.

NOTE: Before switching the test script to JS, I verified that the new
      `deploy-to-firebase.js` script passed the tests with the old
      `deploy-to-firebase.test.sh` script.

PR Close #39470
2020-11-02 07:57:51 -08:00
Andrew Kushnir 8fd25d9614 docs: remove IE10 references from comments in the code (#39090)
PR Close #39090
2020-10-13 15:51:49 -07:00
Kristiyan Kostadinov 4a1c12c773 feat(core): remove ViewEncapsulation.Native (#38882)
Removes `ViewEncapsulation.Native` which has been deprecated for several major versions.

BREAKING CHANGES:
* `ViewEncapsulation.Native` has been removed. Use `ViewEncapsulation.ShadowDom` instead. Existing
usages will be updated automatically by `ng update`.

PR Close #38882
2020-10-08 11:56:03 -07:00
Chellappan dace4aacb6 docs: fix for HttpRequest expansion panel (#39166)
Fixes #39156

PR Close #39166
2020-10-08 09:38:09 -07:00
George Kalpakas 4fe673d518 fix(docs-infra): better distinguish wrapped headings from other entries in TOC (#39092)
Previously, when a heading was longer than the Table of Content's  (TOC)
width and it had to be wrapped into multiple lines, it was hard to
distinguish the subsequent lines from other TOC entries (i.e. other
headings).

This commit makes it easier to visually distinguish wrapped heading
lines from other headings by reducing the spacing between wrapped lines
of the same heading (making it more obvious that they belong together).

PR Close #39092
2020-10-02 10:59:41 -07:00
George Kalpakas 26574a7c46 build(docs-infra): remove the `only-arrow-functions` tslint rule to align with CLI (#39018)
This commit removes the `only-arrow-functions: false` tslint rule to
more closely align `tslint.json` with the one generated by the latest
Angular CLI for new apps.

PR Close #39018
2020-10-01 09:32:57 -07:00
George Kalpakas a7e1eb5312 build(docs-infra): update the `object-literal-key-quotes` tslint rule to align with CLI (#39018)
This commit updates the `object-literal-key-quotes` tslint rule to more
closely align `tslint.json` with the one generated by the latest Angular
CLI for new apps.

PR Close #39018
2020-10-01 09:32:57 -07:00
George Kalpakas 2cc3ac0299 build(docs-infra): remove the `no-string-literal` tslint rule to align with CLI (#39018)
This commit removes the `no-string-literal: false` tslint rule to
more closely align `tslint.json` with the one generated by the latest
Angular CLI for new apps.

PR Close #39018
2020-10-01 09:32:57 -07:00
George Kalpakas be98a45dd9 build(docs-infra): enable the `no-redundant-jsdoc` tslint rule to align with CLI (#39018)
This commit enables the `no-redundant-jsdoc` tslint rule to more closely
align `tslint.json` with the one generated by the latest Angular CLI for
new apps.

PR Close #39018
2020-10-01 09:32:57 -07:00
George Kalpakas e2997ed5ee build(docs-infra): update TypeScript and other deps to align with latest CLI (#39017)
This commit updates TypeScript and other dependencies used in angular.io
to more closely align with new apps created with the latest Angular CLI.
It also updates `tsconfig.json`, re-ordering some properties around and
introducing some more checks (again to more closely match new CLI apps).

NOTE:
I skipped updating RxJS from 6.5.4 to 6.6.3, because it increased the
main bundle by ~500B.

NOTE:
`tslint.json` will be updated in a subsequent PR, because it requires
more extensive changes.

PR Close #39017
2020-09-28 16:28:04 -04:00
Kapunahele Wong dfbfabc052 fix(docs-infra): remove scrollbar styles for accessibility (#38852)
This commit removes the scrollbar styles so that the default
styles in the browser render. This widens the webkit scroll bar.
This makes it easier to grab the scrollbar using assistive
technology and devices, and provides a wider target for
those who have dexterity issues. By removing these styles,
We will no longer have to maintain custom scrollbars specific to WebKit
and they will be accessible by default.

PR Close #38852
2020-09-21 12:22:07 -07:00
Sonu Kapoor f3f6a42342 test(docs-infra): replace deprecated `ReflectiveInjector` with `Injector` (#38897)
This commit replaces the old and slow ReflectiveInjector that was
deprecated in v5 with the new Injector.

PR Close #38897
2020-09-21 12:21:27 -07:00
George Kalpakas 41bc2701c4 test(docs-infra): simplify `EventsComponent` tests and add more test cases (#36517)
This commit simplifies the tests of `EventsComponent` (by introducing a
`createMockEvent()` helper and getting rid of the irrelevant `Event`
fields) and adds tests for some more usecases. It also makes the tests
more robust by using Jasmine's `Clock` to mock the current date.

PR Close #36517
2020-09-16 15:14:24 -07:00
ajitsinghkaler 5b33798796 feat(docs-infra): created new widget for events page (#36517)
Data in events page was hardcoded and it is manually moved in the table.

Created a new events widget which will automatically move past and upcoming
events from events.json (`aio/content/marketing/events.json`) file to the
relevant table in the events tab

PR Close #36517
2020-09-16 15:14:18 -07:00