Commit Graph

880 Commits

Author SHA1 Message Date
Michael 5dd5bfde72 docs(aio): remove "_" from private property name
follow best practices from the documentation: https://angular.io/guide/styleguide#properties-and-methods
2017-06-22 14:55:42 -07:00
David 400486ced7 docs(aio): correct typos in Tour of Heroes `HeroSearchService` 2017-06-22 14:55:17 -07:00
bmarkov 1a947e4b75 docs(aio): Added resources to UI Components (#17635)
docs(aio): Added resources to UI Components
2017-06-22 14:52:58 -07:00
Kapunahele Wong 92bcfefc35 docs(aio): remove min, max & move built-in validators paragraph 2017-06-22 14:51:05 -07:00
Stepan Suvorov 133b5e6e36 docs(aio): added link to Russian Angular Courses 2017-06-22 14:46:24 -07:00
Mark Amery 8c129d73b8 docs: Fix some non-code being formatted as code in the router docs 2017-06-22 14:38:55 -07:00
Ward Bell 37cdc4f759 docs(aio): ward's changes 2017-06-21 16:21:20 -07:00
Shefali Sinha b1dab181e0 docs(aio): change to overall prose 2017-06-21 16:21:20 -07:00
Shefali Sinha fd6c4e371b docs(aio): create author style guide 2017-06-21 16:21:20 -07:00
Ward Bell 34cc3f2982 feat(aio): display “Searching ..." while building search index
closes #15923
2017-06-21 14:31:32 -07:00
Filipe Silva 97fd2480e7 fix(aio): fix patch script on windows
Running the patch script on Windows (with `patch` available) yields an invalid syntax warning, and does not apply patches.

```
kamik@T460p MINGW64 /d/work/angular/aio (master)
$ yarn postinstall
yarn postinstall v0.24.6
$ node tools/cli-patches/patch.js && uglifyjs node_modules/lunr/lunr.js -c -m -o src/assets/js/lunr.min.js --source-map
The syntax of the command is incorrect.
Done in 1.52s.
```
2017-06-21 13:51:35 -07:00
Peter Bacon Darwin 1d93cf2e85 build(aio): ensure all doc tests are run
It is not possible to run all the docs tests directly via the  jasmine CLI.
Instead we now have a small script that will run jasmine via its library.
2017-06-21 13:51:15 -07:00
Peter Bacon Darwin 3fb98fe4ea build(aio): do not recurse node_modules when loading examples in doc-gen 2017-06-21 13:51:15 -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
Ward Bell ca51e020cb fix(aio): redirect "cli-quickstart" to "quickstart" 2017-06-21 11:33:19 -07:00
Dan Lipsitt d16852898f docs(aio): fix numbered list in testing.md
This list renders OK in the github UI but not at https://angular.io/guide/testing#setup
2017-06-20 16:43:26 -07:00
Jules Kremer 00874c27f4 docs(aio): update resource listing 2017-06-20 12:58:02 -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
Alex Rickabaugh 3093c55e9e build(aio): update @angular/service-worker to 1.0.0-beta.16
This version includes a fix for potential cache corruption and invalid redirect behavior in rare cases.
2017-06-16 13:33:37 -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
Georgios Kalpakas adc1b129e4 fix(aio): correctly redirect `/docs/ts/latest` and `/styleguide`
Previously, we had redirect rules for Firebase for `/docs/ts/latest` and
`/styleguide`, but once the ServiceWorker was activated, it would take over
routing and rewrite these requests to `/index.html`.
This commit fixes it by excluding them from ServiceWorker routing.

Fixes #17542
2017-06-16 12:02:52 -07:00
Paul Gschwendtner 956a7e95d7 docs(aio): re-add biography entry for devversion
With SHA 2c3e948e61 the biography of Paul Gschwendtner has been accidentally removed.

This re-adds the biography entry (picture still present) as requested on Slack.
2017-06-16 07:56:15 +01:00
Georgios Kalpakas ce00fa3627 build(aio): do not fail if `check-env` for the main angular project fails
Fixes #17434
2017-06-16 07:51:18 +01:00
Georgios Kalpakas 77e717e872 build(aio): remove dependency on build artifacts from parent folder 2017-06-16 07:51:18 +01:00
Georgios Kalpakas 2cc931ed2a fix(aio): add missing redirect rule for `/styleguide`
Fixes #17542
2017-06-16 07:49:51 +01: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
Kapunahele Wong 2b1de07f02 docs(aio): incorporate Ward's comments 2017-06-15 07:46:44 +01:00
Kapunahele Wong fb877696bf docs(aio): add short section on built-in validators, copy edits 2017-06-15 07:46:44 +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
Jesus Rodriguez ba0f6decc3 build(aio): extra redirect rule 2017-06-15 07:45:47 +01:00
David Herges 06a0cf2e31 docs(aio): http guide shows how to import toPromise operator from rxjs
Solves #17454
2017-06-15 07:45:12 +01:00
Georgios Kalpakas a8afa65a54 fix(aio): specify large image for PWA splash-screen 2017-06-14 09:36:54 -07:00
Georgios Kalpakas f73a4c229c build(aio): upgrade lighthouse to v2.1 2017-06-14 09:36:54 -07:00
Georgios Kalpakas d378a29565 ci(aio): fail the build if the PWA score is too low
Previously, there was an issue with testing the PWA score on staging and failing
the build was temporarily disabled. It works now, so we need to enable failing
the build is the score drops below some threshold.
2017-06-14 09:36:37 -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
Trotyl Yu 38fc2a0055 fix(aio): fix trackBy demo in template-syntax article 2017-06-14 12:04:59 +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
Frederik Prijck 98308cd79c docs(aio): update typescript for `examples/webpack` to same as cli 2017-06-13 10:28:10 -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
Ward Bell 541c9a94bf docs(aio): i18n guide - updates for v4 2017-06-13 12:38:38 +01:00
Peter Bacon Darwin 12452d4ab4 build(aio): increase docs integration test timeouts
The API docs tests have very variable run times, depending
upon the build environment.
This change doubles their test timeout values to prevent
false-negative failures.
2017-06-13 11:56:45 +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
Ward Bell fc774a1871 docs: clarify when non-null-assertion-operator is needed in template-syntax 2017-06-13 08:02:30 +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
Jules Kremer 0658e1da7f docs(aio): rename Upgrade docs to cheatsheet 2017-06-13 07:15:05 +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 5e794492c1 build(aio): make deploy-to-firebase.sh executable 2017-06-12 16:14:17 -07: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 234268eec2 ci(aio): deploy commits on the stable branch to production
The current stable branch is determined based on the current version mapped to
the npm `latest` tag (by replacing the patch version number with 'x' - e.g.
`1.2.3` --> `1.2.x`).
PRs against the stable branch will be deployed to the preview server (as long as
the rest of the requirements are met). Commits on the stable branch itself will
be deployed to production.

Fixes #16908
2017-06-12 15:49:22 -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
Georgios Kalpakas a1065bfaf0 build(aio): upgrade Jasmine-related dependencies
According to https://github.com/jasmine/jasmine/issues/1327#issuecomment-306924549,
this might help with help with frequent DISCONNECTED errors (especially on Travis).
2017-06-12 13:59:44 +01:00
Georgios Kalpakas d6f345cc3c build(aio): upgrade Karma-related dependencies 2017-06-12 13:59:44 +01:00
Georgios Kalpakas d961911a98 docs(aio): fix broken example in upgrade guide
Fixes #17109
2017-06-11 18:37:27 +01:00
Peter Bacon Darwin e543272eb3 fix(aio): remove gap between sidenav menus
Fixes #17394
2017-06-11 15:05:04 +01:00
Igor Minar afbc2b0082 build(aio): upgrade purify to deal with messed up comment in animations code 2017-06-09 18:31:50 -07:00
Igor Minar 69ec1e2e31 build(aio): upgrade to @angular/*@4.2.1 2017-06-09 18:31:50 -07:00
Igor Minar ff15509bc7 build(aio): turn on webpack 3.0 scope-hoisting 2017-06-09 18:31:50 -07:00
Igor Minar 7e22a2fc0b build(aio): remove duplicate webpack version 2017-06-09 18:31:50 -07:00
Igor Minar 0a48c92d2c build(aio): upgrade to purify 0.0.24 that supports webpack 3.0 2017-06-09 18:31:50 -07:00
Igor Minar 991ca92a9d build(aio): turn off vendor chunking
This was done to prevent webpack from generating cross chunk registry calls which prevent DCE.
2017-06-09 18:31:50 -07:00
Igor Minar c550f885a4 build(aio): upgrade to an unreleased version of cli with webpack 3.0-rc.0 2017-06-09 18:31:50 -07:00
Igor Minar 851038c3a8 build(aio): upgrade @angular/service-worker to beta.15 2017-06-09 18:31:50 -07:00
Jesús Rodríguez df7774c018 docs(aio): restore animation original value (#17385) 2017-06-09 18:27:11 -07: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
Jesús Rodríguez db5e5067a0 build(aio): update typescript to 2.3.2 (#17382) 2017-06-09 14:36:36 -07:00
Jesús Rodríguez 0020dad595 docs(aio): update examples to 4.2 (#17367) 2017-06-09 14:35:35 -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
Igor Minar 503fd1fbaf docs(aio): fix image width on the homepage 2017-06-09 13:32:52 -07:00
Igor Minar 4c74dba2f3 docs(aio): update events page 2017-06-09 13:32:52 -07:00
Jesús Rodríguez 33df13ad65 build(aio): update to 4.2 (#17369) 2017-06-09 13:31:12 -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
Peter Bacon Darwin a0b30e5dfb docs(aio): remove example specific `.gitignore` files
All the files that should be ignored are defined in the
`aio/content/examples/.gitigore` folder.
2017-06-09 14:33:21 +01:00
Peter Bacon Darwin 76a920651c docs(aio): remove cli-quickstart styles.css from git 2017-06-09 14:33:21 +01:00
Peter Bacon Darwin ef6609a723 docs(aio): remove example specific styles from the shared boilerplate styles.css 2017-06-09 14:33:21 +01:00
Peter Bacon Darwin c0dcb342f3 docs(aio): create styles.css snippet file for toh-pt5 example 2017-06-09 14:33:21 +01:00
Peter Bacon Darwin 8a9a5ecdd7 docs(aio): move example specific styles into router example app.css file 2017-06-09 14:33:21 +01:00
Peter Bacon Darwin 12c5ead39c docs(aio): do not ignore i18n example js file 2017-06-09 14:33:21 +01:00
Peter Bacon Darwin 3db6b6ca7a build(aio): ignore example files that are gitignored
Rather than hard coding excludes into the dgeni config,
use the fact that we are already ignoring the boilerplate
and generated files via the .gitignore file.
2017-06-09 14:33:21 +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
Igor Minar 576d6d8f86 feat(aio): update the home page and docs landing page content (#17325)
Closes #17268
Closes #17230
2017-06-08 15:26:15 -07:00
Ward Bell 41a765d715 fix(aio): re-color code pretty print
closes #17246
2017-06-08 14:00:16 -07:00
Ward Bell f370fd36e0 docs: "TypeScript to JavaScript" code tab renamed “ES6 + Decorators”
closes #17260
2017-06-08 14:00:06 -07:00
Jesus Rodriguez 5a71df0cb3 build(aio): rename features header 2017-06-08 12:57:42 -07:00
Ward Bell 6a46cabb10 docs: security guide images
closes #17263
2017-06-08 12:57:13 -07:00
Chuck Jazdzewski 74673545c0 docs(aio): document the non-null assertion operator 2017-06-08 12:55:19 -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 4d2ee51bb0 fix(aio): remove glossary l-sub-section class (#17305) 2017-06-08 11:58:49 -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
Ward Bell cba2b3c72d docs(aio): add “nougat” to compat chart
closes #17262
2017-06-07 12:40:50 -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 a39f7d63bb docs(aio): use h1 rather than divs and hide heading anchors
In the marketing pages we do not want to show heading anchors on hover.
Previously, this was achieved by using div rather than heading elements.
Now we can use semantically accurate headings while hiding the anchor.

Closes #17244
Closes #17264
2017-06-07 11:26:27 -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
Jesus Rodriguez c06f4fc702 docs(aio): remove tutorial from docs landing page 2017-06-06 16:38:09 +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
Igor Minar 42176a7ac4 build(aio): upgrade ngo and purify (#17210) 2017-06-05 23:03:26 -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
Jesus Rodriguez 734f30d14c build(aio): ignore .ngsummary.ts files in examples 2017-06-05 11:12:59 -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
Peter Bacon Darwin d5ce086089 build(aio): fix up API doc-gen templates
* Remove whitespace before type specifiers
* Generate `new` and `call` member info for interfaces
* Ensure that there is no double space after class names
2017-06-02 13:18:09 -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
Peter Bacon Darwin cb2cb7c3bd build(aio): display "call" and "new" members of interfaces in API docs 2017-05-31 08:45:50 +03:00
Peter Bacon Darwin 92d99ba279 build(aio): upgrade to dgeni-packages 0.19.1
This provides the fix where static class members were not being displayed
in API docs, closes #17024
2017-05-31 08:45:50 +03:00
Peter Bacon Darwin dfbbbb5e3e build(aio): the the captured h1 as the title for the search index
If there is no title already provided, use the one captured from the renderedContent.
2017-05-31 08:45:31 +03:00
Peter Bacon Darwin 89f317915d build(aio): use the captured h1 as the title if necessary
If the doc does not already have a `title` tag
then use the one captured from the renderedContent in
the final JSON output, instead.
2017-05-31 08:45:31 +03:00
Peter Bacon Darwin 4d5fa5c855 build(aio): capture the h1 title and attach it to the document
The HTML post-processing now collects any h1
that is found in the renderedContent and attaches
it to the doc via the `doc.vFile.title` property.
2017-05-31 08:45:31 +03:00
George Kalpakas 2f35392cd8 fix(aio): make the search-pane larger (and improve the search-box) (#17105)
* fix(aio): make the search-pane larger

Fixes #17094

* feat(aio): give the search-box a type of "search"

This enables browsers to style it better (e.g. add an `x` button for clearing
the field, which allows users to quickly reset the search query and hide
results).
2017-05-30 15:15:54 -07:00
George Kalpakas b056adc032 fix(aio): fix SideNav items alignment (#17106)
Fixes #17097
2017-05-30 15:15:43 -07:00
George Kalpakas 0d894a18fc fix(aio): fix ToC styling (#17110)
There seems to have been a bad rebase of #16228 on top of #16959, which affected
ToC styles from both PRs. This commit restores the horizontal line under `.h1`
elements and the vertical blue bar on the left-hand side of the ToC (with the
circle running along the bar to indicate the active section).

Fixes #17098
2017-05-30 15:15:31 -07:00
Igor Minar 6220b49463 build(aio): upgrade to ngo with top-level NewExpression and CallExpression prefixing (#17063) 2017-05-27 11:46:52 -07:00
Igor Minar aa683a765d fix(aio): add polyfill for GoogleBot (#17062)
I chose to use unknown=polyfill option as per recommendation found at https://github.com/Financial-Times/polyfill-service/issues/852#issuecomment-272097936
2017-05-27 11:44:53 -07:00
Stefanie Fluin b8b91d3418 feat(aio): marketing design refresh
- Add styling for active TOC item
- Add sidenav styles
- Change header tags to divs from index marketing page to remove anchors
- Fix use of card mixin and create separate card-docs class
- Add marketing styling
- Topnav styling when on home landing page
- Remove hamburger menu on home page
- Add fully rounded border to top nav toolbar search input
- Add mobile styles
- Add title banner to other marketing pages
2017-05-27 07:24:03 +01:00
Igor Minar 0018acfede fix(aio): remove es2015 syntax from the onerror webmaster tools debugger (#17056) 2017-05-26 16:48:55 -06:00
Jesús Rodríguez cd5bc64658 docs(aio): update headers for toc (#16969) 2017-05-26 13:28:06 -06:00
Igor Minar 5f723cb92c feat(aio): temporarily add debugging code for google crawler (#17046) 2017-05-26 13:25:33 -06:00
Peter Bacon Darwin 694951096c feat(aio): provide noop service worker file
Use this file if we need to turn off the service worker in deployed sites
in an emergency where the worker has a bug that is blocking the application
from working.

Closes #16897
2017-05-26 14:24:41 +01:00
Igor Minar 9e7e178585 build(aio): add google webmaster tools verification file
this file needs to remain in the repo for us to remain verified as owners of aio-staging.firebaseapp.com.
2017-05-26 01:25:58 -07:00
Igor Minar db3113ba16 build(aio): externalize @angular/cli patches into a js file
This improves code readability and maintainability.
2017-05-26 01:19:59 -07:00
Igor Minar 8443d199b2 build(aio): use purify to include tslib
cli's scripts setup evals strings which requires too much escaping that bloats the code
2017-05-26 01:19:59 -07:00
Igor Minar 8e2f72c644 build(aio): turn on pure_getters option in uglify 2017-05-26 01:19:59 -07:00
Igor Minar 0c1d1e2396 build(aio): upgrade purify to 0.0.11 with better coverage 2017-05-26 01:19:59 -07:00
Igor Minar 740450287d build(aio): upgrade ngo to 0.0.3 with static prop unhoisting 2017-05-26 01:19:59 -07:00
Igor Minar 0c691af1d2 build(aio): start using tsc importHelpers option for the app
this means we'll be temporarily duplicating the helpers (onces included via scripts
and secondly imported via es imports) - once rxjs, core and material migrate over
to tslib, we can drop the scripts/global dupe.
2017-05-26 06:02:12 +01:00
Pete Bacon Darwin 2538094e13 fix(aio): group topbar items into a single sidenav node when narrow screen (#17001)
The `TopBarNarrow` now only shows a single top level container, "About Angular",
and the original `TopBar` items will be children of this container.

The `TopBarNarrow` styling is changed to match the rest of the `SideNav`.
2017-05-25 17:44:27 -06:00
Jesús Rodríguez b37a0484d4 docs(aio): restore missing files (#16995) 2017-05-25 17:44:03 -06:00
Jesús Rodríguez 4c5e28e53a build(aio): less verbose boilerplate generator (#16970) 2017-05-25 17:43:46 -06:00
George Kalpakas e10d763446 fix(aio): correctly handle re-navigation to the empty path (#16997) 2017-05-25 17:43:34 -06:00
Pete Bacon Darwin 966eb2fbd0 aio: add h1 title to floating table of contents (#16959)
* refactor(aio): use explicit CSS class for TOC container

This makes the styling less fragile to changes in the HTML

* fix(aio): schedule TocComponent.activeIndex updates via AsapScheduler

We use the `asap` scheduler because updates to `activeItemIndex` are triggered by DOM changes,
which, in turn, are caused by the rendering that happened due to a ChangeDetection.

Without asap, we would be updating the model while still in a ChangeDetection handler,
which is disallowed by Angular.

* refactor(aio): do not instantiate floating ToC if not displayed

* feat(aio): display the h1 at the top of the floating TOC

Closes #16900

* refactor(aio): combine the TOC booleans flags into a "type" state

* refactor(aio): remove unnecessary `hostElement` property

* fix(aio): ensure that transition works on TOC

* fix(aio): use strict equality in ToC template
2017-05-24 14:09:55 -06:00
Pete Bacon Darwin b0c5018c70 build(aio): better error message for invalid links (#16993) 2017-05-24 11:59:06 -06:00
Peter Bacon Darwin 19a509a92c fix(aio): use a special version of the TopBar if the screen is narrow
If there is a `TopBarNarrow` nav view then use this when the screen is narrow.
Otherwise just use the normal `TopBar`.

This commit also creates such a narrow topbar view where the "Docs" item is
in a different position

Closes #16940
2017-05-24 09:01:57 +01:00
Georgios Kalpakas 9e17a147ec fix(aio): align top-level nav-items consistently
Fixes #16939
2017-05-24 08:21:41 +01:00
Georgios Kalpakas 3b28c75d1f test(aio): avoid warnings from Material during tests 2017-05-23 08:00:07 +01:00
Ward Bell 368169dc15 feat(aio): add progress bar
closes #16110
2017-05-23 08:00:07 +01:00
Peter Bacon Darwin ce18fdb399 fix(aio): use the current version in the version picker
Previously we hardcoded the current version into the navigation items.
Now only previous versions are included there. The current version is
computed from the currentVersion info.

Closes #16909
2017-05-22 13:48:07 +01:00
Georgios Kalpakas 670771da33 build(aio): make the postinstall script more Windows-friendly 2017-05-21 15:37:22 +01:00
Georgios Kalpakas c8b08f3a59 feat(aio): implement ScrollSpy service (to highlight the active section in ToC) 2017-05-20 12:08:38 +01:00
Peter Bacon Darwin eed67ddafb feat(aio): update aio-shell class when sidenav opens or closes 2017-05-19 14:10:00 +01:00
Peter Bacon Darwin be9e8b99ff fix(aio): support IE via conditionally loaded polyfills
Closes #16519
2017-05-19 11:26:29 +01:00
Peter Bacon Darwin 8a0e5659c0 docs(aio): tidy up docs that use float clearing
Closes #16681
2017-05-19 09:47:53 +01:00
Peter Bacon Darwin 2842b0cc3d fix(aio): ensure that subsections clear floats correctly 2017-05-19 09:47:53 +01:00
Ward Bell a42322da0c feat(aio): code copy button has tooltip and aria-label
Based on optional title passed in from parent element such as CodeExample or CodeTabs.
Darkens uncovered copy button slightly as recommended for a11y.
PR #16808
2017-05-19 09:42:48 +01:00
Ward Bell 4ccb2269a5 feat(aio): buttons for TOC "Contents" label
- Use buttons for the TOC “Contents” label when embedded-and-expandable or TOC on the right to satisfy a11y.
- Add aria-pressed setting for the toggles in TOC and NavItem.
- Clicking the right panel TOC “Contents” button scrolls to top.
- When embedded use same rotating caret as sidebar
- When embedded and no secondaries, “Content” is just a label.
- Gray background for focused buttons rather than outline because can’t get carets to work with outline.
2017-05-19 09:42:30 +01:00
Georgios Kalpakas b836aca999 docs(aio): rework of the upgrade guide
This commit was worked on by a number of people including
@filipesilva, @gkalpak and @wardbell. It contains changes that:

* remove unused files,
* fix the bootstrap approach to ensure that bootstrap is in the correct Zone
* fix unclosed code-example tags
* replace use of "we" with "you"
* remove broken dual router example

Related to angular/angular.io#3541
2017-05-19 09:42:17 +01:00
Peter Bacon Darwin 6531806996 build(aio): do not ignore `is-on-https` in lighthouse check
Lighthouse v1.6.5 treats localhost/1.2.7.0.0.1 as secure domains (i.e. as if they where HTTPS), so we need to stop handling the is-on-https audit specially.
2017-05-18 15:48:49 +01:00
Georgios Kalpakas 3a604ba0bf fix(aio): fix PWA testing on Windows (and reduce flaky-ness)
Adding a delay after Lighthouse has run and before killing the Chrome process
avoids `ECONNREFUSED` errors on Windows and will hopefully prevent such errors
occasionally appearing on CI.

Based on info in:
https://github.com/paulirish/pwmetrics/issues/63#issuecomment-282721068
2017-05-18 15:48:49 +01:00
Peter Bacon Darwin 39f2977fa8 fix(aio): fix up typing errors in tests
The new version of Jasmine types identified issues with our unit tests.
2017-05-18 15:48:49 +01:00
Igor Minar faacbe4dac build(aio): upgrade to @angular/cli@1.1.0-rc.0 2017-05-18 15:48:49 +01:00
Igor Minar 47c72e4627 perf(aio): load reflect-metadata polyfill only in the dev mode 2017-05-18 15:48:49 +01:00
Igor Minar 59136fdbe4 build(aio): add ngo + purify 2017-05-18 15:48:49 +01:00
Georgios Kalpakas 35d1922006 ci(aio): log the full PWA testing results
This will help diagnose errors or regressions in PWA scores.
2017-05-18 15:48:49 +01:00
Georgios Kalpakas b40aae54b7 fix(aio): fix PWA testing in cases where `atob`/`btoa` is necessary
In some cases (unclear when), traceviewer-js, used by Lighthouse under the hood,
assumes `atob`/`btoa` are defined in the global scope. This is true for browser
environments, but not on node.

As a result, some aggregations that required access to model-tracing failed to
produce results, dropping the overall PWA score.

This affected #16665 (e.g. commit 0de6eec7a).
2017-05-18 15:48:49 +01:00
Igor Minar baa3fbab46 build(aio): upgrade @angular/* and friends, remove obsolete deps 2017-05-18 15:48:49 +01:00
Georgios Kalpakas 3361a7b834 build(aio): minor `update-preview-server.sh` improvements 2017-05-18 14:41:54 +01:00
Peter Bacon Darwin 0e13a5956c fix(aio): add small delay before autoscrolling
This delay allows any async layout to complete
before we autoscroll to a heading anchor.

Closes #16242
2017-05-18 14:37:45 +01:00
Georgios Kalpakas 9466908c22 build(aio): add script for updating the preview server 2017-05-18 08:21:25 +01:00
Georgios Kalpakas 93d27d283a build(aio): fix syntax error in preview server's Dockerfile 2017-05-18 08:21:25 +01:00
Georgios Kalpakas 6f59a4a5b2 docs(aio): minor docs fixes for `aio-builds-setup/` 2017-05-18 08:21:25 +01:00
Jesus Rodriguez 71c3103312 build(aio): reduce images weight 2017-05-18 08:20:10 +01:00
Ward Bell 238c5238a5 fix(aio): remove searchbox shrink animation 2017-05-17 08:22:28 +01:00
George Kalpakas 593fe5ed25 build(aio): enable HTTP/2 on the preview server (#16826)
Fixes #16780
2017-05-16 21:07:28 -07:00
Pete Bacon Darwin af99cf2a41 build(aio): compute `{@link ...} titles more effectively (#16813)
If a usage of `{@link ...}` does not provide a title then
compute it based on the `title` and/or `name` properties
or set the link to invalid.

Closes #16811
2017-05-16 10:21:31 -07:00
Ward Bell 221f85af3f fix(aio): no white band below toolbar when mobile
At 600px wide, the buttons on tool bar shrank from 64 to 56px.
Should shrink the content’s top padding from 64 to 56 as well.
2017-05-16 10:43:12 +01: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