94 Commits

Author SHA1 Message Date
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
Ward Bell
4be1966a21 feat(aio): revise Docs page; docs version selector in sidenav 2017-04-28 09:40:39 +01:00
Ward Bell
3f46645f5f feat(aio): add Table of Contents (toc) component. (#16078) 2017-04-27 15:32:46 -07:00
Ward Bell
ac5e6baced fix(aio): AppComponent should scroll only once when location changes 2017-04-26 09:20:00 +01:00
Ward Bell
11b2f62ed2 feat(aio): don't animate sidenav on launch. 2017-04-25 07:42:53 +01: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
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
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
Ward Bell
f90258162a fix(aio): handle clicks deep within anchor tags 2017-04-20 10:16:37 +01: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
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
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
69b86925b3 feat(aio): set the document title in the browser title 2017-04-18 15:20:04 -07: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
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
7d69a91bfe table updates, live example add, shield logo res 2017-04-12 21:10:05 +01:00
Igor Minar
4a052cd343 build(aio): upgrade to @angular/material#2.0.0-beta.3 (#15606) 2017-04-12 12:25:11 -07:00
Stefanie Fluin
25132bff86 feat(aio): marketing page styles 2017-04-03 15:48:52 -07:00
Ward Bell
ae70293df3 feat(aio): add DtComponent to view/change the raw contents 2017-04-02 22:15:57 +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
Stefanie Fluin
21ef5a1961 feat(aio): docs landing page with styles, logo res fix 2017-03-31 11:36:56 -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
Peter Bacon Darwin
b7a89cec59 feat(aio): show top-nav with same styling as side-nav when window is narrow
Fixes #15490
2017-03-28 11:48:28 +01:00
Peter Bacon Darwin
228238e602 refactor(aio): move SearchService initialisation into SearchBoxComponent
The AppComponent really doesn't need to know about the search service.
2017-03-27 09:24:38 +01:00
Peter Bacon Darwin
4e10faf1eb build(aio): add version into navigation.json
The navigation.json is now passed through the dgeni pipeline.
The source file has been moved to `aio/content/navigation.json`
but the generated file will now appear where the original source file
was found, `aio/src/content/navigation.json`.

Everything inside `aio/src/content` is now generated and ignored by git.

The `processNavigationMap` processor in this commit adds the current version
information to the navigation.json file and verifies the relative urls in
the file map to real documents.

The navigationService exposes the versionInfo as an observable, which the
AppComponent renders at the top of the sidenav.
2017-03-21 15:20:28 -05:00
Peter Bacon Darwin
6772c913c7 fix(aio): scroll to hash fragment element on URL change 2017-03-15 16:11:30 -07:00
Stefanie Fluin
c2bd357825 feat(aio): initial design commit
Implemented style guide elements to top header bar, side hamburger nav menu, content and search. Consolidated SCSS files to styles folder. Fixed PWA test.
2017-03-15 16:11:30 -07:00
Peter Bacon Darwin
4870f910d6 feat(aio): hide search results when click outside search elements
Clicking anywhere except on the search results and the search box will
now hide the search results

Closes #15095
2017-03-15 16:11:30 -07:00
Peter Bacon Darwin
f600d4e9e4 refactor(aio): move window:resize handler into component 2017-03-15 16:11:29 -07:00
Peter Bacon Darwin
eaa04354d5 fix(aio): intercept all clicks on anchors
Previously we had the `LinkDirective` which intercepted clicks on anchors
outside the doc viewer. Now we intercept "all" link clicks within the app.
2017-03-15 16:11:29 -07:00
Ward Bell
1c1085b140 feat(aio): add google analytics (#15081) 2017-03-13 18:08:23 -07:00
Peter Bacon Darwin
6497633529 feat(aio): improve search results functionality
* Ensure that all indexed documents are displayed in the search results.
(Previously the guide documents were not appearing because we only showed
results that had a `name` property, rather than a `name` or `title`.)
* Group the results by their containing folder (e.g. api, guide, tutorial, etc).
* Hide the results when the user hits the ESC key.
* Hide the results when the user clicks on a search result

Closes #14852
2017-03-13 16:55:52 -07:00
Peter Bacon Darwin
e7dab7e6c1 feat(aio): hard code a "Home" image link into the toolbar
Closes #15017
2017-03-13 12:55:11 -07:00
Peter Bacon Darwin
ebd446397a fix(aio): reimplement the top menu dropping into the side bar
I couldn't find the CSS for the `.small` class to make it look nice.
2017-03-06 22:27:32 -08:00
Peter Bacon Darwin
d83b7ba4c0 refactor(aio): rename activeNodes to selectedNodes
This keeps the naming consistent with the nav-menu
and nav-item component properties
2017-03-06 22:27:32 -08:00
Peter Bacon Darwin
46d6e8d191 fix(aio): reimplement side-nav 2017-03-06 22:27:32 -08:00
Peter Bacon Darwin
01ff427685 test(aio): reimplemented all the commented-out unit tests 2017-03-05 08:41:26 -08:00
Peter Bacon Darwin
b09ee424bf refactor(aio): reorganize search service for easier testing 2017-03-05 08:41:26 -08:00
Peter Bacon Darwin
dca83ec738 feat(aio): add search service and search UI 2017-03-02 00:21:06 -08:00
Peter Bacon Darwin
71e22b8d11 feat(aio): implement doc and navigation UI 2017-03-02 00:21:06 -08:00
Ward Bell
9a6f3d637f feat(aio): add sidenav driven by navigation data (#14429) 2017-02-15 11:22:37 -08:00
Pete Bacon Darwin
600402d440 build(aio): big move of docs related files (#14361)
All the docs related files (docs-app, doc-gen, content, etc)
are now to be found inside the `/aio` folder.

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

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

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

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