Commit Graph

18 Commits

Author SHA1 Message Date
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
George Kalpakas a99eb16320 test(aio): make e2e tests less flakey
closes #20117
2017-11-03 11:22:57 -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 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
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
Ward Bell a68ad6d58d feat(aio): sidenav headers should be focusable buttons
Sidenav headers had been anchors w/o hrefs. These can’t take focus which makes you can’t navigate through them with keyboard. For a11y purposes, this PR turns them into buttons.
2017-05-16 10:02:08 +01:00
Stefanie Fluin 25132bff86 feat(aio): marketing page styles 2017-04-03 15:48:52 -07:00
Ward Bell 9f2acf54bc feat(aio): refactors AppComponent and its kids + sidenav hiding (#15570)
-hides sidenav when current doc is not in sidenav menu
-displays top menu on the side as nodes instead of mini top menu
2017-03-29 14:13:40 -07:00
Pete Bacon Darwin 8b4edcc7ad build(aio): output `{@example}` tags as `<code-example>` elements (#15382) 2017-03-22 13:24:40 -07:00
Peter Bacon Darwin fc1f6efe0d build(aio): fix paths to "index" pages
Content pages like `tutorial/index.md` were being mapped to `tutorial.index.json`,
which meant that they could only be rendered if you browsed to `/tutorial/index`.

This didn't sit well so now these pages are mapped to `tutorial.json`, which
means that you browser to them via `/tutorial/` or just `/tutorial`.

Fixed #15335
2017-03-21 15:20:28 -05:00
Peter Bacon Darwin 31ef92fc36 build(aio): fix generated github links
The change from `modules` to `packages` needed to be applied to these links.
2017-03-21 15:20:28 -05:00
Ward Bell 1c1085b140 feat(aio): add google analytics (#15081) 2017-03-13 18:08:23 -07:00
Peter Bacon Darwin 62eafa4eec test(aio): fix up links in app e2e test 2017-03-02 00:21:06 -08:00
Ward Bell a26eb4c04e test(aio): redefine pipe test as a pending test to confirm code example 2017-02-22 17:53:56 -08:00
Ward Bell 9a6f3d637f feat(aio): add sidenav driven by navigation data (#14429) 2017-02-15 11:22:37 -08:00
Pete Bacon Darwin 600402d440 build(aio): big move of docs related files (#14361)
All the docs related files (docs-app, doc-gen, content, etc)
are now to be found inside the `/aio` folder.

The related gulp tasks have been moved from the top level
gulp file to a new one inside the `/aio` folder.

The structure of the `/aio` folder now looks like:

```
/aio/
  build/         # gulp tasks
  content/       #MARKDOWN FILES for devguides, cheatsheet, etc
    devguides/
    cheatsheets/
  transforms/    #dgeni packages, templates, etc
  src/
    app/
    assets/
    content/    #HTML + JSON build artifacts produced by dgeni from /aio/content.
                #This dir is .gitignored-ed
  e2e/           #protractor tests for the doc viewer app
  node_modules/ #dependencies for both the doc viewer builds and the dgeni stuff
                #This dir is .gitignored-ed
  gulpfile.js   #Tasks for generating docs and building & deploying the doc viewer
```

Closes #14361
2017-02-09 11:58:36 -08:00