Commit Graph

736 Commits

Author SHA1 Message Date
George Kalpakas 090732fc2d fix(docs-infra): show hamburger button on getting started guide (#32941)
In 1c3ee4190, the `getting-started` guide/tutorial was renamed to
`start`, but the corresponding CSS class that controls the display of
the top-left hamburger (and it automatically derived based on the URL)
was not updated.

This commit updates the class to ensure that the hamburger is not hidden
when navigating to the getting started guide.

PR Close #32941
2019-10-02 09:20:22 -07:00
George Kalpakas 85990c3213 fix(docs-infra): correctly run on IE11 (#32871)
Since 007282d2b, [TocService][1] uses [forEach()][2] to iterate over a
`NodeList`. This breaks in IE11, which does not support
`NodeList#forEach()`.

This commit wraps the returned `NodeList` in a regular `Array` to have
access to array methods (such as `forEach()`).

Fixes #32832

[1]: https://github.com/angular/angular/blob/fbad4ff65/aio/src/app/shared/toc.service.ts#L68
[2]: https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach

PR Close #32871
2019-09-26 17:05:38 -07:00
Carlos Ortiz García 9166baf709 refactor(core): Migrate TestBed.get to TestBed.inject (#32382)
This is cleanup/followup for PR #32200

PR Close #32382
2019-09-09 19:10:54 -04:00
George Kalpakas d4003452c7 fix(docs-infra): do not include GitHub links in Table of Content (#32418)
The docs template for cli commands ([cli-command.template.html][1])
includes an `h2` element with GitHub links for [long description][2].
Since the content of `h2` elements is replicated in the auto-generated
Table of Contents, the GitHub links were replicated as well (which is
undesirable).

This commit fixes it by explicitly excluding `.github-links` elements,
when extracting the content for the ToC (in
[TocService#extractHeadingSafeHtml()][3]). This is similar to what we do
for the auto-generated `.header-link` anchors.

[1]: https://github.com/angular/angular/blob/1537791f0/aio/tools/transforms/templates/cli/cli-command.template.html
[2]: https://github.com/angular/angular/blob/1537791f0/aio/tools/transforms/templates/cli/cli-command.template.html#L18
[3]: https://github.com/angular/angular/blob/1537791f0/aio/src/app/shared/toc.service.ts#L56

PR Close #32418
2019-09-05 13:33:06 -04:00
George Kalpakas 007282d2bb fix(docs-infra): exclude heading anchor icon text from ToC tooltips (#32418)
The Table of Contents (ToC) is auto-generated based on the content of
heading elements on the page. At the same time, anchor links are
auto-generated and added to each heading element. Note that the Material
Icons used for the anchor icon make use of ligatures, which means that
the icons are specified by using their textual name as text content of
the icon element. As a result, the name of the icon is included in the
parent element's `textContent`.

Previously, the `TocService` used to strip off these anchor elements
when generating the content of ToC items, but not when generating the
content of their tooltips. Thus, tooltips for ToC items would
confusingly include a `link` suffix (`link` is the textual name of the
icon used in heading anchor links).

This commit fixes this by deriving the tooltip content from the
transformed text content (which already has anchor links stripped off),
instead of from the original heading content.

PR Close #32418
2019-09-05 13:33:06 -04:00
Carlos Ortiz García 3aba7ebe6a feat(core): Introduce TestBed.inject to replace TestBed.get (#32200)
TestBed.get is not type safe, fixing it would be a massive breaking
change. The Angular team has proposed replacing it with TestBed.inject
and deprecate TestBed.get.

Deprecation from TestBed.get will come as a separate commit.

Issue #26491
Fixes #29905

BREAKING CHANGE: Injector.get now accepts abstract classes to return
type-safe values. Previous implementation returned `any` through the
deprecated implementation.

PR Close #32200
2019-08-28 21:26:46 -07:00
Kapunahele Wong 984d23f687 fix(docs-infra): fix broken toc ul styles (#32124)
Fixes #32027

PR Close #32124
2019-08-14 12:01:17 -07:00
Stefanie Fluin 382d3ed1d2 fix(docs-infra): ui polish (#31013)
- Change margin to the header so that the the label aligns with the header
- Make code in API pages pre-wrap so that you can see the actual text on the screen - helps with issue #27296
- Modified text to be title case in label API to be consistent with rest of app labels
- Removed unused table of contents SCSS file
- TOC SCSS file reorg cleanup
- Soften headers font-weight in API pages
- Make linenums ordered list inside code examples always show as numbers

PR Close #31013
2019-08-05 12:53:02 -07:00
George Kalpakas dd0be7feb7 fix(docs-infra): always default to no linenums in `<aio-code>` (#31674)
Previously, `linenums` defaulted to true if the content was more than 10
lines long and false otherwise.

Since in most cases linenums add unnecessary visual noise, this commit
changes `linenums` to always default to false (regardless of the size of
the content). It can be still be turned on by explicitly setting to true
or a number.

PR Close #31674
2019-07-24 14:38:54 -07:00
Stefanie Fluin c845a7b887 fix(docs-infra): fix logo to have branded red color (#31663)
Replace logo nav 2x logo file with one that has the correct branding red color in shield

PR Close #31663
2019-07-22 09:54:00 -07:00
Stefanie Fluin b9a94c6d02 fix(docs-infra): improve small screen experience for docs cards layout (#31576)
- Make docs cards expand to full width in smaller screen sizes.
- Reduce spacing around card container to match general spacing patterns seen in angular.io.
- Improve SCSS formatting.

PR Close #31576
2019-07-22 09:51:11 -07:00
Stefanie Fluin ebc71f7caa fix(docs-infra): fix mobile toc styles (#31533)
Return mobile toc styles from bug in PR#31013
Give docs pages header a width limit so it does not run into the Github icon link

PR Close #31533
2019-07-22 09:50:21 -07:00
George Kalpakas b66d82e308 build(docs-infra): upgrade jasmine-/karma-related dependencies (#31527)
Note: `jasmine-ts` is intentionally held back at 0.2.1, because of a bug
in 0.3.0: svi3c/jasmine-ts#33

PR Close #31527
2019-07-18 10:17:13 -07:00
George Kalpakas d7ca263cc4 test(docs-infra): run tests in random order (and make them pass) (#31527)
This commit updates the necessary config files to run the angular.io and
docs tooling unit tests in random order (and fixes the tests that were
failing due to their dependence on the previous ordered execution).

Besides being a good idea anyway, running tests in random order is the
new [default behavior in jasmine@3.0.0][1], so this commit is in
preparation of upgrading jasmine to the latest version.

[1]: https://github.com/jasmine/jasmine/blob/v3.0.0/release_notes/3.0.md#breaking-changes

PR Close #31527
2019-07-18 10:17:13 -07:00
Stefanie Fluin 3a09d01c63 fix(docs-infra): fix API list search color and styles (#31272)
- Add more spacing to inputs.
- Correct placeholder colors in inputs.
- Add aria label to input for accessibility.
- Clean up layout styles and mobile view.

Fixes #31265

PR Close #31272
2019-07-12 17:55:02 -04:00
Stefanie Fluin a55c6df07b feat(docs-infra): add prominent archive mode banner styling (#31245)
Fixes #25968

PR Close #31245
2019-07-11 13:00:11 -04:00
Stefanie Fluin d33204956f fix(docs-infra): fix code hover style in TOC (#31173)
Fixes #31170

PR Close #31173
2019-07-11 12:57:32 -04:00
Tzvi Melamed 66d6b53fb1 fix(docs-infra): fix get started button rendering (#31470)
Fixes #31454

PR Close #31470
2019-07-11 12:56:29 -04:00
George Kalpakas e85fa5d4ff fix(docs-infra): fix layout of `file-not-found` page (#31390)
The `.sidenav-content` element, [which is also][1] the `#file-not-found`
element, [already has][2] the necessary padding. Especially the top
padding is important to ensure the element is not obscured by the
top-bar.

[1]: https://github.com/angular/angular/blob/1d3e22766/aio/src/app/app.component.html#L51
[2]: https://github.com/angular/angular/blob/1d3e22766/aio/src/styles/1-layouts/_content-layout.scss#L10

PR Close #31390
2019-07-11 12:15:34 -04:00
George Kalpakas 0c00c94f34 test(docs-infra): clean up global listeners after `ScrollService` tests (#31390)
The `ScrollService` sets up some global `window` listeners.

Previously, these listeners were never unregistered. This was not a
problem in the real app, because the `ScrollService` instance exists for
the lifetime of a user session. In tests, however, where the `window`
instance is among all tests, the listeners would survive the
`ScrollService` tests. This, in addition to the fact that we used a mock
`ViewportScroller` which did not return the expected type from
`getScrollPosition()`, caused errors to be thrown in unrelated tests
(i.e. whenever a scroll event was emitted on `window`). See [here][1]
for an example failure.

This commit fixes it by adding an `ngOnDestroy()` method that
unregisters the listeners and ensuring it is called after each
`ScrollService` test.

[1]: https://circleci.com/gh/angular/angular/381649

PR Close #31390
2019-07-11 12:15:34 -04:00
George Kalpakas 9b29ca95a2 fix(docs-infra): show (and style correctly) the 'No results found' message (#31390)
PR Close #31390
2019-07-11 12:15:34 -04:00
George Kalpakas 479d926b4b fix(docs-infra): improve `search-results` layout on smaller screens (#31390)
Previously, the `search-results` layout was switch from horizontal to
vertical at 480px. Yes, since some search queries can yield more than 5
`.search-area`s, even 600px are too narrow to accomodate a horizontal
layout.

This commit changes the breakpoint at which the layout switches to
vertical from 480px to 600px.

PR Close #31390
2019-07-11 12:15:34 -04:00
George Kalpakas b9195289a5 fix(docs-infra): remove redundant `search-results` styles (#31390)
Previously, `.search-area` had a default style of `display: flex`, but
it was overriden to `display: block` in media queries for
`max-width: 480px` and `min-width: 600px`. As a result, it only had
`display: flex` between 481px and 599px.

Since no flex layout features are necessary inside `.search-area`, this
commit changes the style to always be `display: block` (i.e. the default
for `div` elements).

PR Close #31390
2019-07-11 12:15:34 -04:00
George Kalpakas 75b6b0e1ba refactor(docs-infra): clean up `aio-search-results` styles (#31390)
PR Close #31390
2019-07-11 12:15:34 -04:00
George Kalpakas 2d4f507b61 style(docs-infra): make indentation in `_search-results.scss` consistent with other `.scss` files (#31390)
PR Close #31390
2019-07-11 12:15:34 -04:00
George Kalpakas 00ecfc7f9a fix(docs-infra): separate vendor-specific CSS selectors (#31252)
In #31118, some vendor-specific selectors were combined in one rule-set.
As pointed out in [this comment][1], this would result in the whole
rule-set being ignored by all browsers, since one invalid/unrecognized
selector invalidates the declaration block.

This commit fixes it by defining a separate rule-set per selector. The
list of vendor-specific selectors is also adjusted to better target the
currently supported browsers.

[1]: https://github.com/angular/angular/pull/31118/files#r296923652

PR Close #31252
2019-06-25 10:25:31 -07:00
George Kalpakas 6ff3970ec7 style(docs-infra): clean up some styles (#31252)
PR Close #31252
2019-06-25 10:25:31 -07:00
Stefanie Fluin f7e9659c4d fix(docs-infra): return full width highlight to sidenav (#31246)
PR Close #31246
2019-06-24 20:17:27 -07:00
Stefanie Fluin 65974154e2 feat(docs-infra): change typography font sizes to be rem based (#31118)
PR Close #31118
2019-06-21 14:22:20 -07:00
Vani 5909c442b7 docs: update group() link to point to the animations group API (#30618)
PR Close #30618
2019-06-18 10:49:46 -07:00
Stefanie Fluin c52ade2878 fix(docs-infra): fix search result header color (#30924)
PR Close #30924
2019-06-17 16:33:53 -07:00
Alan 82e0b4a4fb fix(docs-infra): enable only vertical scrolling for contributors bio (#30991)
- `auto` will enable scrolling only when needed
- `overflow-y` will ensure to keep the scrolling horizontally only

PR Close #30991
2019-06-12 11:47:13 -07:00
Stefanie Fluin 699283c4ee feat(docs-infra): layout ui polish (#30883)
PR Close #30883
2019-06-11 14:20:35 -07:00
George Kalpakas 87b1a2af4d refactor(docs-infra): avoid hard-coding URLs to redirect on archive mode (#30894)
Related discussion:
https://github.com/angular/angular/pull/30894#pullrequestreview-246731995

PR Close #30894
2019-06-11 00:07:43 +00:00
George Kalpakas a2cd401a2e fix(docs-infra): do not redirect docs URLs on archive deployments (#30894)
To avoid showing outdated info (such as events, resources, etc.) but
still allow people to see docs for older versions, we redirect
non-documentation URLs to `/docs`. Recently(-ish) we have added
documentation content under the `/cli/...` and `/start/...`
path-prefixes, but we haven't added them to the list of documentation
URLs that should not be redirected. As a result, on archive deployments
(e.g. https://v7.angular.io/cli), they are redirected to `/docs`, making
it impossible to see the documentation for these versions (unless you
know about the `?mode=stable` work-around).

This commit fixes it by adding `cli` and `start` to the list of
documentation URLs that are excluded from redirection.

PR Close #30894
2019-06-11 00:07:42 +00:00
George Kalpakas 93af1f8456 refactor(docs-infra): make archive redirection tests DRY (#30894)
PR Close #30894
2019-06-11 00:07:42 +00:00
Stefanie Fluin 383ab8515d feat(docs-infra): white background and corresponding figure updates (#28396)
PR Close #28396
2019-06-06 13:48:15 -07:00
Brandon 32886cf9ac docs(docs-infra): compile module first for Ivy when loading element modules (#30704)
In View Engine, NgModule factories are created for each NgModule and loaded when the module is requested. Ivy doesn't generate the
factories by design and only loads the module class, so it must be compiled after being loaded.

PR Close #30704
2019-05-31 15:24:22 -07:00
Brandon fcef39048a refactor(docs-infra): update loading of custom elements to use dynamic import syntax (#30704)
Removes the usage of `NgModuleFactoryLoader` and string-based imports for lazy loading.

PR Close #30704
2019-05-31 15:24:22 -07:00
Alex Rickabaugh 84dd2679a9 fix(core): require 'static' flag on queries in typings (#30639)
This commit makes the static flag on @ViewChild and @ContentChild required.

BREAKING CHANGE:

In Angular version 8, it's required that all @ViewChild and @ContentChild
queries have a 'static' flag specifying whether the query is 'static' or
'dynamic'. The compiler previously sorted queries automatically, but in
8.0 developers are required to explicitly specify which behavior is wanted.
This is a temporary requirement as part of a migration; see
https://angular.io/guide/static-query-migration for more details.

@ViewChildren and @ContentChildren queries are always dynamic, and so are
unaffected.

PR Close #30639
2019-05-24 16:55:00 -04:00
Mike Brocchi d70b1ff177 fix(docs-infra): Handle search criteria from Chrome search providers (#30345)
fixes #30242

PR Close #30345
2019-05-09 11:21:11 -07:00
William Koza bf6bedd714 fix(docs-infra): remove scroll position from sessionStorage when a ServiceWorker update has been activated (#29958)
closes #29893

PR Close #29958
2019-05-08 09:23:42 -07:00
George Kalpakas b70d20b510 fix(docs-infra): update app code to work with Ivy (#28530)
This commit also enables more tests to be run on CI with Ivy.

PR Close #28530
2019-05-01 16:38:32 -07:00
George Kalpakas 282167a37f build(docs-infra): upgrade tslint to 5.15.0 and codelyzer to 5.0.0 (#29926)
This commit also changes the `tslint.json` config file to (reasonably
closely) match what the cli would generate for a new app.

PR Close #29926
2019-04-25 12:32:49 -07:00
George Kalpakas eb85c8a742 build(docs-infra): make type-checking stricter by enabling `noImplicitAny` (#29926)
PR Close #29926
2019-04-25 12:32:49 -07:00
George Kalpakas 2002db28ff build(docs-infra): remove obsolete `ie-polyfills.js` (#29926)
Now that defferential loading it supported by the cli, remove the
obsolete `ie-polyfills.js` (and associated dependencies).

All polyfills in `ie-polyfills.js` are now included in the
[polyfills-es5][1] bundle, except for `classlist.js`, that is only
needed in order to support `NgClass` on SVG elements, which we don't
use.

[1]: https://github.com/angular/angular-cli/blob/b95933a57/packages/angular_devkit/build_angular/src/angular-cli-files/models/es5-polyfills.js

PR Close #29926
2019-04-25 12:32:49 -07:00
George Kalpakas 6c1ae294dc build(docs-infra): upgrade @angular/cli to 8.0.0-beta.18 (#29926)
This commit also changes the config files and their layout to
(reasonably closely) match what the cli would generate for a new app.

Related Jira issue: [TOOL-815](https://angular-team.atlassian.net/browse/TOOL-815)

PR Close #29926
2019-04-25 12:32:49 -07:00
George Kalpakas b8298f1b2d build(docs-infra): upgrade @angular/material to 8.0.0-beta.2 (#29926)
PR Close #29926
2019-04-25 12:32:48 -07:00
George Kalpakas 3def652e18 build(docs-infra): upgrade @angular/* to 8.0.0-beta.14 (#29926)
PR Close #29926
2019-04-25 12:32:48 -07:00
George Kalpakas e575892774 refactor(docs-infra): remove unnecessary cast to `any` (#29989)
PR Close #29989
2019-04-19 09:46:48 -07:00
Filipe Silva 3a836c362d build(docs-infra): convert `search-worker.js` to TypeScript (#29764)
PR Close #29764
2019-04-15 11:14:04 -07:00
Filipe Silva ee603a3b01 build(docs-infra): update to CLI 8 beta.13 (#29764)
PR Close #29764
2019-04-15 11:14:04 -07:00
Surya Malladi 3e4698564a docs: showing hamburger menu for getting started pages on desktop (#29791)
Added a css rule to show hamburger for desktops when the user is in any of the getting started pages.

PR Close #29791
2019-04-10 12:17:02 -07:00
Filipe Silva ef85336719 build: update to TypeScript 3.4 (#29372)
PR Close #29372
2019-04-10 12:12:16 -07:00
George Kalpakas 0e201ea9d8 fix(docs-infra): fix scroll position restoration error in `ScrollService` (#29658)
Based on Google Analytics error report, the following error happens
occasionally (15% or total errors for 2019-03):

```
Cannot read property '0' of null TypeError: at t.scrollToPosition@main.js
```

This was a result of calling [ViewportScroller#scrollToPosition()][1]
with `null`, which in turn happens when calling
[ScrollService#scrollToPosition()][2] while `this.scrollPosition` is
`null`. This can be a result of a `popstate` event without an associated
history state.

This commit fixes the error by checking whether `this.scrollPosition` is
`null`, before using it with `scrollToPosition()`.

(It also refactors away the unneeded internal `popStateFired` property.)

[1]: https://github.com/angular/angular/blob/deca6a60d/packages/common/src/viewport_scroller.ts#L101-L105
[2]: https://github.com/angular/angular/blob/deca6a60d/aio/src/app/shared/scroll.service.ts#L158-L161

PR Close #29658
2019-04-02 10:26:49 -07:00
George Kalpakas 53be333439 perf(docs-infra): avoid unnecessary JSON parsing in `ScrollService` (#29658)
PR Close #29658
2019-04-02 10:26:49 -07:00
George Kalpakas 19081dc9a3 refactor(docs-infra): minor clean-up of `ScrollService` (#29658)
PR Close #29658
2019-04-02 10:26:49 -07:00
Roland Rytz ab4be7bf80 docs: fix typo in description of angular.io/index.html (#29630)
change "compeling" to "compelling" in description meta tag

PR Close #29630
2019-04-01 10:54:08 -07:00
George Kalpakas 33524d9d9c feat(docs-infra): support contributors belonging to multiple groups (#29553)
PR Close #29553
2019-03-29 11:01:45 -07:00
George Kalpakas b99a070f88 refactor(docs-infra): change unused classes to interfaces (#29553)
PR Close #29553
2019-03-29 11:01:45 -07:00
George Kalpakas 799a5a4915 docs: change the order of groups in contributors page (#29553)
Put "Collaborators" before "GDE", since they are semantically closer to
the core team.

PR Close #29553
2019-03-29 11:01:45 -07:00
Brandon 12c9bd257d docs: add new getting started guide (#27684)
PR Close #27684
2019-03-29 10:47:37 -07:00
Daniel Ruf 1778bd3470 refactor: remove unused and duplicate CSS properties from styleguide examples (#28252)
PR Close #28252
2019-02-22 09:51:35 -08:00
Igor Minar 599e2e22bc feat(docs-infra): add meta[name]=Description to angular.io's index.html (#28916)
This change makes angular.io more user and SEO friendly according to web.dev.

See: https://web.dev/discoverable/write-descriptive-text

PR Close #28916
2019-02-21 23:27:26 -08:00
Igor Minar 2df2168c0a fix(docs-infra): add [lang] attribute to index.html of angular.io (#28916)
It's the right thing to do, and improves accessiblity.

See: https://dequeuniversity.com/rules/axe/3.1/html-has-lang?application=lighthouse

PR Close #28916
2019-02-21 23:27:25 -08:00
Igor Minar 8043db570f fix(docs-infra): set the default html title to 'Angular' (#28916)
This removes the annoying flicker while the app is loading.

Also: it's just Angular.

PR Close #28916
2019-02-21 23:27:25 -08:00
Igor Minar de036d29e3 style(docs-infra): reformat using vscode html formatter (#28916)
Makes it easier to keep on editing and reformatting the file.

PR Close #28916
2019-02-21 23:27:25 -08:00
George Kalpakas 04ae1251c7 fix(docs-infra): prevent extra space at the bottom of the page in Chrome (#28864)
The supposedly visually hidden `mat-icon` creates unnecessary space at
the bottom of the page (below the footer) in recent Chrome versions.
This didn't happen before and it still doesn't happen in other browsers
(Firefox, Edge, IE).

This commit fixes it by wrapping the icon in a visually hidden `div`
container, which doesn't have other styles (such as `mat-icon` does)
that could affect the layout of the page.

Fixes #28858

PR Close #28864
2019-02-20 09:20:37 -08:00
Stephen Fluin ed032e08c1 feat(aio): show developer survey 2019 (#28552)
PR Close #28552
2019-02-06 02:33:39 -05:00
WilliamKoza eed59b713a fix(docs-infra): avoid a race-condition with navigating forward/back and immediately reloading (#28368)
This can result in an inconsistent state

PR Close #28368
2019-02-05 23:44:56 -05:00
WilliamKoza b2a6bf2a80 fix(docs-infra): remove the try catch in the test of the browser's capacities (#28368)
PR Close #28368
2019-02-05 23:44:56 -05:00
WilliamKoza 0709f8411d feat(docs-infra): add debouncing in storing scroll position (#28368)
There is no debouncing when we store the scroll Position.
Currently, we have a message in the console after a while:
>Throttling history state changes to prevent the browser from hanging
see: https://bugs.chromium.org/p/chromium/issues/detail?id=786211 for more informations

PR Close #28368
2019-02-05 23:44:55 -05:00
WilliamKoza 3d522716c4 fix(docs-infra): remove polyfill web-animations since we use Angular > 6 and we don't use `AnimationBuilder` (#28514)
PR Close #28514
2019-02-04 14:54:25 -05:00
Jeremy Elbourn ec6e7303dd perf: pngcrush all pngs (#28479)
This is the result of running
```sh
find ./ -iname "*.png" -exec pngcrush -brute -ow --  {} \;
```

[Summary of size reductions](https://docs.google.com/spreadsheets/d/12Qgx7DfKabWw0PJza6ozC1kCHTofi6wyBLWGtwLW7G4/preview)

Last done in July, 2017 in #18243

PR Close #28479
2019-02-01 13:56:02 -05:00
WilliamKoza b87bf39eb4 fix(docs-infra): add hamburger button to CLI COMMANDS section (#28418)
Currently, when we navigate in the `CLI COMMANDS` section, the "hamburger button" isn't present because the class css `folder-cli` is missing.
This PR add this class in order to show this button when we are in this section.

PR Close #28418
2019-01-29 11:48:33 -08:00
George Kalpakas 9d81bd39ca refactor(docs-infra): get rid of `on` component input (#26947)
Compiling with Ivy doesn't seem to allow input names starting with `on`.

PR Close #26947
2019-01-28 14:01:12 -08:00
WilliamKoza f7c551e16b fix(docs-infra): upgrade codelyzer to 4.5.0 (#28389)
PR Close #28389
2019-01-28 11:51:56 -08:00
Carlos Schneider 02975e9166 docs(docs-infra): show top menu at 992px screen width (#26418)
Show top menu at 992px screen width. The JS expression was checking just for screen widths
strictly greater than 992px to show the menu, while the CSS media query was showing the hamburger
icon just for screen widths strictly smaller than 992px, so there was a gap of 1px that the user
could't navigate through the top menu.

closes #24324

PR Close #26418
2019-01-24 10:26:54 -08:00
WilliamKoza 3414316fc8 feat(docs-infra): saves the scroll position before the change of location (#28037)
Issue #27916, #17308

PR Close #28037
2019-01-24 10:24:43 -08:00
George Kalpakas 67a41d8bff fix(docs-infra): align property names to the top (#28104)
This looks better when the property descriptions span multiple lines;
especially when scrolling to a specific property (e.g.
[AbstractControl#status][1]).

[1]: https://next.angular.io/api/forms/AbstractControl#status

PR Close #28104
2019-01-24 10:24:03 -08:00
George Kalpakas e50c5293fc refactor(docs-infra): remove unused CSS style rule (#28104)
The `.properties-table` selector does not match any element and the
styles don't look relevant for the similarly named `.property-table`
class.

PR Close #28104
2019-01-24 10:24:03 -08:00
WilliamKoza 351ef2a6de fix(docs-infra): removal of the use of the ChildNode.remove() method that it isn't supported by IE (#28188)
fixes #28177

PR Close #28188
2019-01-22 09:48:19 -08:00
WilliamKoza 5b08a880f7 style(docs-infra): Active tslint rule `semicolon` (#28282)
PR Close #28282
2019-01-22 09:38:44 -08:00
WilliamKoza 50cf2ac6d8 fix(docs-infra): improve a11y (#28086)
Issue #27723

PR Close #28086
2019-01-16 17:37:45 -08:00
WilliamKoza 4c0104c846 fix(docs-infra): Add crossed through styling (#28111)
PR Close #28111
2019-01-14 10:45:46 -08:00
WilliamKoza d577b8df75 fix(docs-infra): render `deprecated` markers for CLI command options (#28111)
fixes #27563
fixes #27423

PR Close #28111
2019-01-14 10:45:46 -08:00
Pete Bacon Darwin cd51775390 build(docs-infra): render `@see` information in members (#28069)
Previously `@see` tags were only rendered for top level class-like
docs. Now these tags are rendered for methods and properties too.

PR Close #28069
2019-01-11 14:35:23 -08:00
Adam Plumer a100472b5d build: bump year (#27880)
PR Close #27880
2019-01-11 11:15:59 -08:00
Paul Gschwendtner c7d1890aaa build: remove travisci leftovers (#27979)
PR Close #27979
2019-01-09 10:41:16 -08:00
WilliamKoza c7346bfdba fix(aio): Treating some deprecated (#27981)
PR Close #27981
2019-01-09 10:39:25 -08:00
Igor Minar 69198ba37b build(docs-infra): turn on disableTypeScriptVersionCheck in angularCompilerOptions (#27536)
We need to do this because we don't yet have a released version of angular
with typescript 3.2 support and on CI we test both against the snapshot and
whatever is in aio/yarn.lock.

Once we have the next rc or a stable relase we should be able to remove
this flag.

PS: I also removed the preserveWhitespace:false because that's the default now.

PR Close #27536
2018-12-18 13:20:02 -08:00
Igor Minar cdfe8f4d69 fix(docs-infra): workaround for broken 'import as' (#27536)
It's unclear why `import as` results in the aliases to be undefined.

Plain tsc seems to do the right thing and emits the correct code, so it
might be some kind of interaction in @angular/cli or webpack that are
causing the failure.

This should be investigated separately from the tsc update in
angular/angular. See angular/angular-cli#13212

PR Close #27536
2018-12-18 13:20:01 -08:00
Esteban Marin e3a2ca5ad9 fix(docs-infra): fix top menu item clickable area (#27633)
the clickable region of the top menu item is expanded beyond the focused area, so the clickable area is spans the entire height of the navigation

fixes #27618

PR Close #27633
2018-12-13 11:00:34 -08:00
Esteban Marin fc6dc78fe9 fix(docs-infra): fix top menu item clickable area (#27620)
the clickable region of the top menu item is reduced to the focused area, so no cursor pointer is shown outside the clickable area

fixes #27618

PR Close #27620
2018-12-12 10:55:28 -08:00
George Kalpakas 4b5cd721c1 refactor(docs-infra): remove unused custom element (#27250)
PR Close #27250
2018-12-05 13:26:27 -08:00
George Kalpakas 6abbaaed89 fix(docs-infra): do not use an Angular element in hard-coded `FETCH_ERROR` document (#27250)
The `FETCH_ERROR` document is used when we are unable to retrieve a
document (except for 404 errors), which includes when there is no
internet connection. Using the `<current-location>` element in the
document's template to show the path of the page we failed to retrieve
assumes that the element's bundle is available (e.g. cached by the SW)
or can be fetched from the server.

When none of these conditions is met, the `DocViewer` is unable to
prepare the document and fails, never showing the `FETCH_ERROR` page to
the user.

Furthermore, the path we are looking to retrieve via
`<current-location>` is essentially the document ID, which we already
have. Thus, loading and instantiating a whole component just for that is
overkill.

This commit addresses both issues by getting rid of the
`<current-location>` component and directly embedding the document ID
into the `FETCH_ERROR` content.

PR Close #27250
2018-12-05 13:26:27 -08:00
George Kalpakas dfdc2adbc6 fix(docs-infra): fix sidenav positioning when notification is shown (#27250)
_Before:_
![sidenav-scrollbar-before](https://user-images.githubusercontent.com/8604205/49089078-62519d00-f263-11e8-8369-f39e73dcc239.png)

_After:_
![sidenav-scrollbar-after](https://user-images.githubusercontent.com/8604205/49089077-62519d00-f263-11e8-8a94-0c34044c4ba1.png)

PR Close #27250
2018-12-05 13:26:27 -08:00
George Kalpakas fa0c65efe5 build(docs-infra): remove dependency on FontAwesome (#27250)
We were only using two FontAwesome icons (`link` and `twitter`). The
twitter icon is already available as an SVG (used in the topbar) and a
similar link icon is available via 'Material Icons', which we are
already brining in.

This commit removes the dependency on FontAwesome and uses the available
icons instead.

_Before:_
![contributor-info-before](https://user-images.githubusercontent.com/8604205/49089076-61b90680-f263-11e8-8c5f-c52d332e6e64.png)

_After:_
![contributor-info-after](https://user-images.githubusercontent.com/8604205/49089075-61b90680-f263-11e8-9785-b8df15aaacd3.png)

PR Close #27250
2018-12-05 13:26:27 -08:00
George Kalpakas 271fcb0f3e fix(docs-infra): correctly cache footer image by the SW (#27250)
When using relative paths for CSS resources (such as background images),
`@angular/cli` will move them to the root `dist/` directory (and update
the paths in CSS accordingly). This results in the SW being unable to
cache the resource, because it is not where it expects it to be.

This commit fixes this issue for the footer background image, by using
an absolute path for the URL. (It also removes an unused style that
would have been affected by the same issue.)

PR Close #27250
2018-12-05 13:26:27 -08:00
George Kalpakas af952cad62 fix(docs-infra): ensure material icons are cached for offline access (#27250)
In order for 'Material Icons' to work offline, their `.woff2` file needs
to have been cached by the SW. This file is not requested by the
browser, until an element needs to use the icon font.

In order to speed up the initial page load and avoid FOUC, we use
inlined SVGs for all icons in the app shell. As a result, the `.woff2`
file may not be requested, when a user visits angular.io. If they go
offline before visiting a page that does actually use 'Material Icons',
then such icons will not work correctly (e.g. the `error_outline` icon
used in the error page for failed requests due to network
unanvailability).

This commit fixes this, by adding a non-visible element that needs the
'Material Icons' font on the main component. Thids ensures that the
`.woff2` file will always be loaded, even if the page does not use any
material icons.

(Note: The element is inserted lazily to avoid affecting the initial
rendering.)

PR Close #27250
2018-12-05 13:26:27 -08:00