391 Commits

Author SHA1 Message Date
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 3d5f520ff08f00f89f323f1ec3bcd1e0c3f38596 from #17405
2017-06-14 15:29:35 +01:00