Commit Graph

7499 Commits

Author SHA1 Message Date
Victor Berchet 415a0f8047 test(router): simplify redirect tests (#16376) 2017-05-08 17:50:29 -05:00
Martin Probst e0a8376237 fix(compiler): avoid a `...null` spread in extraction (#16547)
This code only runs in ES5 mode in the test suite, so this is difficult to test.
However `updateFromTemplate` is being called with a spread operator, as
`...updateFromTemplate(...)`. The spread operator should fail on `null` values.
This change avoids the problem by always returning a (possibly empty) array.

PR Close #16547
2017-05-08 17:49:43 -05:00
Tobias Bosch f0f65443c6 fix(core): detach projected views when a parent view is destroyed (#16592)
This also clarifies via a test 
that we only update projected views when the view is created or destroyed,
but not when it is attached/detached/moved.

Fixes #15578

PR Close #16592
2017-05-08 17:49:02 -05:00
Tobias Bosch fcc91d862f fix(core): projected views should be dirty checked when the declaring component is dirty checked. (#16592)
Previously a projected view was only dirty checked when the
component in which it was inserted was dirty checked.

This fix changes the behavior so that a view is also dirty checked if
the declaring component is dirty checked.

Note: This does not change the order of change detection,
only the fact whether a projected view is dirty checked or not.

Fixes #14321
2017-05-08 17:48:58 -05: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
David Herges c5ce0408a1 docs(core): EventEmitter docs for isAsync defaults (#15780)
- solves #15758
2017-05-08 10:47:53 -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
Alex Rickabaugh 9da63408b0 fix(http): flatten metadata for @angular/http/testing
@angular/http/testing used to publish a metadata structure which paralleled
the .d.ts structure. This causes ngc to write incorrect imports for this
bundle when compiling providers using MockBackend and other http testing
classes.

This change restructures the @angular/http/testing build a bit, modeling it
after @angular/platform-browser-animations, and produces a FESM structure
that has flat metadata.

Fixes #15521.
2017-05-05 14:20:46 -04:00
Alex Rickabaugh 7ae7a8440c fix(http): introduce encodingHint for text() for better ArrayBuffer support
Currently, if a Response has an ArrayBuffer body and text() is called, Angular
attempts to convert the ArrayBuffer to a string. Doing this requires knowing
the encoding of the bytes in the buffer, which is context that we don't have.

Instead, we assume that the buffer is encoded in UTF-16, and attempt to process
it that way. Unfortunately the approach chosen (interpret buffer as Uint16Array and
create a Javascript string from each entry using String.fromCharCode) is incorrect
as it does not handle UTF-16 surrogate pairs. What Angular actually implements, then,
is UCS-2 decoding, which is equivalent to UTF-16 with characters restricted to the
base plane.

No standard way of decoding UTF-8 or UTF-16 exists in the browser today. APIs like
TextDecoder are only supported in a few browsers, and although hacks like using the
FileReader API with a Blob to force browsers to do content encoding detection and
decoding exist, they're slow and not compatible with the synchronous text() API.

Thus, this bug is fixed by introducing an encodingHint parameter to text(). The
default value of this parameter is 'legacy', indicating that the existing broken
behavior should be used - this prevents breaking existing apps. The only other
possible value of the hint is 'iso-8859' which interprets each byte of the buffer
with String.fromCharCode. UTF-8 and UTF-16 are not supported - it is up to the
consumer to get the ArrayBuffer and decode it themselves.

The parameter is a hint, as it's not always used (for example, if the conversion
to text doesn't involve an ArrayBuffer source). Additionally, this leaves the door
open for future implementations to perform more sophisticated encoding detection
and ignore the user-provided value if it can be proven to be incorrect.

Fixes #15932.

PR Close #16420
2017-05-05 14:20:36 -04:00
Alex Rickabaugh aef524506b fix(http): honor RequestArgs.search and RequestArgs.params map type
Currently `new Request({search: ...})` is not honored, and
`new Request({params: {'x': 'y'}) doesn't work either, as this object would have
toString() called. This change allows both of these cases to work, as proved by
the 2 new tests.

Fixes #15761

PR Close #16392
2017-05-05 14:20:26 -04:00
Tobias Bosch 547c363473 feat: add .ngsummary.ts files to support AOT unit tests
Design doc: https://docs.google.com/document/d/1VmTkz0EbEVSWfEEWEvQ5sXyQXSCvtMOw4t7pKU-jOwc/edit?usp=sharing
2017-05-05 13:23:53 -04: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
Matias Niemelä cd28df627c docs: add changelog for 4.2.0-beta.0 2017-05-04 14:41:39 -07:00
Matias Niemelä 59d62bc5aa release: cut the 4.2.0-beta.0 version 2017-05-04 14:37:20 -07:00
Matias Niemelä 8f46db3701 docs: add changelog for 4.1.1 2017-05-04 14:35:18 -07:00
Olivier Combe 109229246c test(compiler-cli): add test for missingTranslation parameter 2017-05-04 15:07:27 -04:00
Alex Eagle 5856298798 test: cleanup rxjs custom build
The latest rxjs release works with closure compiler out of the box.
We no longer need to compile our own.

Also put closure options into a file rather than using a shell script.
2017-05-04 15:07:27 -04:00
Matias Niemelä 7f9c589ba3 feat(core): add `begin` and `end` renderer methods to track change detection 2017-05-04 15:07:27 -04: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
Georgios Kalpakas b3e63c09ab fix(upgrade): initialize all inputs in time for `ngOnChanges()`
Previously, non-bracketed inputs (e.g. `xyz="foo"`) on downgraded components
were initialized using `attrs.$observe()` (which uses `$evalAsync()` under the
hood), while bracketed inputs (e.g. `[xyz]="'foo'"`) were initialized using
`$watch()`. If the downgraded component was created during a `$digest` (e.g. by
an `ng-if` watcher), the non-bracketed inputs were not initialized in time for
the initial call to `ngOnChanges()` and `ngOnInit()`.

This commit fixes it by using `$watch()` to initialize all inputs. `$observe()`
is still used for subsequent updates on non-bracketed inputs, because it is more
performant.

Fixes #16212
2017-05-03 19:32:57 -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