456 Commits

Author SHA1 Message Date
George Kalpakas
4ec40c6ab2 fix(aio): improve announcement-bar layout with wide logos ()
PR Close 
2018-02-18 13:16:30 -08:00
Stefanie Fluin
7078fbffb4 fix(aio): improve printing styles ()
printfix

PR Close 
2018-02-15 09:52:32 -08:00
Matias Niemelä
ba9cd5bbc4 Revert "fix(aio): improve printing styles ()"
This reverts commit b54ad053f95b343644943705d25a5a6a6b7f852d.
2018-02-14 22:55:24 -05:00
Stefanie Fluin
b54ad053f9 fix(aio): improve printing styles ()
printfix

PR Close 
2018-02-14 18:49:58 -05:00
Pete Bacon Darwin
fbef94a8ee feat(aio): enable data driven homepage announcements ()
PR Close 
2018-02-09 13:10:11 -08:00
Pete Bacon Darwin
7007f51c35 feat(aio): first pass API docs redesign ()
Includes:

* display ToC for API docs
* update dgeni-packages to 0.24.1
* add floating sidebar in API docs
* add breadcrumbs and structured data for Google crawler
* improved rendering of method overloads
* properties rendered in a table
* params rendered with docs
* removal of outdated "infobox" from all API docs

PR Close 
2018-02-09 13:05:16 -08:00
Pete Bacon Darwin
7a406a3896 feat(aio): report logger.error calls to Google Analytics ()
We have a number of observables that have `catch` handlers to recover
from errors without causing the stream to close, and breaking the app.
We also have some `try ... catch` blocks for synchronous code for a
similar reason.

In these cases we conventionally then call `logger.error` in the catch
handler. We are interested in these errors so we are going to capture them
by reporting them to Google Analytics via the new `ReportingErrorHandler`.

PR Close 
2018-02-07 12:09:38 -08:00
Pete Bacon Darwin
98001a065d feat(aio): report application errors to Google Analytics ()
This is a basic implementation of error logging using the limited
facilities provided by Google Analytics.

Errors within the Angular app itself will be handled by a new
`ReportingErrorHandler` service, which overrides and extends the
built-in `ErrorHandler`.

Further, errors outside the app, which arrive at `window.onerror`
will also be reported to Google Analytics.

Closes 

PR Close 
2018-02-07 12:09:38 -08:00
George Kalpakas
7e95802cc1 fix(aio): ignore .header-link when selecting the heading text ()
Implemented @maxkorz's
[suggestion](https://github.com/angular/angular/issues/21515#issuecomment-357453634).

Fixes 

PR Close 
2018-02-07 12:06:45 -08:00
George Kalpakas
e3e7044d06 fix(aio): prevent heading misplacement while styles load ()
During the initial load of the page (probably until the icon styles are
loaded and/or applied), the `.header-link` element is wider, pushing the
heading text slightly to the right (for a brief moment).

This commit prevents this slight shift by explicitly setting the width
for the `.header-link` element.

PR Close 
2018-02-07 12:06:45 -08:00
George Kalpakas
eb3bfc25be fix(aio): ensure header-links are visible at <600px ()
PR Close 
2018-02-07 12:06:45 -08:00
George Kalpakas
94d769de71 refactor(aio): simplify .header-link styles ()
PR Close 
2018-02-07 12:06:45 -08:00
George Kalpakas
66191e8a37 fix(aio): reduce flicker and reflows for initial rendering ()
For the initial rendering, where there is no transition from a previous
visual state to a new one, animations make little sense. The page should
load with as few reflows as possible.
Similarly, while we typically want to defer updating the SideNav state
(e.g. opened/closed) until the "leaving" document is animated out of the
page, on the initial rendering (where there is no "leaving" document)
this leads to the SideNav flashing (from closed to open).

These worked as expected before, but several parts (mostly related to
documents with a SideNav) have been accidentally broken in recent
commits (e.g. when upgraded to latest material, or enabled animations
for DocViewer transitions, etc.).

This commit restores the previous behavior by ensuring that (on the
initial rendering) the SideNav state is updated as soon as possible and
that there will be no animations when:

1. The hamburger button appears.
2. The SideNav is opened.
3. The main section's width is adjusted to make room for the SideNav.

PR Close 
2018-02-07 12:06:45 -08:00
George Kalpakas
bec188506c refactor(aio): preserve HttpClient asynchronicity in tests ()
Previously, the mocked `HttpClient` was synchronous in tests (despite
the actual `HttpClient` being asynchronous). Although we use observables
(which generally make the implementation sync/async-agnostic), the fact
that we have no control over when Angular updates/checks views and calls
lifecycle hooks resulted in different behavior (and errors) in tests
(with sync `HttpClient`) vs actual app (with async `HttpClient`).

This commit ensures that the behavior (and errors) are consistent
between the tests and the actual app by making the mocked `HttpClient`
asynchronous.

PR Close 
2018-02-07 12:06:45 -08:00
George Kalpakas
4f869ff755 fix(aio): remove links from sub-menu toggles ()
Navigating to a document while trying to expand or collapse a sub-menu
is undesirable and confusing. All sub-menu toggles should have no other
effect than expanding/collapsing the corresponding sub-menu.

PR Close 
2018-02-07 12:06:45 -08:00
Pete Bacon Darwin
5a624fa1be feat(aio): dynamically, pre-emptively, add noindex ()
These tags are removed when the doc is ready and valid, but this will
allow us to block indexing in the case that the Angular app fails to
bootstrap or load the document for some non-404 reason.

This should get around the problem with hardcoded tags. See
c3fb820473

Closes 

PR Close 
2018-02-05 12:58:27 -08:00
Pete Bacon Darwin
339ca83f9d build(aio): move test config and e2e tests into subfolders ()
This is in preparation of putting firebase and service worker
deployment tests into the project.

PR Close 
2018-02-02 07:52:30 -08:00
Igor Minar
c3fb820473 fix(aio): don't set noindex metatag in the static index.html ()
This seems to be causing crawling issues for google.

Ref 

PR Close 
2018-01-26 16:08:30 -08:00
George Kalpakas
108fa15792 fix(aio): close SideNav on non-sidenav doc on wide screen ()
Partly addresses .

PR Close 
2018-01-26 10:25:15 -08:00
George Kalpakas
1b2271a3b1 fix(aio): fix SideNav height on narrow screens ()
Since we specify `bottom: 0`, specifying the height is unnecessary and
leads to wrong height (unless updated) on narrow screens where the
topbar height is decreased.

Partly addresses .

PR Close 
2018-01-26 10:25:15 -08:00
Jesus Rodriguez
1a75934cc0 build(aio): migrate plunker to stackblitz ()
PR Close 
2018-01-23 21:30:27 -08:00
Pete Bacon Darwin
a64af40c0b build(aio): generate sitemap from the generated pages ()
Closes 

PR Close 
2018-01-22 12:55:15 -08:00
Pete Bacon Darwin
88045a5050 feat(aio): update metatags to control search engine crawling ()
The `<meta name="robots" content="noindex">` tag is used
to indicate to search engine crawlers that they should not index
the current page. This is set dynamically by the the document
viewer component to ensure that 404 and other erroring pages
are not added to the search index.

This relies upon the idea that the crawling bot will run the JS
and wait to see if this meta tag has been added or not.

Since we believe that the `googebot` will do this, we also
pre-emptively add a hard-coded noindex tag specifically for
this bot, so that if anything else fails in bootstrapping the app,
the failed page will not be added to the index.

Closes 

PR Close 
2018-01-19 20:30:02 -08:00
Pete Bacon Darwin
c5c6d84fe6 style(aio): enforce strict TypeScript checks ()
Closes 

PR Close 
2018-01-12 14:36:43 -08:00
Pete Bacon Darwin
4f3149242f feat(aio): implement survey notification link ()
Closes 

PR Close 
2018-01-12 10:05:13 -08:00
George Kalpakas
137b9c784c fix(aio): preserve static Observable methods ()
PR Close 
2018-01-10 14:30:21 -08:00
Igor Minar
7c9ba2d6f2 build(aio): upgrade to angular@5.2.0-rc.0 ()
Because of c2b3792 one of the test assertions had to be adjusted (more info: https://github.com/angular/angular/pull/21351#issuecomment-356083940).

PR Close 
2018-01-10 14:30:21 -08:00
Suguru Inatomi
f15ca6ce50 fix(aio): support multibyte character in heading ()
PR Close 
2018-01-10 12:25:06 -08:00
Siyao Li
2402224b4e docs(common): update copyright years ()
PR Close 
2018-01-04 17:45:36 -05:00
Peter Bacon Darwin
6588ca8a6c fix(aio): do not redirect pages on "next" deployment ()
We redirect non-docs pages in the "archive" deployment back to the stable
deployment. We should not redirect pages in the "next" deployment.

Closes 

PR Close 
2018-01-04 17:13:52 -05:00
Igor Minar
ef78538a06 fix(aio): don't use Object.keys on NamedNodeMap to prevent SEO errors ()
Apparently Object.keys on NamedNodeMap work differently with googlebot :-(

There are not tests since we don't have a way to write tests for googlebot,
but I did manually verify that after this fix googlebot correctly renders
several of the previously broken pages.

Fixes 

PR Close 
2018-01-04 14:25:09 -05:00
George Kalpakas
ccea37256e refactor(aio): use one argument for DocViewer error reporting ()
Pass one argument to `logger.error()` to improve error reporting in
environments that do not handle more than one arguments well (e.g.
Googlebot's web rendering service).

Related to .

PR Close 
2018-01-04 13:32:50 -05:00
Haydee Rodriguez
d8abf70f1f aio: Sort in the api type dropdown ()
Change the order of elements in the api type dropdown to be alphabetical order

PR Close 
PR Close 
2017-12-27 11:12:54 -08:00
George Kalpakas
8ceffd8b48 fix(aio): improve transitions between pages
- Avoid unnecessary animations, style transitions, repositioning on
  initial rendering.
- Better handle transitioning from/to Home page (which is the only page
  with transparent top-menu).
- Better coordinate sidenav and hamburger animations with page
  transitions.
- Improve fade-in/out animations.

Fixes 
2017-12-19 10:45:19 -08:00
George Kalpakas
2986e25abb refactor(aio): clean up top-menu CSS
- Clean-up and re-organize top-menu styles.
- Clean-up and merge hamburger styles into top-menu styles.
2017-12-19 10:45:19 -08:00
George Kalpakas
f8fe53aeb0 feat(aio): support disabling DocViewer animations via class 2017-12-19 10:45:19 -08:00
Joey Perrott
a4742763b9 test(aio): correct usage of fakeAsync and inject together in test
Corrects a test which wrapped the fakeAsync call in an inject call.  This caused
the test to not actually run.
2017-12-15 07:55:09 -08:00
George Kalpakas
a33eaf6e07 test(aio): disable DocViewer animations during e2e tests 2017-12-14 08:48:52 -08:00
George Kalpakas
22ae17bb0b build(aio): upgrade to latest @angular/material and @angular/cdk ()
PR Close 
2017-12-08 10:11:15 -08:00
George Kalpakas
94e2ea7361 fix(aio): fix embedded ToC and improve ToC, destroying components and scroll timing ()
- Fix embedded ToC:
  Previously, the element was added too late and was never instantiated.

- Improve ToC update timing:
  Previously, the ToC was updated after the entering animation was over, which
  resulted in the ToC being outdated for the duration of the animation.

- Improve destroying components timing:
  Previously, the old embedded components were destroyed as soon as a
  new document was requested. Even if the transition ended up never
  happening (e.g. due to error while preparing the new document), the
  embedded components would have been destroyed and the displayed
  document would not work as expected.
  Now the old embedded components are destroyed only after the new
  document has been fully prepared.

- Improve scroll-to-top timing:
  Previously, the page was scrolled to top after the entering animation was
  over, which resulted in "jumpi-ness". Now the scrolling happens after the
  leaving document has been removed and before the entering document has been
  inserted.

PR Close 
2017-12-08 10:11:15 -08:00
George Kalpakas
1539cd8819 feat(aio): animate the leaving/entering documents ()
This commit adds a simple fade-in/out animation.

Fixes 

PR Close 
2017-12-08 10:11:15 -08:00
George Kalpakas
131c8ab6be fix(aio): do not show new document until embedded components are ready ()
Previously, the document was shown as soon as the HTML was received, but before
the embedded components were ready (e.g. downloaded and instantiated). This
caused FOUC (Flash Of Uninstantiated Components).
This commit fixes it by preparing the new document in an off-DOM node and
swapping the nodes when the embedded components are ready.

PR Close 
2017-12-08 10:11:15 -08:00
Georgios Kalpakas
7d81309e11 feat(aio): lazy-load embedded components ()
Fixes 

PR Close 
2017-12-08 10:11:15 -08:00
Peter Bacon Darwin
3def2cc552 test(aio): cleaner approach to reliable Google Analytics e2e tests ()
PR Close 
2017-11-29 16:53:04 -06:00
George Kalpakas
7e38f4fd1f fix(aio): fix window title on Home page ()
Using `display: none` on the `<h1>` causes `innerText` to not work as expected
and include the icon ligature (`link`) in the title. This caused the window
title on the angular.io Home page to appear as "Angular - link".
This commit fixes it by not generating anchors at all for headings with the
`no-anchor` class.

Fixes 

PR Close 
2017-11-15 18:25:58 -06:00
Haroen Viaene
880201681f fix(aio): style correctly on Safari () 2017-11-06 10:00:37 -08:00
Peter Bacon Darwin
215d373ebd refactor(aio): rename CustomMdIconRegistry to CustomIconRegistry ()
The change of Angular Material version means that the `md` prefix is
no longer appropriate.

PR Close 
2017-11-01 15:24:47 -07:00
Peter Bacon Darwin
54eba606cb build(aio): fix tests to work with @angular/{material,cdk}@2.0.0-beta.12 ()
PR Close 
2017-11-01 15:24:45 -07:00
Peter Bacon Darwin
f24397c5d0 build(aio): revert to clean CLI test.ts file ()
The use of `System.import()` in test.ts was causing the webpack build to fail
with a mysterious "Module build failed: Error: TypeScript compilation failed" error,
when running `yarn test`.

PR Close 
2017-11-01 15:24:44 -07:00
Igor Minar
a149605c9f build(aio): turn off preserveWhitespaces in compiler options ()
-rw-r--r--  1 iminar  eng   14942 Oct 13 16:12 dist/0.b19e913fbdd6507d346b.chunk.js
-rw-r--r--  1 iminar  eng    1535 Oct 13 16:12 dist/inline.eede8140efeab4c45b22.bundle.js
-rw-r--r--  1 iminar  eng  559389 Oct 13 16:12 dist/main.20858f9aa7cf8741b6aa.bundle.js
-rw-r--r--  1 iminar  eng   37402 Oct 13 16:12 dist/polyfills.f8409a9eb69060ac1aa6.bundle.js

PR Close 
2017-11-01 15:24:43 -07:00