Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Fix nganimate doc #14632

Closed
wants to merge 354 commits into from
Closed

Fix nganimate doc #14632

wants to merge 354 commits into from

Conversation

Narretz
Copy link
Contributor

@Narretz Narretz commented May 18, 2016

A different fix for the mocked document problem (in 1.4.x) that also fixes another possibly breaking access to the document.

One caveat: since we are now failing gracefully, and a missing document means no animations fire, tests that test animations and mock out document will not run animations, and this will be opaque to developers. However, I assume that most tests that mock document are actually very basic, as lots of other things should break when $document is mocked

Please check if the PR fulfills these requirements

matsko and others added 30 commits November 19, 2015 14:52
The $$AnimateRunner class is now the same for the core $animate service
and the ngAnimate $animate service. Previously, the core used a different
implementation that didn't match the ngAnimate behavior with regard
to callbacks.

Closes angular#13205
Closes angular#13347
- add info about ngJq
- fix alert box
- add info about css function
docs: minor grammar fix
missing word in overview

Closes angular#13346
This is needed for languages for which the month on its own has a
different format (case) than when used as part of a date.

Closes angular#3744
Fixes angular#10247
Fixes angular#12642
Closes angular#12844
Replace `decimalPlaces` with `fractionSize`, as `decimalPlaces`
isn't defined anywhere and is most likely meant to be `fractionSize`.

Closes angular#13323
ngCarousel no longer exists (or has ever existed).

Closes angular#13322
Closes angular#13353
When calling `$parse` with `undefined` as the expression and with
an interceptor, then when the function is evaluated, then call the
interceptor

Closes: angular#13367
Closes: angular#13373
Previously, options.delay was only considered when a class added an
extra transition style (which leads to style recalculation).

Fixes angular#13355
Closes angular#13363
By manually parsing and rounding we can deal with the more tricky numbers

Closes angular#13394
Closes angular#8674
Closes angular#12709
Closes angular#8705
Closes angular#12707
Closes angular#10246
Closes angular#10252
Prior to this fix the provided options object would be
altered as the animation kicks off due to the underlying
mechanics of ngAnimate. This patch ensures that a
copy of the provided options is used instead. This patch
also works for when `$animateCss` is used by itself.

Fixes angular#13040
Closes angular#13175
During parent structural animations, ongoing animations on child elements
are closed. These child elements are identified by their data-ng-animate
attribute. If an element is the clone of an animating element,
it might have this attribute, but no animation runner associated with it,
so we need to ignore it.

Fixes angular#11992
Closes angular#13424
Throw to prevent hard to debug errors in functions that are
called later.

Fixes angular#12925
Closes angular#13444
…mple

The example has been expanded to make it easier to provoke the
behavior that the description is talking about (rollbackViewValue
and programmatic model updates)

Related angular#13340
"any of the parameter value" contains plural (any of the) as well as singular (value).
Fixed to be singular to match the rest of the text block.

Closes angular#13448
The original statement is in the past tense (as if it were referring to a previous step of the
tutorial). The mentioned changes, however, are being done in this setp.

Closes angular#13452
You cannot create new objects inside Angular expressions. For example:
{{ new Date() }} expression fails.
cloverharvest and others added 21 commits April 15, 2016 01:25
When calling `.splice()` without a 2nd argument (`deleteCount`), most browsers will splice to the
end of the array. As it turns out, this is the behavior specified in [ES2015][es6]. In [ES5][es5],
the spec seems to imply that nothing should happen.

To avoid inconsistent behavior among browsers implementing different versions of the EcmaScript
standart or when ES5 shims are included (e.g. https://github.com/es-shims/es5-shim/), this commit
ensures that all calls to `.splice()` provide at least two arguments.

[es5]: http://www.ecma-international.org/ecma-262/5.1/#sec-15.4.4.12
[es6]: http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.splice

Fixes angular#14467

Closes angular#14489
Implicitly trust empty templates added to `$templateCache` as is the case for all other templates.

Fixes angular#14479

Closes angular#14496
The "Books" and "Videos" subtitles had no space between text and the '#' so it didn't render as a
subtitle.

Closes angular#14514
Previously, calling `Attributes#$set('srcset', value)` on an `<img>` element would throw if `value`
were undefined, as it assumed `value` is always a string.
This commit fixes the issue, by skipping the unnecessary string manipulation when `value` is not
defined.

Closes angular#14470

Closes angular#14493
…instead of `toString()`)

Custom `$sce` implementations might not provide a `toString()` method on the wrapped object, or it
might be compiled away in non-debug mode. Watching the unwrapped value (retrieved using
`$sce.valueOf()`) fixes the problem.

The performance of this should be equivalent - `toString()` on objects usually touches all fields,
plus we will also avoid the (potentially big) string allocation.

Fixes angular#14526
Closes angular#14527
Accessing the document for the hidden state is costly for
platforms like Electron. Instead, listen for visibilitychange
and store the state.

Closes angular#14066
The Angular Docs do not show the restrictions

Closes angular#14541
+ explain decorators and how they are implemented in angular
+ explain how different types of services can be selected
+ explain `$delegate` objects and how they differ between services
+ warn of the risks/caveats of `$delegate` modification
+ note the exposure of `decorator` through the module api
+ show an example of decorating a core service
+ show an example of decorating a core directive
+ show an example of decorating a core filter

Closes angular#12163
Closes angular#14372
docs for return of path() inaccurately describe the function’s return when a value is passed in.

Closes angular#14544
Previously `stripCommentsFromElement()` would return an empty Array (instead of a jqLite collection)
which would cause an exception to be thrown: "element.parent not a function".
This commit fixes it, by ensuring that the returned value is always a jqLite collection.

Closes angular#14558

Closes angular#14559
Reverts d3e123b, bf1acf7 and aa28e48.
Backporting the changes is complicated because we don't destroy the rootScope
after each test in 1.4.x
(angular#14574)
…d out

Some tests mock out  and now that we always access the hidden property, existing
tests can get broken. This change keeps the existing tests working.
In tests, the $document service might be mocked without providing a real
document, which will lead to errors.

With this fix, we provide an empty object as a default document to
safe-guard against this. If the empty object is used, no animations
will run, as the animated node won't have a body as a parent.

This commit also changes the check for document.hidden slightly. It
should be accessed independently of the current animationsEnabled state.
Since animations are only enabled after two digests, it's possible that
some tests never reach the animationsEnabled = true state and therefore
aren't actually checking the document.hidden state, which means that
the previous fix only works if no more than two digests happen in the test.
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

1 similar comment
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.