Commit Graph

538 Commits

Author SHA1 Message Date
George Kalpakas 108fa15792 fix(aio): close SideNav on non-sidenav doc on wide screen (#21538)
Partly addresses #21520.

PR Close #21538
2018-01-26 10:25:15 -08:00
George Kalpakas 1b2271a3b1 fix(aio): fix SideNav height on narrow screens (#21538)
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 #21520.

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

PR Close #21689
2018-01-22 12:55:15 -08:00
Pete Bacon Darwin 88045a5050 feat(aio): update metatags to control search engine crawling (#21665)
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 #21317

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

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

PR Close #21371
2018-01-12 10:05:13 -08:00
George Kalpakas 137b9c784c fix(aio): preserve static Observable methods (#21351)
PR Close #21351
2018-01-10 14:30:21 -08:00
Igor Minar 7c9ba2d6f2 build(aio): upgrade to angular@5.2.0-rc.0 (#21351)
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 #21351
2018-01-10 14:30:21 -08:00
Suguru Inatomi f15ca6ce50 fix(aio): support multibyte character in heading (#21414)
PR Close #21414
2018-01-10 12:25:06 -08:00
Siyao Li 2402224b4e docs(common): update copyright years (#21232)
PR Close #21232
2018-01-04 17:45:36 -05:00
Peter Bacon Darwin 6588ca8a6c fix(aio): do not redirect pages on "next" deployment (#21027)
We redirect non-docs pages in the "archive" deployment back to the stable
deployment. We should not redirect pages in the "next" deployment.

Closes #19505

PR Close #21027
2018-01-04 17:13:52 -05:00
Igor Minar ef78538a06 fix(aio): don't use Object.keys on NamedNodeMap to prevent SEO errors (#21305)
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 #21272

PR Close #21305
2018-01-04 14:25:09 -05:00
George Kalpakas ccea37256e refactor(aio): use one argument for `DocViewer` error reporting (#21293)
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 #21272.

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

PR Close #21030
PR Close #21176
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 #20996
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` (#18428)
PR Close #18428
2017-12-08 10:11:15 -08:00
George Kalpakas 94e2ea7361 fix(aio): fix embedded ToC and improve ToC, destroying components and scroll timing (#18428)
- 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 #18428
2017-12-08 10:11:15 -08:00
George Kalpakas 1539cd8819 feat(aio): animate the leaving/entering documents (#18428)
This commit adds a simple fade-in/out animation.

Fixes #15629

PR Close #18428
2017-12-08 10:11:15 -08:00
George Kalpakas 131c8ab6be fix(aio): do not show new document until embedded components are ready (#18428)
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 #18428
2017-12-08 10:11:15 -08:00
Georgios Kalpakas 7d81309e11 feat(aio): lazy-load embedded components (#18428)
Fixes #16127

PR Close #18428
2017-12-08 10:11:15 -08:00
Peter Bacon Darwin 3def2cc552 test(aio): cleaner approach to reliable Google Analytics e2e tests (#20661)
PR Close #20661
2017-11-29 16:53:04 -06:00
George Kalpakas 7e38f4fd1f fix(aio): fix window title on Home page (#20440)
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 #20427

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

PR Close #19702
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 (#19702)
PR Close #19702
2017-11-01 15:24:45 -07:00
Peter Bacon Darwin f24397c5d0 build(aio): revert to clean CLI test.ts file (#19702)
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 #19702
2017-11-01 15:24:44 -07:00
Igor Minar a149605c9f build(aio): turn off preserveWhitespaces in compiler options (#19702)
-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 #19702
2017-11-01 15:24:43 -07:00
Igor Minar 175c872514 build(aio): upgrade to @angular/{material,cdk}@2.0.0-beta.12 (#19702)
-rw-r--r--  1 iminar  eng   14942 Oct 13 13:35 dist/0.b19e913fbdd6507d346b.chunk.js
-rw-r--r--  1 iminar  eng    1535 Oct 13 13:35 dist/inline.f005f1bd6803b72f5961.bundle.js
-rw-r--r--  1 iminar  eng  582527 Oct 13 13:35 dist/main.b9ef1abb785be8de15b8.bundle.js
-rw-r--r--  1 iminar  eng   37402 Oct 13 13:35 dist/polyfills.f8409a9eb69060ac1aa6.bundle.js

PR Close #19702
2017-11-01 15:24:42 -07:00
Igor Minar 71291aa2c0 fix(aio): hand fix the renaming md->mat issues (#19702)
These are changes that the mat-switcher missed and I had to make them by hand.

PR Close #19702
2017-11-01 15:24:42 -07:00
Igor Minar 415e75716a build(aio): upgrade to @angular/{material,cdk}@2.0.0-beta.11 + md->mat migration (#19702)
all the non-npm changes were made by the angular-material-prefix-updater tool.

the tool missed a few things, which I'll fix in a separate commit to preserve the diff.

-rw-r--r--  1 iminar  eng   14942 Oct 13 13:09 dist/0.b19e913fbdd6507d346b.chunk.js
-rw-r--r--  1 iminar  eng    1535 Oct 13 13:09 dist/inline.0592c25ceb544d6aca3d.bundle.js
-rw-r--r--  1 iminar  eng  578250 Oct 13 13:09 dist/main.45d4edca3facc6d621e7.bundle.js
-rw-r--r--  1 iminar  eng   37402 Oct 13 13:09 dist/polyfills.f8409a9eb69060ac1aa6.bundle.js

PR Close #19702
2017-11-01 15:24:42 -07:00
Peter Bacon Darwin 441e01c568 fix(aio): simplify GaService to avoid e2e test failures
The GaService and the E2E specs were unnecessarily complicated and had
arbitrary async timeouts to ensure that the interplay between the GA
library code and the rest of the app worked correctly. This resulted
in potential flaky tests if the timeouts were not adequate; this was
experienced when Travis upgraded to Chrome 62.

The new approach is to block loading of the Analytics library altogether
if there is a `__e2e__` flag set in the `SessionStorage` of the browser.
It doesn't appear to be enough just to set the flag directly on the
window. I think this is because the window gets cleaned when navigation
occurs (but I am not certain).

The downside of this is that we had to add a small piece of extra logic
to the GA snippet in index.html; and we also had to switch from using
`<script async ...>` to a programmatic approach to loading the GA library
which prevents the browser from eagerly fetching the library. This may
be mitigated by adding it to the HTTP/2 push configuration of the Firebase
hosting.

Re-enables the test that was disabled in https://github.com/angular/angular/pull/19784

Closes #19785
2017-10-20 09:40:52 -07:00
Peter Bacon Darwin 91fcfcb042 feat(aio): add search to 404 page (#19682)
The 404 page will now run a search based on the given URL to offer
suggestions for the page that the user really wanted.

PR Close #19682
2017-10-13 09:18:42 -07:00
Peter Bacon Darwin 88c46feb20 refactor(aio): move SearchResultsComponent into shared module (#19682)
This will allow it to be used by an embedded component.

PR Close #19682
2017-10-13 09:18:42 -07:00
Peter Bacon Darwin c3f07b329f feat(aio): allow SearchService to have multiple clients (#19682)
PR Close #19682
2017-10-13 09:18:41 -07:00
Peter Bacon Darwin 717c68089d build(aio): remove unused imports and local variables (#19682)
PR Close #19682
2017-10-13 09:18:41 -07:00
Peter Bacon Darwin 1279d75f7f fix(aio): fix SearchService to work with TypeScript 2.4 (#19511)
The call to `race` required a type parameter to disambiguate the return type.

PR Close #19511
2017-10-06 11:56:40 -07:00
Peter Bacon Darwin 5cd0d6ab25 fix(aio): relax search on titles further
This change will now match `ControlValueAccessor` for the query `accessor`.

Closes #18872
2017-09-12 13:56:49 -04:00
Peter Bacon Darwin 4a0466e574 feat(aio): include more API results in search
By adding a more relaxed search on the title
of docs, we are more likely to catch API docs.

The additional search terms match anything
with a word in the title that starts with the
characters of the first term in the search.

E.g. if the search is "ngCont guide" then
search for "ngCont guide titleWords:ngCont*"
2017-09-08 13:21:21 -04:00
Sam Blowes 1a9d382da9 fix(aio): align footer background image repeat (#19035)
Refs #17465
PR Close #19035
2017-09-05 15:34:35 -05:00
Peter Bacon Darwin 7ce9e06dab fix(aio): do not redirect API pages on archive and next deployments (#18791)
PR Close #18791
2017-08-21 17:32:10 -05:00
Georgios Kalpakas 60c803649b test(aio): fix error logged during tests (#18659)
The fixed test expected there to be a doc version without a URL. This used to be
the case but not any more. As a result, an error was logged in the test output
(but no failure).

This commit fixes it by ensuring that a version without a URL exists.

PR Close #18659
2017-08-18 13:23:16 -05:00
Ward Bell 697c6ed0fe docs: remove TypeScript to JavaScript guide & sample 2017-08-15 16:31:31 -07:00
Georgios Kalpakas 38addacda0 build(aio): switch from `@angular/http` to `@angular/common/http`
```
$ ls -l dist/*.js

 14942            dist/0.b19e913fbdd6507d346b.chunk.js
  1535            dist/inline.a1b446562b36eebb766d.bundle.js
524385  (+  682)  dist/main.19fec4390ff7837ee6ef.bundle.js
 37402            dist/polyfills.9f7e0e53bce2a6c8326e.bundle.js
 54001            dist/worker-basic.min.js

632265  (+  682)  total
```
2017-08-15 15:13:47 -07:00
Georgios Kalpakas 6fb5250185 ci(aio): fix deploying the stable branch to Firebase
The `deploy-to-firebase.sh` always expects there to be a
`src/extra-files/<mode>` directory and breaks if it doesn't exist.
2017-08-09 14:18:33 -07:00
Peter Bacon Darwin 340837aa46 feat(aio): add "archive" and "next" color themes 2017-08-04 09:13:34 -07:00
Peter Bacon Darwin 42ef1be75c feat(aio): redirect marketing pages to `docs` if deploy mode is `archive`
See #18287
2017-08-04 09:13:34 -07:00
Peter Bacon Darwin a5801b6020 feat(aio): add deploy mode to version picker
See #18287
2017-08-04 09:13:34 -07:00
Peter Bacon Darwin 70b62949de feat(aio): enable deployment mode to be set via URL query
The deployment mode set from the environment provided at build time;
or overridden by the `mode` query parameter: e.g. `...?mode=archive`

See #18287
2017-08-04 09:13:34 -07:00
Peter Bacon Darwin 36161d99f6 feat(aio): update UI based on deployment mode
* Add a banner if the mode is "archive"
* Add a `mode-...` class to the `aio-shell` element to enable
mode based theming.

See #18287
2017-08-04 09:13:34 -07:00
Peter Bacon Darwin 0714139e37 ci(aio): include extra files in AIO deployment based on mode
Any files that are inside the `extra-files/{mode}` folder
will be copied over to the `dist` folder before deployment
to Firebase.

See #18287
2017-08-04 09:13:34 -07:00
Peter Bacon Darwin bcb36d9b6d ci(aio): compute AIO deployment mode
There are now 3 modes for deployment: next, stable, archive.
We compute which mode (and other deployment properties)
from the `TRAVIS_BRANCH` and the `STABLE_BRANCH`.

If the TRAVIS_BRANCH is master we deploy as "next".
Otherwise if the branch is the highest of its minor versions
we deploy as "stable" if the `TRAVIS_BRANCH` matches the `STABLE_BRANCH` or
else "archive".

For "archive" deployments we compute the firebase project and deployment
url based on the major version of the `TRAVIS_BRANCH`.

As well as choosing where to deploy the build, we also use this
to select the environment file for the AIO Angular app.
This will enable the app to change its rendering and behaviour
based on its mode.

See #18287
2017-08-04 09:13:34 -07:00
Georgios Kalpakas 0fb7484d51 refactor(aio): move content-specific images to `content/images/`
Fixes #17053
2017-07-28 15:06:49 -07:00
Georgios Kalpakas 6a3454e81e refactor(aio): rename `unused` directories to `_unused` 2017-07-28 15:06:49 -07:00
Georgios Kalpakas 24117d7a49 refactor(aio): move unused images to `unused` directories
This prevents the ServiceWorker from prefetching unnecessary files.
2017-07-28 15:06:49 -07:00
Jeremy Elbourn 1bfc77bf8c docs(aio): pngcrush all pngs (#18243)
PR Close #18243
2017-07-20 17:47:06 -05:00
Pete Bacon Darwin 4cd4f7a208 aio: debounce search and delay index building (#18134)
* feat(aio): debounce search requests

* feat(aio): delay loading search worker and index
2017-07-20 09:51:40 -07:00
Peter Bacon Darwin 7d0f2cd51e fix(aio): remove title attribute from `CodeExampleComponent`
This was causing browser to add an unwanted tooltip that appeared
when the user hovers over the code.

See #17524
2017-07-18 17:55:28 +01:00
Georgios Kalpakas 92179bcc64 fix(aio): do not wrap `<code-tabs>` tab labels
Fixes #17751
2017-07-18 17:43:59 +01:00
Peter Bacon Darwin cdb069ab0e docs(aio): fix cheatsheet layout for narrow screens
* Tell the app that this will have no Table of Contents, since we have no
h2 headings anyway.
* Remove all the `nbsp;` from the code since that doesn't help with layout
* Remove side padding from sidenav-content when screen is narrow
* Restyle the cheatsheet table when the screen is narrow
2017-07-18 17:32:43 +01:00
Georgios Kalpakas c649da9f0a fix(aio): remove unused `news.html` file
Although outdated and not used, the file would be picked up and showed in search
results.
2017-07-15 15:29:20 +01:00
Peter Bacon Darwin be3352a084 build(aio): render grouped overloads 2017-07-13 12:16:20 -07:00
Georgios Kalpakas 4d45fe6fb5 fix(aio): fix tab animations on CodeTabsComponent
In our attempt to remove the material ripple effect from tab labels, we were
killing all `transform`-based animations on other `md-tab-group` elements, such
as animating the content when entering/leaving. (This wasn't an issue on Chrome,
because it didn't respect our `!important` flag.)
This commit fixes it by properly hiding the ripple effect (using a feature
introduced in angular/material2@e4789c7b8) and allowing other animations to
execute normally.

Fixes #17998
2017-07-11 11:49:22 -07:00
Georgios Kalpakas 076ea2281f test(aio): add tests for CodeTabsComponent 2017-07-11 11:49:22 -07:00
Georgios Kalpakas aec39c28d8 refactor(aio): remove unnecessary comments/imports, improve indentation 2017-07-11 11:49:22 -07:00
Peter Bacon Darwin e8bbf86e66 build(aio): add terms from heading to the search index 2017-07-11 15:04:37 +01:00
Peter Bacon Darwin 062a7aa2cf build(aio): revert to general purpose search algorithm
Now that we have upgraded to the latest lunr search engine, the results
from the standard `search` method are more appropriate.
So we do not need to create our own special queries to get good results.
2017-07-11 15:04:37 +01:00
Georgios Kalpakas cb7609109d fix(aio): fix text blurring when hovering over item in resources
Fixes #17907
2017-07-10 12:24:10 +01:00
Victor Berchet c723d42d0a refactor: fix typos (#18000) 2017-07-07 16:55:17 -07:00
George Kalpakas 504500de50 fix(aio): activate ServiceWorker updates asap (#17699)
Previouly, whenever a new ServiceWorker update was detected the user was
prompted to update (with a notification). This turned out to be more distracting
than helpful. Also, one would get notifications on all open browser tabs/windows
and had to manually reload each one in order for the whole content (including
the app) to be updated.

This commit changes the update strategy as follows:
- Whenever a new update is detected, it is immediately activated (and all
  tabs/windows will be notified).
- Once an update is activated (regardless of whether the activation was
  initiated by the current tab/window or not), a flag will be set to do a
  "full page navigation" the next time the user navigates to a document.

Benefits:
- All tabs/windows are updated asap.
- The updates are applied authomatically, without the user's needing to do
  anything.
- The updates are applied in a way that:
  a. Ensures that the app and content versions are always compatible.
  b. Does not distract the user from their usual workflow.

NOTE:
The "full page navigation" may cause a flash (while the page is loading from
scratch), but this is expected to be minimal, since at that point almost all
necessary resources are cached by and served from the ServiceWorker.

Fixes #17539
2017-07-07 11:17:19 -07:00
Stefanie Fluin e1174f3774 fix(aio): home & marketing styles cleanup (#17926) 2017-07-07 11:16:51 -07:00
Ward Bell 4459e0c1c8 fix(aio): restore visible sidenav keyboard focus; shift TOC up
closes #17665
Restores keyboard focus that was removed by commit b8b91d3.
Raises the right-TOC by 20px (96px->76px) because was too far down.

To prevent keyboard focus on hidden child nodes,
also collapses inner expanded nodes when parent node is collapsed.
The implicit parent node of top nodes is always expanded.
2017-06-30 11:58:10 +01:00
Georgios Kalpakas b052ef5f1e fix(aio): do not include hidden content in window title
The window title is derived based on the current document's `<h1>` heading. Such
headings may contain hidden/non-visible content (e.g. textual name of font
ligatures: `<i class="material-icons">link</i>`) that should not be included in
the title.

This commit fixes this by using `innerText` (instead of `textContent`) to
extract the visible text from the `<h1>` heading. It will still fall back to
`textContent` on browsers that do not support `innerText` (e.g. Firefox 44).

Fixes #17732
2017-06-30 11:54:01 +01:00
Ward Bell 3ce9d51a9c fix(aio): prefix `location.assign` with `window.`
No practical effect but clears the TS compiler warning.
2017-06-23 11:53:53 -07:00
Georgios Kalpakas 14d2de13bb fix(aio): fix links on `/about` in Firefox
Fixes #17661
2017-06-23 11:53:22 -07:00
Georgios Kalpakas 5713e7c9b6 refactor(aio): clean up `aio-contributor` template and styles 2017-06-23 11:53:22 -07:00
Georgios Kalpakas 87206e1986 fix(aio): preserve newlines when copying code
Before 4f37f8643, we were using `innerText` to retrieved the code content for
copying. This preserved the text layout (including newlines), but suffered from
other issues (browser support, performance). With 4f37f8643 we switched to
`textContent`, which works well except in the following case:
When `prettify` formats the code to have line numbers, it removes the newlines
and uses `<li>` elements instead. This affects `textContent`.

This commit fixes this by keeping a reference of the code as text and using that
for copying.

Fixes #17659
2017-06-23 11:53:01 -07:00
Georgios Kalpakas 494a0d064a fix(aio): fix topbar nav-item focus style
Fixing it requires upgrading `@angular/material` to v2.0.0-beta.7.

Fixes #17216
2017-06-23 11:51:17 -07:00
Trotyl Yu b1fe63d081 fix(aio): add missing WeakMap polyfill 2017-06-23 09:03:07 -07:00
Ward Bell 34cc3f2982 feat(aio): display “Searching ..." while building search index
closes #15923
2017-06-21 14:31:32 -07:00
Ward Bell bb804dd3e9 feat(aio): select contributor group with URL “about?group=gde”
closes #17656
also adds test for ContributorListComponent.
2017-06-21 13:50:57 -07:00
Ward Bell 0034bb28e5 fix(aio): restore component-styles/exclude hidden children 2017-06-21 11:33:19 -07:00
Georgios Kalpakas 2447bd1bac fix(aio): leave results panel open when opening search result on new page
Fixes #17580
2017-06-19 15:12:46 -07:00
Georgios Kalpakas 1c6a252596 build(aio): upgrade jasmine to v2.6.4
This version fixes the DISCONNECTED errors (described in #17543) and removes the
need to the workaround (8af203c).
The relevant jasmine commit is jasmine/jasmine@c60d66994.
2017-06-19 15:12:25 -07:00
Georgios Kalpakas 4f37f86433 fix(aio): switch from `innerText` to `textContent` to support older browsers
`innerText` is not supported in Firefox prior to v45. In most cases (at least
the ones we are interested in), `innerText` and `textContent` work equally well,
but `textContent` is more performant (as it doesn't require a reflow).

From [MDN][1] on the differences of `innerText` vs `textContent`:

> - [...]
> - `innerText` is aware of style and will not return the text of hidden
>   elements, whereas `textContent` will.
> - As `innerText` is aware of CSS styling, it will trigger a reflow, whereas
>   `textContent` will not.
> - [...]

[1]: https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent#Differences_from_innerText

Fixes #17585
2017-06-19 10:32:36 -07:00
Georgios Kalpakas f58211d9d8 fix(aio): improve no-javascript screen 2017-06-16 12:04:45 -07:00
Georgios Kalpakas fe126cb737 fix(aio): remove unused icon reference and file
These icons are not there (and never were afaict).

Fixes #17561
2017-06-16 12:03:43 -07:00
Jules Kremer 2c3e948e61 docs(aio): update about page 2017-06-15 07:49:41 +01:00
Jesse Palmer 53f57d74b8 feat(aio): add iphone pwa features 2017-06-15 07:47:49 +01:00
Georgios Kalpakas 01173b9441 fix(aio): do not log messages in production
In dev mode, all messages passed to `Logger` will be logged.
In production mode, only warnings and errors will be logged.

Fixes #17453
2017-06-15 07:46:03 +01:00
Georgios Kalpakas 0564dd25e2 refactor(aio): remove unused `Logger` dependencies 2017-06-15 07:46:03 +01:00
Georgios Kalpakas a8afa65a54 fix(aio): specify large image for PWA splash-screen 2017-06-14 09:36:54 -07:00
Peter Bacon Darwin 2bdf2feea7 test(aio): add async beforeEach to prevent Chrome disconnects
Related to 3d5f520ff0 from #17405
2017-06-14 15:29:35 +01:00
Georgios Kalpakas 607fb1fff8 fix(aio): always cover the whole footer with its background
Fixes #17465
2017-06-14 15:01:06 +01:00
Georgios Kalpakas b4cd20cbbc fix(aio): make the footer links clickable on all browsers
The footer background (implemented via `footer:after`) had a higher `z-index`
than other footer elements and was obscuring the footer links on certain
browsers (Firefox, Edge, IE), which made them unclickable.
This commit lowers the index of `footer:after`, so that links are clickable on
these browsers.

Fixes #17460
2017-06-13 14:05:37 -07:00
Peter Bacon Darwin 052331fabc build(aio): add staging environment
You can now specify what environment you are building
by add it to the `yarn build` command. For example:

```
yarn build -- --env=stage
```

Moreover the `deploy-to-firebase.sh` script will automatically apply the
appropriate environment.
2017-06-13 13:43:36 +01:00
Georgios Kalpakas 709a3f6de7 fix(aio): fix scrolling to elements near the bottom of the page
Previously, we always assumed that elements would be scrolled to the top of the
page, when calling `element.scrollIntoView()`. This is not true for elements
that cannot be scrolled to the top, e.g. when the viewport height is larger than
the height of the content after the element (common for small sections near the
end of the page).
In such cases, we would unnecessarily scroll up to account for the static
toolbar, which was unnecessary (since the element was not behind the toolbar
anyway) and caused ScrollSpy to fail to identify the scrolled-to section as
active.

This commit fixes it by ensuring that we do not scroll more than necessary in
order to align the top of the element with the bottom of the toolbar.

Fixes #17452
2017-06-13 11:54:05 +01:00
Peter Bacon Darwin 7caa0a8aa4 fix(aio): show search results when search box gets focus
Due to a previous commit, the search was only triggered
if the query changed, and not when the search box regained
focus.
2017-06-13 11:26:35 +01:00
Peter Bacon Darwin 0f56296c24 fix(aio): use locally hosted lunr library
The library is downloaded from npm but then
copied into the assets folder (and ignored by git)
as part of the postinstall step.
2017-06-13 11:26:35 +01:00
Peter Bacon Darwin 0a846a2fce fix(aio): make search results better
* update to latest version of lunr search
* add trailing wildcard to search terms to increase matches
* fix unwanted error when escape was pressed

Closes #17417
2017-06-13 11:26:35 +01:00
Georgios Kalpakas bffccf4622 fix(aio): fix buttons in "Home" and "Features"
Using `<a>` inside a `<button>` is not syntactically valid HTML and breaks on
some browsers (e.g. Firefox). Furthermore, clicking the button doesn't do
anything unless you click on the link (e.g. clicking on the padding around the
link does nothing), which is inconvenient and confusing.

Fixes #17448
2017-06-13 11:24:36 +01:00
Peter Bacon Darwin d647db222c fix(aio): ensure that API filter page can display 3 columns in wide view
Fixes #17251
2017-06-13 07:41:10 +01:00
Peter Bacon Darwin 0c7eb93889 fix(aio): tidy up layout of api filter page
* Remove the "info-banner" styling from the filters.
* Fix alignment of the search box on a narrow screen (closes #17395)
* Remove unnecessary whitespace before section headers
2017-06-13 07:41:10 +01:00
Peter Bacon Darwin d2d8e5d40f fix(aio): remove outline from search input on focus
Closes #17396
2017-06-13 06:56:21 +01:00
Igor Minar 0268818fbb build(aio): update Google Analytics property id for the prod environment
This is the same property ID as the one used by the current angular.io.
2017-06-12 15:49:41 -07:00
Georgios Kalpakas 3d5f520ff0 test(aio): fix Chrome getting disconnected during unit tests
Chrome (v58+) often gets disconnected during unit tests (causing them to fail).
This has been happening locally (on Windows) and on Travis. The exact reasons
are not known, but it seems that some of the `AppComponent` tests are to blame.

Based on the discussion in https://github.com/jasmine/jasmine/issues/1327 (and
plenty of trial-and-error), using Jasmine's `done()` callback before each of
test (even calling it synchronously) fixes the issue.
2017-06-12 13:59:44 +01:00
Peter Bacon Darwin e543272eb3 fix(aio): remove gap between sidenav menus
Fixes #17394
2017-06-11 15:05:04 +01:00
Kapunahele Wong d56b7ed96d docs(aio): reorganise the sidenav menu (#16934)
Reorganizes the items in the sidenav menu and consolidates the quickstart
and cli-quickstart guides into one.
2017-06-09 14:48:53 -07:00
George Kalpakas 65d49d5c94 fix(aio): temporarily remove link to source from the API pages (#17371)
We need to come up with a better design (possibly involving an icon button) to
link to the source code (for viewing and/or editing).

Fixes #17254
2017-06-09 14:14:39 -07:00
Georgios Kalpakas ce18c68eca fix(aio): temporarily remove the focus style of top-bar nav items
Temporarily addresses #17216 until we upgrade to an `@angular/material` version
that includes angular/material2@3bc82f6dc.
2017-06-09 20:37:12 +01:00
Ward Bell 2d5623911a fix(aio): sidebar folder state after select item
Closes #17245 and #17253

When the user selects a doc item in the side nav:
1) expand folder(s) leading to the selected doc item
2) on a wide display, keep other already expanded folders open
3) on narrow (mobile) display, collapse other expanded folders

Used to do (3) when wide. Issue #17245 asks for (2).

That logic was bypassed for selected node when we allowed headers to have content
because that unintentionally expanded the header’s folder when selected.
Because the selected node is no longer a header with content, removing this exclusion
also means that folders are expanded/collapsed with above logic even for API pages.
2017-06-09 16:53:54 +01:00
Georgios Kalpakas e894f5c399 fix(aio): expand the main content width when there is no ToC
Previously, the main content would always leave a 18% margin on the right to be
occupied by the ToC (even if there was no ToC).
This commit lets the main content expand to the right to occupy all the
available space when there is no ToC.

Fixes #17205
Fixes #17270
2017-06-09 13:33:51 +01:00
Georgios Kalpakas 8524187869 fix(aio): restrain scrolling inside ToC (when cursor over ToC)
Previously, when scrolling the ToC and reaching the top/bottom, further
mousewheel events would result in scrolling the window (and thus the main
content). This is standard browser behavior. In the case of the ToC though, the
`ScrollSpy` would detect scrolling in the main content and scroll the active ToC
to entry into view, thus resetting the scroll position of the ToC.

Reproduction:
1. Open  `~/guide/template-syntax`.
2. Start scrolling through the long ToC.
3. Try to go to the bottom of the ToC.
4. Once you reach the bottom, the main content starts scrolling down.
5. The first section ("HTML in templates") becomes "active", so the ToC is
   scrolled back up to make its corresponding entry visible.
6. Go back to step 2.

This commit improves the UX, by not allowing the main content to scroll when the
cursor is ovr the ToC and the user has scrolled all the way to the top/bottom of
it.
2017-06-09 10:38:06 +01:00
Georgios Kalpakas f7422a9607 fix(aio): animate hamburger in/out
Fixes #17215
2017-06-09 08:17:48 +01:00
Ward Bell 41a765d715 fix(aio): re-color code pretty print
closes #17246
2017-06-08 14:00:16 -07:00
Stefanie Fluin 75a311f250 fix(aio): style and fix hover color for features cta button (#17342) 2017-06-08 12:09:33 -07:00
Stefanie Fluin 391ed6334d fix(aio): copy code button overlap fix on mobile (#17302) 2017-06-08 12:08:03 -07:00
Stefanie Fluin 0940e6d6ed fix(aio): contributor img offset and hover fix (#17338) 2017-06-08 12:00:43 -07:00
Stefanie Fluin 680128bc09 fix(aio): alert, subsection and callout width fix (#17303) 2017-06-08 11:57:09 -07:00
Ward Bell 5364b51979 fix(aio): scroll to top immediately when doc changes (#17310) 2017-06-08 11:56:36 -07:00
Stefanie Fluin 67ef0f0c8f fix(aio): api list column overflow fix (#17300) 2017-06-08 11:54:57 -07:00
George Kalpakas 8be2e4c325 fix(aio): make the ToC left hand-side bar shorter (#17280)
Make the ToC left hand-side bar shorter, so that it starts at the initial bullet
and ends at the final bullet.

Fixes #17221
2017-06-08 00:56:00 -07:00
George Kalpakas 33ba3e31ed fix(aio): smoother transition from page with SideNav to homepage (#17312)
When navigating from a page with open SideNav to a page without closed SideNav,
the main content area animates from a non-zero left margin to zero left margin.
Additionally, the top-bar on the homepage is transparent, which allows the white
background behind the main content to be seen while the left margin is animated
to zero, making it appear as if something (e.g. the SideNav covers the top-bar).

This commit works around this issue, by not making the top-bar transparent
immediately when navigating to the homepage, but animating it from its blue
color to transparent with a delay.

Fixes #17248
2017-06-08 00:49:54 -07:00
Peter Bacon Darwin a4a2901294 fix(aio): remove `...` separator from search results
An ellipsis was used to separate the most relevant search
results from the alphabetic list. The separator was confusing
because it was not clear what it represented.

This has been removed and the most relevant results are now
indicated by styling with a more bold font and a bit of whitespace
between them and the rest of the results.

To keep things consistent, if there are fewer than 5 results all the
results are now displayed as priorityPages.

Closes #17233
2017-06-07 12:40:39 -07:00
Peter Bacon Darwin bb46f54ad7 refactor(aio): use the SelectMenuComponent for all select menus
The API filters and the docs version switcher now use
the SelectMenuComponent.

Fixes #16367 and #17055
2017-06-07 11:27:10 -07:00
Peter Bacon Darwin c9b930dd82 feat(aio): add `aio-select` component
Provide the functionality for select menus in a single reusable component.
2017-06-07 11:27:10 -07:00
Peter Bacon Darwin e317f7d51c feat(aio): do not display anchor if heading has `no-anchor` class 2017-06-07 11:26:27 -07:00
Stefanie Fluin 3ddd28d37d fix(aio): update contrast on mediumgray color 2017-06-07 11:26:13 -07:00
Georgios Kalpakas d837bfc2d7 fix(aio): fix scrolling to an element
Previously, the top-bar's height wasn't taken into account when scrolling an
element into view. As a result, the element would be hidden behind the top-bar.
Taking the top-bar height into account was not necessary before #17155, because
the top-bar was not fixed (i.e. it scrolled away).

This commit fixes the scrolling behavior by accounting for the top-bar's height
when scrolling an element into view.

(This partially reverts #17102.)

Fixes #17219
Fixes #17226
2017-06-07 14:37:46 +01:00
Georgios Kalpakas 4759975be6 fix(aio): adjust SideNav top to avoid extra whitespace
Partially addresses #17096.
2017-06-07 13:37:30 +01:00
Stefanie Fluin 078a4b00a7 fix(aio): fix button alignment and jump
- Fix alignment on get started button on home page
- Remove jump by removing arrow from learn more button on home page
2017-06-07 09:11:20 +01:00
Jesus Rodriguez d4e196035c build(aio): update features and presskit marketing pages 2017-06-06 13:08:48 -07:00
Georgios Kalpakas b8979c8701 fix(aio): fix and clean up topbar styling
Restore the changes introduced in #17075, which wre accidentally overwritten
while rebasing #17155. Also, simplify the topbar positioning rules.
2017-06-06 13:08:39 -07:00
Georgios Kalpakas bfdd3398f6 fix(aio): make `ScrollSpy` respond quicker to `scroll` events
Fixes ##17220
2017-06-06 13:08:30 -07:00
Jesus Rodriguez 3a121a621f build(aio): migrate contribute page to html 2017-06-06 16:38:29 +01:00
Stefanie Fluin 95f1ea2f12 fix(aio): topnav toolbar position styles
- Fixed topnav on all mobile
- Fixed topnav on all docs pages
- Absolute topnav on all marketing pages
- Cleanup and code consolidation for all top-menu styles
- Add styling to topnav links on focus
2017-06-06 14:51:19 +01:00
Pete Bacon Darwin 784347f61f fix(aio): ensure all views can indicate the active node (#17194)
When more than one node matches a url, the last
node defined in the navigation.json file won. This
meant that, for instance, items in both the
TopBarNarrow and the Footer views would not
indicate that they were active.

Now, each url is associated with a map of current
nodes keyed off their view.

Closes #17022
2017-06-05 23:36:22 -07:00
Stefanie Fluin 76b4b80a23 fix(aio): fix search box overlap for small devices (#17075)
- Adjust search box height
- Adjust search box standard width and width for smaller devices
- Fix search jump outside of specified max width
2017-06-05 22:57:17 -07:00
Georgios Kalpakas f2d810febc fix(aio): fix ToC styling
- Make the left bar gray (instead of blue).
- Show gray dot when hovering over an element.
- Hide left bar and dots in embedded mode.
2017-06-04 15:12:29 +01:00
Georgios Kalpakas 35f714e438 fix(aio): place progress bar at the top
Previously, the progress bar would be placed right under the static top bar. Now
that the top bar i not tatic any more, it makes more sense to place the progress
bar at the top of the page.

Fixes #17103
2017-06-02 17:31:53 -04:00
George Kalpakas 7822187b17 fix(aio): fix scrolling to top (#17102)
Previously, the `#top-of-page` element (used when scrolling to top) was placed
inside the content section (which at the time had zero top margin and padding).
Furthermore, there was a top offset applied when scrolling that took the static
top bar's height into account. Since now the top bar is not static any more and
the content section has a non-zero top padding, scrolling to top does not work
as expected.

This commit fixes this by:
- Moving the `#top-of-page` element to the top of the `aio-shell`.
- Stop accounting for the top bar's top.

Fixes #17006
2017-06-01 14:03:10 -07:00
Stefanie Fluin 1338995ee9 fix(aio): fix home learn more button alignment (#17154) 2017-06-01 09:37:42 -07:00
Stefanie Fluin 47e4fca7fd fix(aio): swap feature headers for divs to remove anchors and fix feature image resizing (#17156) 2017-06-01 09:37:27 -07:00
Igor Minar 1f9a3dd1e6 fix(aio): fix typo in web worker check (#17133) 2017-05-31 05:43:55 -05:00
Igor Minar 11505fa0d8 fix(aio): disable search on browsers that don't support web workers 2017-05-31 05:22:39 -05:00
Igor Minar 9326e062d8 fix(aio): googlebot polyfill fix 2017-05-31 05:22:39 -05:00