Commit Graph

846 Commits

Author SHA1 Message Date
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
Ward Bell 7ae0440cca docs(aio): remove fundamentals/techniques intro pages 2017-05-16 09:45:48 +01:00
Ward Bell 2ee7662737 test(aio): remove compileComponents from all tests
By reflex we began all component tests with an async `beforeEach` that called `compileComponents`.
In at least one case (`live-example.component.spec.ts`) that led to the `it` tests being async as well.
There is no need to call `.compileComponents` because CLI web pack + plugin inlines all templates and styles.
While `.compileComponents` was harmless, it added complexity and distraction which we should not inflict on future readers and testers.
2017-05-16 09:45:04 +01:00
Jesus Rodriguez 44195858e6 docs(aio): fix toh e2e test 2017-05-16 09:42:59 +01:00
Peter Bacon Darwin a9d9aa18a0 build(aio): automatically link code blocks to API docs 2017-05-15 10:56:38 +01:00
Peter Bacon Darwin ecc356ecea fix(aio): set focus back to search box on "escape"
For improved accessibility, the focus should be sent
back to the input box when we are displaying the
search results and the user hits ESC.

See #16005
2017-05-14 15:46:24 +01:00
Peter Bacon Darwin 98e31290a7 refactor(aio): centralise search ui management
Previously the logic for deciding when to display
the search result was spread between different
parts of the application and used non-intuitive logic
such as sending a blank results set to the searchResults.

This commit moves the management of displaying
the search results (and also setting focus of the
search input box) to the AppComponent. This makes
it easier to understand what happens and why; but
also allows the search UI components to be more
easily reused (such as embedding them in the 404
page).
2017-05-14 15:46:24 +01:00
Peter Bacon Darwin 7a759df49e refactor(aio): remove unused mock method 2017-05-14 15:46:24 +01:00
Georgios Kalpakas 06264645fd build: use subshells when changing directories
This prevents being left in the wrong directory in case of error.
2017-05-12 12:19:51 -07:00
Georgios Kalpakas 21d213dfc7 refactor(aio): drop `run` (from `yarn run`), rename script and remove unnecessary cmds 2017-05-12 11:37:21 -07:00
Georgios Kalpakas 3065fc6cca ci(aio): build `aio-builds-setup` scripts before pre-verifying PR
(Coincidentally), this wasn't an issue before fdfeaaf1f, because
pre-verification was run after `test.sh`, during which `aio-builds-setup` was
built.
Now that `deploy-staging.sh` is being run before `test.sh`, we need to build
the `aio-builds-setup` scripts first.
2017-05-12 11:37:21 -07:00
Georgios Kalpakas bcefc61da4 ci(aio): correctly catch PR preview pre-verification errors
Previously, `aio/aio-builds-setup/scripts/travis-preverify-pr.sh` was supposed
to exit with 1 if a PR did not meet the preconditions and 2 if an error occurred
during pre-verification.
It relied on the exit codes of the node script that did the actual work, but
didn't account for errors that would be thrown in the `sh` script itself (e.g.
if the node script was not available). This caused such errors to appear as
non-verified PRs, instead of real errors that should fail the build.

This commit swaps the exit codes, so that now a 2 means non-verified PR and 1
designates an error.
2017-05-12 11:37:21 -07:00
Jesus Rodriguez b016984c04 docs(aio): resize images 2017-05-12 14:28:09 +01:00
Georgios Kalpakas 90bc5b221b fix(aio): only register ServiceWorker in production mode
Since abb36e3cb, we no longer rely on the cli to set up ServiceWorker, but do it
manually as part of `yarn build`. When using `ng serve`, registering the
ServiceWorker fails, because we haven't created `ngsw-manifest.json` nor copied
`worker-basic.min.js` into dist.

This commit works around this, by only registering the service worker in
production mode (which is what the cli does too).

Caveat:
It is not possible to enable ServiceWorker with `ng serve`/`yarn start` and
using the `--prod` flag will try to register it, but fail because the necessary
files (`ngsw-manifest.json` and `worker-basic.min.js`) will not be available.
(As a work-around, you can use `yarn build` and serve the files in `dist/` with
`yarn http-server -- dist -p 4200`.)
2017-05-12 14:17:27 +01:00
George Kalpakas decb4cc4a3 ci(aio): create previews for all PRs that touch non-spec files in `aio/` or `packages/` (#16733)
Previously, no previews would be deployed for PRs that didn't touch files inside
`aio/`. Now, previews will be deployed for PRs that touch non-spec files inside
either `aio/` or `packages/` (as long as other preconditions are met).

Partially addresses #16526.
2017-05-11 15:02:13 -07:00
Alex Rickabaugh abb36e3cba fix(aio): switch to ngu-sw-manifest gen to unblock critical path (#16709) 2017-05-11 13:21:27 -07:00
Peter Bacon Darwin 2eca6e67e1 test(aio): add tests for renderAttributes helper 2017-05-11 10:30:10 +01:00
Georgios Kalpakas c757e5794f build(aio): serve gzipped content from the preview server
Fixes #16699
2017-05-11 10:29:24 +01:00
Peter Bacon Darwin 56ccd5e6a1 docs(aio): remove excess h1s from guides
Only one h1 is allowed per document.

(Also took the opportunity to remove unnecessary blank lines from these
docs, and a bit of general tidying.)

Closes #16193
2017-05-11 08:15:19 +01:00
Peter Bacon Darwin bcbee13e26 build(aio): fail build if more than h1 is found in a doc
Closes #16193
2017-05-11 08:15:19 +01:00
Georgios Kalpakas e242e20ca3 fix(aio): style TOC scrollbar similar to other scrollbars 2017-05-10 15:02:44 +01:00
Jesus Rodriguez f148ebe99e docs(aio): remove warning when testing in the webpack guide 2017-05-10 15:02:21 +01:00
Georgios Kalpakas f795f649cf refactor(aio): remove redundant styles
Due to the new structure of `live-example`, the only style in
`_live-example.scss` was not applied. This is OK according to
https://github.com/angular/angular/issues/15935#issuecomment-295482503, since we
want it to take the full width.

Fixes #15935
2017-05-10 14:49:37 +01:00
Georgios Kalpakas 063db641f8 fix(aio): style sidenav-content scrollbar similar to other scrollbars 2017-05-10 14:48:29 +01:00
Jesus Rodriguez b44f5c69e1 build(aio): make less verbose tools 2017-05-10 14:26:14 +01:00
Jesus Rodriguez 56833a6171 docs(aio): more content fixes 2017-05-10 12:51:01 +01:00
Jesus Rodriguez efa2928547 docs(aio): add a progress reporter for the webpack guide 2017-05-10 11:54:39 +01:00
Peter Bacon Darwin f5335d17ec build(aio): fail the doc-gen if there is an invalid `{@link ...}` tag
This fail behaviour is only turned on for `yarn docs`;
in `yarn docs-watch` you only receive a warning.
This is because you can get false errors when watching
since we don't parse all the docs in that case.
2017-05-10 11:39:07 +01:00
Stefanie Fluin dc7d24267d feat(aio): update code style 2017-05-10 07:57:45 +01:00
Peter Bacon Darwin 412ab3f20c fix(aio): basic fix to the TOC styling
Without any major refactoring these changes bring the TOC much closer to
how the Google developer docs TOC looks.

Closes #16646
2017-05-10 07:49:59 +01:00
Peter Bacon Darwin 954c08e97c fix(aio): remove unwanted code styling from styleguide doc
Closes #16514
2017-05-10 07:49:03 +01:00
Pete Bacon Darwin 9e661e58d1 docs(aio): image sweep (#16609)
* fix(aio): allow code blocks to clear floated images

Previously the negative margin on the code headings were causing
floated images to overlay the start of a code block. Now all code block
successfully clear all floated elements.

* feat(aio): add a `.clear` class for clearing floating images

* fix(aio): tidy up image styles

The css rules for `img.right` and `img.left` allow authors easy
access to floating an image on the left or right, respectively.

The `.image-display` rule which was always found on a figure
has been simplified so that all figures have this styling. It is very
unlikely that a figure will be used outside the content area; and
at this time it seems like `figure` is as good an indicator that we
want this kind of styling as anything.

Now that images are all tagged with width and height values, we cannot
assume to modify these dimensions via CSS as it can cause the image to
lose its correct proportions.  Until we find a better solition we must set
`height` to `auto` when the screen width is below 1300px to ensure that
these images maintain their proportions as they get shrunk to fit.

* docs(aio): general tidy up of image HTML in guides

Previously, the guides have a lot of inline image styling and unnecessary
use of the `image-display` css class.
Images over 700px are problematic for guide docs, so those have been given
specific widths and associated heights.

* docs(aio): use correct anchor for "back to the top" link

The `#toc` anchor does not work when the page is
wide enough that the TOC is floating to the side.

* build(aio): add `#top-of-page` to path variants for link checking

Since the `#top-of-page` is outside the rendered docs
the `checkAnchorLinks` processor doesn't find them
as valid targets for links.
Adding them as a `pathVariant` solves this problem
but will still catch links to docs that do not actually exist.

* fix(aio): ensure that headings clear floated images

* fix(aio): do not force live-example embedded image to 100% size

This made them look too big, generally. Leaving them with no size means
that they will look reasonable in large viewports and switch to 100% width
in narrow viewports.
2017-05-09 15:53:32 -07:00
Pete Bacon Darwin 7b4a8d53a7 build(aio): remove "pure" property from pipe template (#16655)
This information is not relevant to users, right now.

Closes #16641
2017-05-09 15:44:10 -07:00
Ward Bell 73505e2ff0 feat(aio): scrolling tweaks per 16619 (#16660) 2017-05-09 15:36:24 -07:00
Peter Bacon Darwin e11f5294ab build(aio): run docs after plunkers and zips (in setup) 2017-05-09 14:33:40 +01:00
Peter Bacon Darwin 0190df9cf3 build(aio): local assets are not dangling links
Closes #16615
Closes #16616
2017-05-09 14:33:40 +01:00
Ward Bell 1af42aedfa docs(aio): doc guide tweaks (GS thru Components)
Working through obvious non-image content defects, from top of menu (Getting Started) through Fundamentals/Components.
2017-05-09 14:27:27 +01:00
Ward Bell 215611aa9e refactor(aio): rename auto-scroll -> scroll and refactor
Refactor inspired by @gkalpak feedback on PR #16619
2017-05-09 14:11:23 +01:00
Ward Bell 98d83b2e2d feat(aio): scroll back to top when TOC more-items clicked to close
closes  #16482
Usability feature. When long embedded TOC, collapsing it should scroll user to TOC top, not leave in the middle of the page.
2017-05-09 14:11:23 +01:00
Ward Bell cf7689ea7b refactor(aio): simplify/clarify some observables 2017-05-09 14:10:58 +01:00
Ward Bell 2848f0499f fix(aio): do not nav to an image url
closes #16608
Formerly, tried to navigate when user clicked an anchor with an image url (to view image in a new tab) resulting in 404.
Now ignores href URL with any extension and lets browser handle it.
2017-05-09 14:10:36 +01:00
Ward Bell 3887d8a429 feat(aio): close sidenav in narrow (mobile) mode when select a new document (#16617)
closes #16603
As before this PR, when wide (side-by-side), the sidenav open/close status only changes when nav to/from marketing page in which case it opens for guide/api and closes for marketing page.
2017-05-08 15:41:19 -07:00
Pete Bacon Darwin 041f57cb7d feat(aio): focus search when `/` is pressed (#16636)
This will aid accessibility.

Closes #16129
2017-05-08 15:40:32 -07:00
Jason Hodges 98dd609f89 docs(animations): remove duplicate word (#16508) 2017-05-08 10:47:13 -07:00
Peter Bacon Darwin 6dc67772b0 docs(aio): move links from nav groups to items
Fundamentals and Techniques nav groups we also links to pages. This caused
counterintuitive behaviour when clicking on them.

This commit moves each link from the group item to a children item, called
Introduction.

Closes #16604
2017-05-07 08:14:10 +01:00
Peter Bacon Darwin 5cf64266f8 docs(aio): fix sizing of marketing doc images
This commit ensures that all the images in the marketing docs are correcly
sized.

Related to #16600
2017-05-06 14:35:24 +01:00
Peter Bacon Darwin 03513e9d70 fix(aio): constrain header-link styles
The CSS rule for positioning the automated header links was too general,
causing other links inside headings to be positioned incorrectly.

Closes #16573
2017-05-06 14:32:49 +01:00
Peter Bacon Darwin b9ed97c0d9 fix(aio): do not display a Toc initially
Previously the `hasToc` was initialised to true, which caused a flash of
unwanted "Contents" [sic] even if the page was not going to need a ToC.

Closes #16597
2017-05-06 14:32:09 +01:00
Stefanie Fluin 799be9c98a feat(aio): TOC float right + service refactor
TOC appears in right panel when wide and hides embedded TOC
Right TOC panel height adjusts dynamically during scroll
Refactored `TocService` and its tests for clarity.
2017-05-06 07:13:31 +01:00
Alex Rickabaugh 566dab1140 build(aio): upgrade to @angular/service-worker@1.0.0-beta.11 (#16594) 2017-05-05 16:16:55 -07:00
Peter Bacon Darwin 42dc2c19ee refactor(aio): remove redundant test
The search worker is now initialised from the `SearchBoxComponent`, which
has its own tests for this.

Closes #15593
2017-05-05 13:43:02 -07:00
Peter Bacon Darwin 518eb540aa refactor(aio): tweak the CSS to account for new CSS classes on `aio-shell` 2017-05-05 13:42:34 -07:00
Peter Bacon Darwin 309ada5df5 feat(aio): add helper CSS classes to the `aio-shell` for fine grained styling
Alternative to #16564
Closes #16549
2017-05-05 13:42:34 -07:00
Ward Bell 2714644528 docs(aio): fix broken links discovered May 4th 2017-05-05 11:05:22 +01:00
Stefanie Fluin d27588b5fb feat(aio): api label styles
- Moved info bar section in pipe template to be the first section to match other templates
- Fixed label styling for type label
- Added label styling for status label
2017-05-05 11:04:55 +01:00
Peter Bacon Darwin a8379a46cf docs(aio): remove toc from all marketing pages 2017-05-05 10:43:36 +01:00
Georgios Kalpakas b7caa3e024 fix(aio): do not route `eplnkr` URLs to / from ServiceWorker 2017-05-05 10:42:58 +01:00
Ward Bell 3e33482386 feat(aio): should not send in-page navigations to Google Analytics
closes #16521
`LocationService` sends `GaService` a url stripped of fragment and query strings.
`GaService` already guards against re-send of the prior url so it will only report doc changes.
2017-05-05 10:37:36 +01:00
Peter Bacon Darwin 5057e16874 build(aio): throw an error if a code-example tag is not closed 2017-05-04 15:52:17 -07:00
Ward Bell 9449eff6fd docs(aio): improve tutorial next-steps prose/links 2017-05-04 15:51:57 -07:00
Jesús Rodríguez 03610526e5 docs(aio): remove hardcoded TOC 2017-05-04 15:51:37 -07:00
Peter Bacon Darwin 8931e71c5c build(aio): ensure that tutorial index arrives in the tutorial search area
Fixes #16457
2017-05-04 13:45:04 +01:00
Peter Bacon Darwin 5bc435eba3 feat(aio): provide icon for API packages in search 2017-05-04 13:45:04 +01:00
Peter Bacon Darwin 4dabec6a48 build(aio): compute search title for certain API docs 2017-05-04 13:45:04 +01:00
Peter Bacon Darwin 978376a46e build(aio): `doc.searchTitle` can override name in search results 2017-05-04 13:45:04 +01:00
Georgios Kalpakas 895f47a9c2 refactor(aio): remove work-around for browsers without ServiceWorker support
This essentially reverts #15731, which is no longer necessary after
angular/mobile-toolkit@eeb4b22 (which is included in v1.0.0-beta.10).
2017-05-04 12:28:19 +01:00
Ward Bell aec65dee71 refactor(aio): simplify DocViewer 2017-05-04 12:23:49 +01:00
Georgios Kalpakas 2f66932bd1 fix(aio): make `aio-top-menu .nav-link` cover the whole `<li>`
Discussed in https://github.com/angular/angular/pull/16513/files#r114630560.
2017-05-03 19:34:58 -07:00
Stefanie Fluin 919ff12377 fix(aio): cheatsheet table layout fix 2017-05-03 19:34:12 -07:00
Peter Bacon Darwin 6748aeabb6 build(aio): update to dgeni-packages 0.19.0
This contains an updated dependency to TypeScript 2.1, which supports the
language constructs that we are using in Angular.
2017-05-03 19:33:58 -07:00
Stefanie Fluin 77b8a76f2e feat(aio): toc styling
- TOC styling
- TOC container placeholder
2017-05-03 19:32:41 -07:00
Jesús Rodríguez 55b8de9fdd build(aio): lint examples 2017-05-03 13:44:41 -07:00
Stefanie Fluin eb56ab38dc fix(aio): remove top bar menu item focus jump 2017-05-03 13:43:42 -07:00
Peter Bacon Darwin f29c6bbc6f docs(aio): fix missing title warnings
This commit provides missing titles for Press kit.
License appears not to want a title.
ngmodule and resources2 are no longer needed.
2017-05-03 13:42:10 -07:00
Peter Bacon Darwin 464701a899 docs(aio): revert removal of tutorial examples
These files were inadvertently removed in #16488 but are actually still referenced.

Closes #16503
2017-05-03 13:41:05 -07:00
Peter Bacon Darwin 5b96fb9320 build(aio): rename `src/content` to `src/generated`
This commit will definitely require a clean up of your
working folder:

```
cd aio
git clean -xdf
yarn setup
```
2017-05-03 13:40:46 -07:00
Ward Bell 1cfb263ee3 docs(aio): hide the copy button for code in StyleGuide tables. 2017-05-03 13:38:25 -07:00
Ward Bell 9ca2b4c967 feat(aio): set “avoid” class by convention (filename has “.avoid.”)
Most important for StyleGuide which lost example css class in migration.
Also hides copy for “avoid” files.
2017-05-03 13:30:45 -07:00
Ward Bell 673d8ae583 feat(aio): add attribute utils for code atty interpretation.
These utils support flexible, natural attribute interpretation as applied to code-example and code-pane. Then apply those utils to code-example and live-example
2017-05-03 13:30:45 -07:00
Peter Bacon Darwin 8760bf7be4 build(aio): fix paths to template macros in overview-dump template 2017-05-03 13:30:11 -07:00
Peter Bacon Darwin ea02073c84 build(aio): mark API docs as not having a TOC 2017-05-03 13:30:11 -07:00
Peter Bacon Darwin b051d7ff48 build(aio): refactor API templates for clean start 2017-05-03 13:30:11 -07:00
Peter Bacon Darwin cade722e48 build(aio): upgrade to dgeni-packages@0.18.0
This contains a fix for the typescript module reader.
Previously, TS modules that were of the form:

```
a/b/index.ts
```

Would be given the name `index` and id of `a/b/index`.
This is not desirable, so the new version of dgeni-packages/typescript
removes this `index` from the id and name, which results in name of
`b` and id of `a/b`.
2017-05-03 13:30:11 -07:00
Peter Bacon Darwin 58817f55e1 fix(aio): do not collapse API code example indentation 2017-05-03 13:30:11 -07:00
Peter Bacon Darwin 3f1d7f7a76 build(aio): add the api folder to the list of template folders 2017-05-03 13:30:11 -07:00
aravindfz c8dc116951 docs(aio): fixing new url on glossary date pipe 2017-05-03 13:29:04 -07:00
Peter Bacon Darwin 5ba8c14893 docs(aio): remove unnecessary anchor links from styleguide 2017-05-03 09:21:18 +01:00
Ward Bell ea9d8a6bc7 docs(aio): move pipes guide under components 2017-05-03 09:01:05 +01:00
Ward Bell 9650ff0824 docs(aio): add hero “Zero” to toh-6
Update to in-memory-web-api should handle id=0.
Make sure this works by having a hero with id=0 in ToH.
Coincidentally delete lingering dead app/ folders
Todo: fix ToH images (which have to do anyway)
2017-05-03 08:03:55 +01:00
Souvik Basu 00dce1698a docs(aio): grammatical fix. remove duplicate word 'our' 2017-05-03 08:03:03 +01:00
Stefanie Fluin 21c96a5af1 feat(aio): sidenav styling extended 2017-05-02 15:14:21 -07:00
Peter Bacon Darwin a0b9c23100 feat(aio): support hiding the copy button on `code-examole` components
In the API docs there are occasions where we do not wish the code snippet
to have a copy button. This commit supports that by providing a new `hideCopy`
attribute.
2017-05-02 15:14:03 -07:00
Ward Bell cb5bc76766 feat(aio): move search results under search box
This enables keyboarders to tab from the search box into the results.
Important for a11y according to issue #16005.
2017-05-02 15:13:40 -07:00
Ward Bell 1c8772a879 fix(aio): delete guide/index.md which is no longer used 2017-05-02 15:13:15 -07:00
Ward Bell 79ed0e7121 feat(aio): display API icons in search results
Add API symbols for `let` and `var` so don’t have to translate those types into `const`
Also replace <hr> in search results HTML with ellipses icon.
2017-05-02 15:12:58 -07:00
Ward Bell 0c69903123 feat(aio): top 5 weighted search results shown when many area results 2017-05-02 15:12:58 -07:00
Stefanie Fluin 04dc24820d feat(aio): comment cleanup, API table styles
- API table styling
- Cleanup on resource page comments
2017-05-02 10:57:54 -07:00
Peter Bacon Darwin ac220fc2bb docs(aio): fix image size on homepage 2017-05-01 15:52:51 -07:00
Peter Bacon Darwin 3b80472bad style(aio): fix comment on postProcessHtml processor
Fixes https://github.com/angular/angular/pull/16336#discussion_r113891332
2017-05-01 15:52:51 -07:00
Peter Bacon Darwin ca17d4f639 build(aio): auto-fill width/height to all image tags
Parse all `<img>` tags, during doc-gen, and insert the width and height of
the sourceed image, if neither are already specified.

Warnings are reported if the `<img>` tag has no `src` attribute or the image
cannot be loaded.

The work is done in the `addImageDimensions` post-processor, which must be
configured with a `basePath` so that it knows where to find the images.

Closes #15888
2017-05-01 15:52:51 -07:00
Peter Bacon Darwin 64335d3521 build(aio): capture and log errors and warnings when post-processing HTML 2017-05-01 15:52:51 -07:00
Peter Bacon Darwin 9945ce2259 build(aio): move copyContentAssets processor to the base package
This allows other processors who need to know about the copyContentAssets
processors to ensure that the runs after the content has been copied.
2017-05-01 15:52:51 -07:00
Peter Bacon Darwin 6d9da73090 build(aio): move attribute utils to helpers folder
This allows these utility functions to be reused across packages.
2017-05-01 15:52:51 -07:00
Peter Bacon Darwin c889fb1ef5 build(aio): include new packages in docs-watch 2017-05-01 15:52:51 -07:00
Ward Bell d32bc5df3e feat(aio): add tooltip to nav node if none specified 2017-05-01 15:52:35 -07:00
Ward Bell efaf502e95 feat(aio): tell user when no search results
closes #16294
2017-05-01 15:51:44 -07:00
Jesus Rodriguez ff32c53099 docs(aio): fix lots of broken links
Closes #16317
2017-05-01 15:51:26 -07:00
Peter Bacon Darwin 235eb17cca build(aio): improve info-bar template
The "npm module" and "NgModule" are now rendered correctly.

Closes #16055
2017-05-01 15:51:03 -07:00
Stefanie Fluin aaa562898f fix(aio): correct position of sidenav icons 2017-05-01 15:50:34 -07:00
Stefanie Fluin c8fd904c32 fix(aio): remove max width on marketing pages and footer
- Removed the max-width on all marketing pages
- Moved the footer so that it extends fully horizontally on all screen sizes
2017-05-01 15:50:17 -07:00
Stefanie Fluin 65a8f7f6c9 fix(aio): search result styling
- Changed search result link hover state to white to be more legible
- Increased the max-height on search results container to remove the jitter
- Changed search results to have space-around vs space-between for more appropriate spacing
2017-05-01 15:49:46 -07:00
Peter Bacon Darwin f32bfcdbe5 build(aio): convert triple backtick blocks to `code-example` tags
Closes #16246
2017-04-30 09:07:28 -07:00
Peter Bacon Darwin 24b9067047 build(aio): remove unused `{@exampleTabs}` inline tag 2017-04-30 09:07:28 -07:00
Ward Bell de8de84cea test(aio): confirm ga tracks user’s # fragment clicks within a page (#16441)
This was the behavior and we think we still want to do it.
Added comment and test to confirm that is our present intention.
2017-04-30 09:07:12 -07:00
Ward Bell 8d300ffbfc fix(aio): header click should always toggle expand/collapse (#16439)
Also adds class tests for this NavItemComponent.
Not (yet) testing effects on the templated HTML
2017-04-30 09:07:00 -07:00
Ward Bell f74dafcb07 docs(aio): Add numbers and steps to Tutorial navigation (#16421) 2017-04-30 09:06:36 -07:00
Ward Bell a2b2afb21c feat(aio): add marketing class to AppComponent <aio-shell> on mkt page (#16395)
Also navigation.json Doc page should be hidden in sidebar, shown in top
2017-04-28 15:34:20 -07:00
Kapunahele Wong b70b9606eb docs(aio): apply guidelines to ts-to-js - adapt for aio site (#16054) 2017-04-28 15:34:00 -07:00
Will Howell 938406122e docs(aio): add missing word (#16328) 2017-04-28 15:33:23 -07:00
Kim Burgess 951a575db3 docs(aio): fix broken NgModules link in tutorial (#16398)
Brackets included in link title contents were breaking markdown
parsing, preventing correct link generation.
2017-04-28 15:32:46 -07:00
Georgios Kalpakas c04e51cb15 fix(aio): do not create ToC for `file-not-found` and `fetching-error` documents
Related to #16078.
2017-04-28 15:06:05 +01:00
Ward Bell 7b94f493b9 feat(aio): code snippet source available & shown when code missing
Tells reader (usually the author) what code file is missing
Also when no linenums specified, turn them on if num of lines > 10
2017-04-28 11:07:45 +01:00
Ward Bell f1f04fa782 feat(aio): implement gkalpak review suggestions 2017-04-28 09:45:09 +01:00
Ward Bell 4be1966a21 feat(aio): revise Docs page; docs version selector in sidenav 2017-04-28 09:40:39 +01:00
Peter Bacon Darwin de25cfc0cb build(aio): move autolink-headings to post-processing (#16336)
The autolinking is now done on the `renderedContent` which means it also
captures and autolinks headings that were generated outside of markdown.

PR Close #16336
2017-04-27 23:42:04 -05:00
Peter Bacon Darwin de36a9b718 fix(aio): improve positioning of heading-anchors 2017-04-27 23:42:04 -05:00
Peter Bacon Darwin 883a3250e4 fix(aio): ensure styling of icons is specific to usage
Previously the CSS styling for material icons was too broad and affected
all instances of icons. This commit constrains the position of copy button
icons only to copy buttons.
2017-04-27 23:42:04 -05:00
Peter Bacon Darwin 1ceb2f9c79 build(aio): add new post-process dgeni package
This package will allow us to do complex post-processing
on the HTML that is rendered by Nunjucks.
2017-04-27 23:42:04 -05:00
swseverance fbde2a8010 docs(aio): correct abbreviation (#16295)
change abbreviation from 'ES' to 'ES2015'. the 'ES2015' abbreviation is used elsewhere in the tutorial.
2017-04-27 21:39:46 -07:00
Ward Bell 3f46645f5f feat(aio): add Table of Contents (toc) component. (#16078) 2017-04-27 15:32:46 -07:00
Georgios Kalpakas 2a7f63650c build(aio): update @angular/service-worker to v1.0.0-beta.10 2017-04-27 10:14:32 +01:00
Georgios Kalpakas cd5b1f306a refactor(aio): move `/guide/docs.md` to `/marketing/docs.md`
Because:
1. `docs` feels like a "top level" page, similar to `features`, `resources`, `events` etc.
2. This enables the ServiceWorker to pre-fetch/cache the document (similar to what happens with all
   other direct children of `content/docs/`), without the need for special-casing it in
   `ngsw-manifest.json`.
2017-04-27 10:14:32 +01:00
Georgios Kalpakas 749bcf3d9c feat(aio): cache external resources in the ServiceWorker
Cache resources that are necessary for displaying the basic pages when offline.
2017-04-27 10:14:32 +01:00
Georgios Kalpakas a9027a2570 fix(aio): fix ServiceWorker routing 2017-04-27 10:14:32 +01:00
Georgios Kalpakas 72e32b1f17 fix(aio): update files ignored by the ServiceWorker
Fixes #16198
2017-04-27 10:14:32 +01:00
Georgios Kalpakas 96648ba98a fix(aio): fix incorrect image URLs in guides 2017-04-27 10:14:32 +01:00
Georgios Kalpakas 6561d46349 refactor(aio): move content-related images to `content/images/` 2017-04-27 10:14:32 +01:00
Georgios Kalpakas 2e5e37ac58 refactor(aio): move unused images to `unused/` sub-directories 2017-04-27 10:14:32 +01:00
Pete Bacon Darwin 6bac4e65ce build(aio): update dgeni-packages to 0.17.2 (#16358)
This version has fix for the jsdoc parser, which was
causing false negative warnings and errors in the doc
gen.

Closes #16319
2017-04-26 14:53:33 -07:00
Stefanie Fluin bb52e22ecf feat(aio): api pages styling
- Banner class code consolidation for API pages
- Set up temporary table of contents class and file
- API pages title styling
- Add color styling to doc-type listed on each API details page
- Classes and SCSS variables refactor
- Mobile optimization on headers, info-banner, and API pages
- API page table custom styling
- API Class Overview template code overview into table format
2017-04-26 14:31:54 +01:00
Stefanie Fluin 35a2dfc177 fix(aio): resource nav 2017-04-26 09:48:33 +01:00
Ward Bell d8e2829e5b feat(aio): boilerplate:add cleans (removes) before adding 2017-04-26 09:23:32 +01:00
Ward Bell ac5e6baced fix(aio): AppComponent should scroll only once when location changes 2017-04-26 09:20:00 +01:00
Stefanie Fluin 710b4a3503 feat(aio): layout max width and design cleanup
- Content container now has a max width and made the body background the same offwhite color so the cut-off is not visible
- Sidenav will always remain at the left of the page
- Added a max width to the api banner of filter search inputs
- Left aligned content container so it is flush with sidenav
- Changed API filter width to match size of filter results
2017-04-26 08:57:30 +01:00
Peter Bacon Darwin 5331fc1aab build(aio): turn on dangling link checking 2017-04-25 14:09:08 +01:00
Peter Bacon Darwin 9b7f2ce6c3 test(aio): add missing test for AppComponent 'starting' feature 2017-04-25 12:30:32 +01:00
Ward Bell 11b2f62ed2 feat(aio): don't animate sidenav on launch. 2017-04-25 07:42:53 +01:00
Stefanie Fluin e7c37d77a8 feat(aio): copy code snackbar and design updates
- Add snackbar and pointer cursor for copy code button inside aio-code components
- Flex cenetered content in features page
- Removed duplicate global css class
- Add styles to links inside of sub-sections
- Remove focus outline on top nav bar links
2017-04-25 07:36:23 +01:00
Peter Bacon Darwin 1762047bc0 build(aio): fix other dgeni templates
The function and interface templates were overriding the
wrong block.
2017-04-25 07:35:34 +01:00
Peter Bacon Darwin 9a4c8d543d build(aio): fix rendering of Decorator API docs
The templates were a bit out and we were not merging the
correct properties.

Added some docs and tests for the processor.

Related to #16208
2017-04-25 07:35:34 +01:00
Peter Bacon Darwin f5aaa55f21 build(aio): ignore the VERSION constant correctly
We were filtering this document from the docs list but
not removing it from the module export lists.

We can actually filter it out much easier at the TypeScript
parsing point, which means we do not need the
`filterIgnoredDocs` processor any more.

Closes #16287
2017-04-25 07:33:50 +01:00
Stefanie Fluin 23e6502ef3 fix(aio): copy button placement fix
Added material-icons back in used throughout codebase prevoiusly renamed
2017-04-25 07:08:06 +01:00
Peter Bacon Darwin ff0f53c915 build(aio): include missing packages in the docs
These packages were not included in the configuration of the doc-gen, so
were not being rendered.
2017-04-25 06:56:41 +01:00
Stefanie Fluin 64ef69fb34 feat(aio): api page column layout 2017-04-25 06:51:04 +01:00
Jesús Rodríguez 249cd8c2ec docs(aio): remove _blank target (#16205) 2017-04-24 11:23:45 -07:00
Chris McKnight feda017c50 docs(aio): Fix decorator JS feature explanation (#16214) 2017-04-24 09:54:36 -07:00
swseverance 2991221551 docs(aio): remove duplicate `as` (#16265)
the word `as` incorrectly appears consecutively
2017-04-24 09:51:38 -07:00
Filipe Silva d7719aa0f5 perf(aio): improve unit test rebuild time 2017-04-24 14:30:16 +01:00
Georgios Kalpakas 54e587a46d fix(aio): fix URL redirection for API pages 2017-04-24 14:15:43 +01:00
Ward Bell 4ac5096232 docs(aio): revised "Docs" page 2017-04-24 14:00:51 +01:00
Ward Bell 3d06b18fee docs(aio): topics in navigation.json alphabetized per section 2017-04-24 14:00:51 +01:00
Ward Bell 446153675f docs(aio): revise info architecture in navigation.json 2017-04-24 14:00:51 +01:00
Ward Bell bb1850a912 docs(aio): relocate images to match docs 2017-04-24 14:00:51 +01:00
Ward Bell 93516ea8a1 docs(aio): rename cb- files and a few others 2017-04-24 14:00:51 +01:00
Peter Bacon Darwin c3fa8803d3 fix(aio): use SVG icons for page load sensitive UI
The side nav and menu buttons need to appear early on in the loading of the page.
Currently we are using icon fonts with ligatures to get icons for these areas.
This can result in a flash of unstyled font.

By replacing these with SVG icons, we get a better user experience.
By overriding the `MdIconRegistry` we can inline the SVG source, which
means that there will never by a delay in rendering the icons.

The new `CustomMdIconRegistry` expects a multi-provider containing an array
of `SvgIconInfo` objects. These objects hold the name and SVG source of the
icon. When `MdIconComponent` requests an SVG icon we will get it from the
pre-loading cache, if available, before delegating back to the original
`MdIconRegistry`.

Note that SVG versions of `md-icon` do not apply the `material-icons` CSS
class to the element, so the styling for the icons that we are preloading
has been changed to use `.mat-icon` instead.

Closes #16100
2017-04-24 13:14:21 +01:00
Peter Bacon Darwin 3cad5da5a4 build(aio): refactor dgeni packages
This is to tidy up the `author-packagse`, which currently duplicates a
lot of the configuration in the main packages. We need to
DRY this up so that we don't fall foul of a change in one being missed in
the other.
2017-04-23 22:50:33 +01:00
Natalie Sidhom 7a8bd99ab1 docs(aio): correct some minor typos in the form validation cookbook (#16068) 2017-04-21 13:37:28 -07:00
Ward Bell 7520ddcf40 feat(aio): dont set query params during search #16125 (#16217)
closes #16125

API search still updates query params as sending someone a pre-filtered API search link is  handy.

While typing in the search box no longer updates the URL in the addr bar, you can still create a link like `~/?search=animations` and it will open the search dialog and profile the search box as it may be useful to email such a thing to someone.
2017-04-21 13:36:37 -07:00
George Kalpakas 9c1318d731 fix(aio): strip leading slashes from path (and improve DRY-ness) (#16238)
Previously, the path returned by `LocationService.path()` preserved leading
slashes, which resulted in requests with consequtive slashes in the URL. Such
requests would fail (with a 404) on staging.

This commit fixes it, by removing leading slashes from the path. It also
refactors `LocationService` a bit, converting path to an observable,
`currentPath` (similar to `currentUrl`), and applies certain clean-ups (e.g.
stripping slashes, query, hash) in one place, which simplifies consumption.

Closes #16230
2017-04-21 13:35:40 -07:00
Jesús Rodríguez 062fc4afee docs(aio): change hardcoded links to the old site (#16196) 2017-04-21 10:10:19 -07:00
Jesus Rodriguez 87ec8d13ce docs(aio): remove doble title from setup 2017-04-21 16:26:08 +01:00
Stefanie Fluin cf034f759a feat(aio): api page styles
Changed description from h3 to h2 to match the other header
Created api page classes for consistent styling
Add styles for info-bar section
Wrapped pre tags for code not to go off of screen
2017-04-21 16:24:37 +01:00
Stefanie Fluin b0c5d21f31 fix(aio): header anchor placement
Adjusted left-margin so that the anchor icon does not push the header in
2017-04-21 16:09:19 +01:00
Jesus Rodriguez cbe5f78c1a docs(aio): fix old jade on DI 2017-04-21 16:01:20 +01:00
Jesus Rodriguez 4598af23c0 docs(aio): adjust zips/plunker paths 2017-04-21 09:56:45 +01:00
Peter Bacon Darwin 9730351048 build(aio): compute which examples to include when watching guide docs (#16213)
PR Close #16213
2017-04-20 22:16:21 -05:00
Peter Bacon Darwin ce687550ae build(aio): run `docs` before `docs-watch` (#16213)
This helps to ensure that the full docs have been
generated before we begin watching.

You can disable this by providing the `--watch-only`
flag. E.g. `yarn docs-watch -- --watch-only`.
2017-04-20 22:16:16 -05:00
Peter Bacon Darwin 563b909279 build(aio): give the authors-package tests long enough not to flake (#16213) 2017-04-20 22:16:10 -05:00
Ward Bell c390b06da2 feat(aio): add prettier network fail page (#16139) 2017-04-20 22:15:16 -05:00
Peter Bacon Darwin db4e9ea04a feat(aio): add `<current-location>` embedded component (#16139) 2017-04-20 22:15:04 -05:00
Peter Bacon Darwin 5e6a3ff6a7 refactor(aio): rename DocumentContents `url` to `id` and tidy up (#16139)
Dgeni is now providing the `id` for all the documents to be viewed. So we
no longer need to add this to the DocumentContents object.

There are some notable changes in the refactoring:

`DocumentService`:

* The id of the document to render is now obtained from `LocationService.path()`.
* The `getFileNotFoundDoc` and `getErrorDoc` methods have been extracted from
the `fetchDocument` method.

`AppComponent`:

* the `pageId` is now computed in a separate `setPageId` method.

`AppComponen` spec file:

* The `TestHttp` has had the hard coded documents removed and replaced with
a function that will generate docs as needed.
2017-04-20 22:14:58 -05:00
Peter Bacon Darwin d0dcabd700 build(aio): add the `id` to the DocumentContents at doc-gen time (#16139) 2017-04-20 22:14:51 -05:00
Peter Bacon Darwin 6ed812ff75 feat(aio): add LocationService.path() method (#16139)
This enables things like embedded components easy access to a clean version
of the current location path.
2017-04-20 22:14:43 -05:00
Jesús Rodríguez 5461182e25 docs(aio): make glossary links work again (#16201) 2017-04-20 20:11:27 -07:00
Ward Bell cbe95f3d25 feat(aio): add code-of-conduct to footer #16105 (#16216)
closes #16105
2017-04-20 20:09:58 -07:00
Stefanie Fluin ce57b6fb45 fix(aio): material code tab arrow animation (#16206) 2017-04-20 14:52:02 -07:00
Kapunahele Wong 134f542b36 docs(aio): fix spacing on l-sub-sections 2017-04-20 16:30:59 +01:00
Kapunahele Wong c3727f330b docs(aio): fix aot TOC list items 2017-04-20 16:30:59 +01:00
Jesus Rodriguez d313aad671 docs(aio): remove js examples 2017-04-20 16:04:06 +01:00
Jesus Rodriguez a54fe634ee docs(aio): move file to the right folder 2017-04-20 16:02:07 +01:00
Jesus Rodriguez ccb6c45466 docs(aio): rename http guide 2017-04-20 16:01:44 +01:00
Ward Bell 800b1b060e fix(aio): autoscroll & add #top-of-page
* Scrolls to hash element or top of page when no hash.
* Scrolls down a bit (80px) to account for top menu overhang.
* No longer scrolls when the hash element is not found.
* Adds `<a id="top-of-page"></a>` which will benefit future efforts to
navigate there from within a page.
2017-04-20 10:47:05 +01:00
Stefanie Fluin ab03852234 fix(aio): accessibility items in search and home
Index: Changed h3s to h2s given hierarchy
Index: Aligned text and image blocks to be centered
Index: Announcement bar button darkened for appropriate contrast
Search Results: Changed to list items in unordered list to accommodate accessibility and updated styles accordingly
2017-04-20 10:28:40 +01:00
Ward Bell f90258162a fix(aio): handle clicks deep within anchor tags 2017-04-20 10:16:37 +01:00
Filipe Silva bfd5f27525 feat(aio): add e2e (#15976)
PR Close #15976
2017-04-19 22:36:23 -05:00
Stefanie Fluin 9f66c9c1d1 feat(aio): page not found layout and designs (#16089)
Add 404 svg image
h1 custom styling

PR Close #16089
2017-04-19 22:35:58 -05:00
Stefanie Fluin 1259fe75c9 feat(aio): 404 page (#16089) 2017-04-19 22:35:50 -05:00
Stefanie Fluin e9db74f937 fix(aio): style mods and content udpates (#16138)
Fixed capitalization in sidenav menu items
Add min height property to sidenav-content for better viewing on short pages or high resolution screens
Add dividier between change log items as before to h2
Table adjustments to reduce off-screen items
Update home page banner text and icon change, and fix banner img and mobile alignment
Fix and add links in doc landing page and change card footer text to reflect correct name
Removed docs landing page to rebase with master

PR Close #16138
2017-04-19 22:35:12 -05:00
Ward Bell f99cb96533 fix(aio): revert resize to HostListener; delete device svc (#16143)
Angular change detection bug -> no page update on resize.
Reverting to `@HostListener('window:resize', ['$event.target.innerWidth'])` cures it.
Delete DeviceService which no longer serves a purpose.
Adjusted affected AppComponent and LiveExample tests.

PR Close #16143
2017-04-19 22:34:58 -05:00
Peter Bacon Darwin 1e848d696b feat(aio): add GH-style anchor links to headings (#16161)
Closes #16126

PR Close #16161
2017-04-19 22:34:46 -05:00
Georgios Kalpakas 1bfa7c6f14 feat(aio): redirect old URLs to new ones (#16162)
There are external resources that link to the old URLs. In order to avoid
breaking them, the old URLs are redirected to the new ones.

Fixes #15795
Closes #16133

PR Close #16162
2017-04-19 22:34:32 -05:00
cameronbriar 05d1008a08 docs(aio): fix bad cookbook URL references for aot-compiler (#16165)
PR Close #16165
2017-04-19 22:34:21 -05:00
Georgios Kalpakas 9a98fc0f05 fix(aio): better styling for "disabled JavaScript" message (#16170)
PR Close #16170
2017-04-19 22:34:04 -05:00
Georgios Kalpakas 2ca6258a0f fix(aio): correctly reload page to apply ServiceWorker update (#16170)
Previously, due ot a limitation/bug in AoT compilation and `useValue`, the
`global` injected into `SwUpdateNotificationsService` was always undefined,
which prevented it from actually reloading the page after activating a
ServiceWorker update.

This commit fixes it by switching to `useFactory`, which works correctly with
AoT.
2017-04-19 22:33:58 -05:00
Georgios Kalpakas 24c34385ee feat(aio): make the ServiceWorker update process more intuitive/user-friendly (#16170)
Fixes #16093
2017-04-19 22:33:47 -05:00
Jesus Rodriguez e07b7ea114 docs(aio): fix broken regions 2017-04-19 15:52:55 +01:00
Stefanie Fluin 73c7503ae0 fix(aio): sidenav padding
Aligned padding to fit beneath the top nav
Add scroll bar styling inside sidenav menu
Increased font size of h2 to be different from h3 for better legibility
2017-04-19 14:05:36 +01:00
Stefanie Fluin 79db6c3d19 feat(aio): about page style changes
Added contributor info links as overlay
Made image larger as a focus
2017-04-19 14:00:35 +01:00
Jesus Rodriguez b6ddacdccf build(aio): add setup script 2017-04-19 13:50:18 +01:00
Santi c9983e6440 docs(aio): Fix reference to the right example
Fix reference to the right example (it's the second route in the example the one showing the route parameter, not the first one)
2017-04-19 11:56:17 +01:00
Peter Bacon Darwin 51098c4f86 fix(aio): allow empty titles for contents pages
Now if you specifically provide an empty `@title` tag
for a contents file, the doc-gen will not complain and
the browser will just display a reasonable default.
2017-04-19 11:55:00 +01:00
Stefanie Fluin 4624406ce8 feat(aio): search results accessibility items
Add visually hidden class and apply to h2 in search results
Changed h2 group headers to h3s
Add roles to main and content
Fix API material icon placement
Image alt additions where needed
Add lang attribute to html tag
Add aria-label on search input
2017-04-19 11:52:24 +01:00
Ward Bell 76269f4a1f docs(aio): fix the broken docs guide 2017-04-19 11:49:32 +01:00
Jesus Rodriguez 50174d9fb5 build(aio): ability to generate zips 2017-04-19 11:34:39 +01:00
Peter Bacon Darwin 648de7dd86 build(aio): render titles correctly in content pages
If a document provided a title jsdoc tag then its h1
element was being rendered incorrectly as a markdown
paragraph.

This change renders the title as a markdown h1 tag
directly.

Fixes #16099
2017-04-19 10:42:38 +01:00
Jesus Rodriguez 9d40ab9e20 docs(aio): rename ToH to match the guide name 2017-04-19 10:28:31 +01:00
cameronbriar 691e86c9bf docs(aio): fix minor typos in deployment guide 2017-04-19 10:21:53 +01:00
Andy 8fa4453aec docs(aio): Testing Guide: Second matcher parameter 2017-04-19 10:19:57 +01:00
Ward Bell 93d8f8cd63 docs(aio): add VS Code advice to readme.md 2017-04-19 10:19:11 +01:00
Stefanie Fluin c2fca3d9e0 fix(aio): api list container centered 2017-04-19 10:18:39 +01:00
Peter Bacon Darwin 8b31178647 docs(aio): remove styling comments from cheatsheet
These comments were not designed to be rendered.
2017-04-19 10:14:41 +01:00
Peter Bacon Darwin e951612af2 fix(aio): set the pageId to the file-not-found URL if the doc is not available
Previously, the `AppComponent.pageId` was set via the current URL, rather than
the document being displayed. This is only really noticeable when the URL does not
match a valid doc and we are actually displaying a 404 page.

Now we compute the `pageId` from the  URL of the document being viewed,
which is returned from the  `DocumentService.currentDocument` observable instead.
2017-04-19 09:09:31 +01:00
Peter Bacon Darwin b668c2c781 build(aio): IDEs should only parse the `src` files
I found that VS Code was taking an age to bring up the intellisense
for TypeScript source files in the `aio/src` folder.
I believe that this is because it was trying to parse all the files in
the `aio/content/examples` folder as well, which is not relevant to the
web app development.

This change restricts the root `aio/tsconfig.json` to only the entry points
for the app, the unit tests and e2e tests.
2017-04-19 08:36:05 +01:00
Peter Bacon Darwin ecd0348d96 build(aio): extract the title from the content if necessary
Documents can specify their title via the `title` or `name` jsdoc tags.

This change adds that, if neither are provided, the first `<h1>` element
is removed from the `renderedContent` and used for the title.

If there is still no title then it is set to the empty string and a warning
is logged.
2017-04-18 15:20:04 -07:00
Peter Bacon Darwin 69b86925b3 feat(aio): set the document title in the browser title 2017-04-18 15:20:04 -07:00
Stefanie Fluin 7dfa0b9da9 fix(aio): about page
Header now visible fully when card if flipped to back info

Contributor website links fixed
2017-04-17 17:43:43 -07:00
Ward Bell f5d0fac800 feat(aio): about/contributor page rebased and tweaked 2017-04-17 17:43:43 -07:00
Peter Bacon Darwin baecb553a6 fix(aio): fix linting issues 2017-04-17 17:43:43 -07:00
Stefanie Fluin 6e89f0bf8d feat(aio): about page styles
contributor fix

contributor card styling updates

button styling and container size fix

remove button and add image border

selection filter for buttons

header only show when group selected and styles

initial flip card funcitonality and data change

selected buttons styling

complete flip func and card style

flip feature

contributor group changes

fixes
2017-04-17 17:43:43 -07:00
Peter Bacon Darwin 7165eb15bd build(aio): add div with class around content
Closes #16037
2017-04-17 13:43:42 +01:00
Ward Bell e20a72280b feat(aio): when select node in sidebar close other expanded nodes 2017-04-17 07:53:38 +01:00
Peter Bacon Darwin abecf3eb6d build(aio): move the `transforms` folder into the `tools` folder 2017-04-16 22:05:23 +01:00
Peter Bacon Darwin 7c418a7e06 style(aio): add missing semi-colon 2017-04-16 21:38:00 +01:00
Peter Bacon Darwin 58f080a325 build(aio): add `doc-watch` yarn task for docs authors
This task is suitable for day to day docs authoring.

This task cuts corners, which makes it much faster than a full `yarn docs`
run but it does not produce completely valid output.
In general this isgood enough for authors to see their changes as they make them.

The task is triggered by a call to

```
yarn docs-watch
```

This sets up watchers on the `aio/contents` and `packages` folders.
Any changes to files below these folders new doc generation run to start.
The input to the generation is confined to a collection of files related
to the changed file. For example:

* a change to a file in `aio/content/marketing` will generate all the
marketing files.
* a change to a file in `aio/content/tutorial` or `aio/examples/toh-*`
will generate all the tutorial files (and their embedded examples).
* a change to a file in `aio/guide` or `aio/examples` (but not a `toh-`
example) will generate the appropriate guide and its embedded examples
* a change to a file in `packages` or `packages/examples` will generate
the appropriate API doc and its embedded examples.

Be aware that the mapping between docs and its examples are based on doc file
and example folder structure being equivalent. Sometimes a doc will reference
an example in a different folder, in which case the generated doc will be
inaccurate. Mostly this is not a big problem.
2017-04-16 20:56:10 +01:00
Jesus Rodriguez be719e4817 docs(aio): fix jade leftover from toh5 2017-04-16 20:32:40 +01:00
Stefanie Fluin 11b54f69e5 feat(aio): edit page link styling and placement 2017-04-16 11:28:27 +01:00
Stefanie Fluin 4a3c66fe22 feat(aio): fixed sidenav, moved footer inside of sidenav container (#16028)
When content pages were short, the footer would take up a large part
of the display area and the side nav would look like it was shorter than
it really was.

This change moves the footer into the main content area so that the
nav always extends to the full length the browser.
2017-04-16 11:10:17 +01:00
Ward Bell 9a5084412d feat(aio): force plunker to embedded-style on narrow (mobile) screens
Regular plunker is unusable on narrow screen
Refactors LiveExampleComponent and adds tests.
Refactor width detection to `DeviceService` because need to know width change in 2 places.
Keep “disable” option add in earlier spikes because simple and potentially useful in future.
2017-04-16 08:12:48 +01:00
Ward Bell 24670667f1 feat(aio): detect mobile device and tell user live-example is not available
Adds DeviceService to detect mobile device and listen for window resize events.
2017-04-16 08:12:48 +01:00
Peter Bacon Darwin 3f307ff061 style(aio): fix indentation on location service spec
Closes #15589
2017-04-15 22:17:33 +01:00
Jesus Rodriguez 7433da546f build(aio): give intellisense to the examples 2017-04-15 22:15:54 +01:00
Georgios Kalpakas eda2a7b2dc ci(aio): do not fail if PWA score testing fails on staging
Currently, running `yarn test-pwa-score` right after deploying to staging fails
with the error:

```
{ Error: Unable to load the page: timeout reached ...  code: 'PAGE_LOAD_ERROR' }
```

As a temporary fix, this commit prevents the build from failing because of PWA
score errors (until we identify the cause and fix it).
2017-04-15 17:14:28 +01:00
Ward Bell 196203f6d7 feat(aio): implement resources with resources.json 2017-04-15 16:53:42 +01:00
Peter Bacon Darwin 46b0c7a18c docs(aio): fix links to quickstart on homepage 2017-04-15 13:37:38 +01:00
Georgios Kalpakas b6a0098aa3 ci(aio): make `deploy-staging.sh` executable 2017-04-15 13:33:48 +01:00
Stefanie Fluin 7d986ae5dc feat(aio): smaller typography, code header pad 2017-04-15 10:39:16 +01:00
Stefanie Fluin a2bdcc9ba8 feat(aio): callout, code ex header styles
lighten up code ex background
2017-04-15 10:34:13 +01:00
Stefanie Fluin 624b5a5f83 feat(aio): filetree and top bar hover styles 2017-04-15 10:30:23 +01:00
Stefanie Fluin b57c9605ce feat(aio): pwa bg color and name 2017-04-15 10:27:16 +01:00
Stefanie Fluin 49dfc9fe2d feat(aio): scroll bar styling 2017-04-15 10:25:24 +01:00
Stefanie Fluin 8f9ba62dc3 feat(aio): positioning UX for nav and search 2017-04-15 10:25:24 +01:00
Peter Bacon Darwin 16673fa38b build(aio): remove unused config code 2017-04-15 10:24:21 +01:00
Georgios Kalpakas 49d97e1216 ci(aio): verify that the Lighthouse PWA score remains above a threshold 2017-04-15 10:23:45 +01:00
Georgios Kalpakas a73050de48 ci(aio): convert `deploy-staging` to a shell script 2017-04-15 10:23:45 +01:00
Georgios Kalpakas 2535769a65 feat(aio): allow reloading page from ServiceWorker update notification 2017-04-15 10:23:45 +01:00
Georgios Kalpakas b1a3c47766 fix(aio): add better message for disabled JavaScript 2017-04-15 10:23:45 +01:00
Stefanie Fluin 8479e9e6d7 feat(aio): high res screen spacing 2017-04-15 10:23:16 +01:00
Georgios Kalpakas c0b1bbea3e feat(aio): add log rotation in preview server 2017-04-15 10:22:40 +01:00
Ward Bell 092f0df7a6 test(aio): remove dross from NavMenuComponent spec 2017-04-15 10:22:01 +01:00
Ward Bell dfc81c3dab feat(aio): sort search results by area/title
Display area names in all caps
Exclude results with no title because they don’t show & can’t be clicked.
Should find these and give their docs a title.
2017-04-15 10:19:32 +01:00
George Kalpakas 14b7dfa007 fix(aio): create a proper commit link on preview comments (#15941)
Previously, only a few characters of the SHA would appear on the preview link
comment posted on the PR. This was usually enough for GitHub to create a link to
the corresponding commit, but it was possible to have collisions with other
commits with the same first characters (which prevented GitHub from identifying
the correct commit and create a link.)

This commit fixes this issue by including the full SHA on the commentso GitHub
can identify the correct commit and create the link. GitHub will automatically
truncate the link text (by default to 7 chars unless more are necessary to
uniquely identify the commit).
2017-04-13 11:55:33 -07:00
Georgios Kalpakas d263595c63 ci(aio): do not fail when re-deploying preview for the same PR/SHA
Previously, when trying to upload the build artifacts for a PR/SHA that was
already successfully deployed (e.g. when re-running a Travis job), the preview
server would return a 403 and the build would fail.

Since we have other mechanisms to verify that the PR author is trusted and the
artifacts do indeed come from the specified PR and since the new artifacts
should be the same with the already deployed ones (same SHA), there is no reason
to fail the build. The preview server will reject the request with a special
HTTP status code (409 - Conflict), which the `deploy-preview` script will
recognize and exit with 0.
2017-04-13 11:26:21 +01:00
Ward Bell f09fd6ec16 test(aio): add sidenav tests and refactor related tests 2017-04-12 14:17:14 -07:00
Ward Bell 8cfa58715c feat(aio): hide side nav in mobile mode
Don’t show the side nav in mobile (not side-by-side) view when arriving or navigating.
Only show it by request.

The side nav should continue to appear in wide mode (side-by-side) when navigating from a marketing page to a guide page.
2017-04-12 14:17:14 -07:00
Stefanie Fluin 909264feb5 hr update 2017-04-12 21:10:05 +01:00
Stefanie Fluin cc1ed77dd8 consolidated and moved api-list scss 2017-04-12 21:10:05 +01:00
Stefanie Fluin 7d69a91bfe table updates, live example add, shield logo res 2017-04-12 21:10:05 +01:00
Stefanie Fluin a6545ddd4d filetree and subsection edits 2017-04-12 21:10:05 +01:00
Stefanie Fluin 498bd64d9c code style updates 2017-04-12 21:10:05 +01:00
Stefanie Fluin ad9a3a2d3b features page and code/table fixes 2017-04-12 21:10:05 +01:00
Stefanie Fluin 2da0f1639f feat(aio): filtree updates 2017-04-12 21:10:05 +01:00
Stefanie Fluin 3ec58ecea0 feat(aio): hr styling 2017-04-12 21:10:05 +01:00
Jesus Rodriguez 061475402c docs(aio): final migration from old site 2017-04-12 21:01:55 +01:00
Ward Bell 8f1359d25f docs(aio): make events.html current (#15913)
docs(aio): make events.html current
2017-04-12 12:36:45 -07:00
Ward Bell 8659bd2c4b docs(aio): template -> ng-template (#15912) 2017-04-12 12:28:09 -07:00
Igor Minar 4a052cd343 build(aio): upgrade to @angular/material#2.0.0-beta.3 (#15606) 2017-04-12 12:25:11 -07:00
Peter Bacon Darwin 28c2a71cfc docs(aio): revert file-trees back to original structure
This is an auto-migration from angular.io
2017-04-12 12:24:02 -07:00
Peter Bacon Darwin 69b37fff26 build(aio): remove unused Rho package 2017-04-12 12:24:02 -07:00
Peter Bacon Darwin df619adc76 docs(aio): update to remark syntax 2017-04-12 12:24:02 -07:00
Peter Bacon Darwin 374bf1ed98 build(aio): implement the remark renderer
The implementation adds three plugins to the remark processor:

* remove support for code blocks triggered by indented
text - only gfm triple backticks are supported; and also adds support for
dgeni inline tags.

* ignore content within `code-example` and `code-tabs` elements. This prevents
the content being accidentally treated as markdown

* ignore dgeni inline tags, e.g. `{@link ... }` to prevent the content of
the links from being accidentally treated as markdown
2017-04-12 12:24:02 -07:00
Stefanie Fluin 075f3f8c9f feat(aio): search results layer fix and responsive table 2017-04-12 14:46:31 +01:00
Stefanie Fluin 2798c1bbec feat(aio): code block styles with header 2017-04-12 14:29:03 +01:00
Peter Bacon Darwin 04fb29b589 test(aio): add test for escaped newline in CodeComponent 2017-04-11 16:03:21 -07:00
Peter Bacon Darwin 9037593ab8 fix(aio): left align code in aio-code components 2017-04-11 16:03:21 -07:00
Jesus Rodriguez 3ced940b5a build(aio): ability to generate plunkers 2017-04-11 16:00:37 -07:00
Ward Bell 0799f184dc fix(aio): v2 - when browser lacks service worker, disable sw feature 2017-04-11 14:26:22 -07:00
Ward Bell c530c5d317 fix(aio): when browser lacks service worker, disable sw feature 2017-04-11 14:26:22 -07:00
Stefanie Fluin 4c566dbfbb fix(aio): api search input fix and style 2017-04-10 13:47:24 +01:00
Jesus Rodriguez c6917d9d4f build(aio): update boilerplate to new folder structure 2017-04-04 04:19:49 -06:00
Stefanie Fluin 25132bff86 feat(aio): marketing page styles 2017-04-03 15:48:52 -07:00
Jesus Rodriguez 0e38bf9de0 build(aio): new migration 2017-04-03 15:41:05 -07:00
Ward Bell 309bae0a0b feat(aio): display “code sample missing” message when no code sample
Not having code in a `<code-example>` or `<code-tabs>` is presumed to be an error.
Hides the copy button as well.
2017-04-02 22:37:16 +01:00
Ward Bell ae70293df3 feat(aio): add DtComponent to view/change the raw contents 2017-04-02 22:15:57 +01:00
Ward Bell 1e623a3710 feat(aio): add original style for feature page
fixes link to quick start; moves $unit to constants
2017-04-02 22:10:39 +01:00
Peter Bacon Darwin 928e2543cd fix(aio): currentNode url should not contain hash or search 2017-04-02 11:41:35 +01:00
Peter Bacon Darwin 92e14a36f9 test(aio): ensure AppComponent.pageId has no search or hash 2017-04-02 11:41:35 +01:00
Peter Bacon Darwin 34a1990c57 fix(aio): trim code blocks before rendering 2017-04-02 11:40:40 +01:00
Ward Bell e4c3882a81 fix(aio): fix presskit.html typos 2017-04-02 10:20:25 +01:00
Georgios Kalpakas 62f9738a9a test(aio): enable linting of `transforms/` and add rules for jasmine 2017-04-01 20:56:16 +01:00
Georgios Kalpakas a562c64ed6 test(aio): enable tslint rule for focused jasmine tests/suites 2017-04-01 20:56:16 +01:00
Georgios Kalpakas 8c726ea87e fix(aio): preserve space after anchor elements
Sometimes, depending on the length of lines, anchor elements would be formatted
incorrectly by `html.prettyPrint` and the space right after the element was
removed.

This was apparently caused by a bug in `html.prettyPrint` in combination with
its default behavior of wrapping lines at a specific limit (70 chars). Since the
output is only meant to be used as JSON string data, wrapping the lines makes it
less readable by adding unnecessary `\n`.

This commit disables the line wrapping, which effectively avoids the bug that
was responsible for incorrectly formatting anchor elements and surrounding
space.

Related to #15681.
2017-04-01 18:23:01 +01:00
Peter Bacon Darwin c8be3960a0 style(aio): fix minor syntax error 2017-04-01 11:49:08 +01:00
Peter Bacon Darwin 759af8b56b feat(aio): add id to doc-viewer container based on current url
This enables page specific styling via CSS.
2017-04-01 11:49:08 +01:00
Ward Bell 97deb01b1f feat(aio): add about component and data 2017-04-01 07:49:45 +01:00
Ward Bell ad639d783f feat(aio): add contribute marketing page 2017-04-01 07:45:42 +01:00
Peter Bacon Darwin e1c2e50d92 docs(aio): move bio images into content folder 2017-04-01 07:17:24 +01:00
Peter Bacon Darwin dd4e3f8704 build(aio): copy content image assets 2017-04-01 07:17:24 +01:00
Peter Bacon Darwin 08941aa0c7 build(aio): process marketing docs that have .md extension
See #15661
2017-03-31 17:32:16 -07:00
Stefanie Fluin 03fb766428 feat(aio): shell code styling 2017-03-31 17:13:36 -07:00
Peter Bacon Darwin 2454a3b641 build(aio): process contributor.json file 2017-03-31 17:13:25 -07:00
Peter Bacon Darwin 3e793f079d build(aio): fix empty docplaster processing 2017-03-31 17:13:06 -07:00
Ward Bell 5c38012980 fix(aio): contributor.html typos 2017-03-31 11:37:09 -07:00
Stefanie Fluin 7c2ce296d3 feat(aio): add footer background 2017-03-31 11:36:56 -07:00
Stefanie Fluin 9d37d86223 feat(aio): docs landing page with styles, logo res fix 2017-03-31 11:36:56 -07:00
Stefanie Fluin 21ef5a1961 feat(aio): docs landing page with styles, logo res fix 2017-03-31 11:36:56 -07:00
Peter Bacon Darwin 46f8a6dd85 docs(aio): remove unnecessary blank lines 2017-03-31 16:22:08 +01:00
Ward Bell 0aa90c6be4 feat(aio): add presskit and correct "/logos/angular2/" 2017-03-31 11:24:46 +01:00
Jesus Rodriguez c05a8cf7bb build(aio): copy examples boilerplate 2017-03-31 09:57:43 +01:00
Ward Bell 4c21114087 feat(aio): remove google feedback 2017-03-31 09:37:57 +01:00
Ward Bell 65bb2373ae fix(aio): remove "v.2" from index.html "title" 2017-03-31 08:24:44 +01:00
Peter Bacon Darwin 8c925bca71 build(aio): update rho to new version
This version changes the expected syntax for emphasis.
The original Rho renderer uses `*` for strong an `_` for em.
But it is more standard in markdown to use `**` or `__` for bold
and `*` or `_` for em.
2017-03-31 08:08:08 +01:00
Peter Bacon Darwin 330a8c90e4 docs(aio): quickstarts are now in the guide folder 2017-03-31 08:05:33 +01:00
Peter Bacon Darwin d8c35c893b docs(aio): move quickstarts and glossary into guide 2017-03-31 08:05:33 +01:00
Peter Bacon Darwin 0fe308c0ef docs(aio): remove docs that are unwanted or in the wrong place 2017-03-31 08:05:33 +01:00
Peter Bacon Darwin 2d14c3b17a docs(aio): ensure blank lines before HTML blocks in markdown 2017-03-31 08:05:33 +01:00
Ward Bell 28bf222a6a feat(aio): add footer links with GoogleFeedbackService (#15605) 2017-03-30 14:46:25 -07:00
George Kalpakas 9e883f5873 feat(aio): improve ProgressiveWepApp-ability (#15628)
Previous Lighthouse score: 52/100
New Lighthouse score: 95+/100

Fixes #15588
2017-03-30 12:35:15 -07:00
Stefanie Fluin 43a9619e57 feat(aio): overall margin, code, alert styles 2017-03-29 23:55:43 -07:00
Stefanie Fluin f518e3a75f feat(aio): code cpy btn temp fix and footer ext 2017-03-29 23:55:43 -07:00
Stefanie Fluin 146b30796e feat(aio): code blocks, copy bttn, a tag hover 2017-03-29 23:55:43 -07:00
Stefanie Fluin 5942b2b27c feat(aio): footer repeat background 2017-03-29 23:55:43 -07:00
Stefanie Fluin 330b1090f4 refactor(aio): move media queries to mixin 2017-03-29 23:55:43 -07:00
George Kalpakas 3ccbe28d9f feat(aio): enable activating available ServiceWorker updates (#15561) 2017-03-29 23:55:03 -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
Ward Bell 861953c95c feat(aio): add LiveExampleComponent (#15544) 2017-03-28 14:41:50 -07:00