Skip to content
Permalink
Branch: master
Commits on Apr 22, 2019
  1. fix(ivy): classes should not mess up matching for bound dir attributes (

    kara authored and benlesh committed Apr 20, 2019
    #30002)
    
    Previously, we had a bug where directive matching could fail if the directive
    attribute was bound and followed a certain number of classes. This is because
    in the matching logic, we were treating classes like normal attributes. We
    should instead be skipping classes in the attribute matching logic. Otherwise
    classes will match for directives with attribute selectors, and as we are
    iterating through them in twos (when they are stored as name-only, not in
    name-value pairs), it may throw off directive matching for any bound attributes
    that come after. This commit changes the directive matching logic to skip
    classes altogether.
    
    PR Close #30002
Commits on Apr 19, 2019
  1. fix(ivy): ensure views created in constructors dont break queries (#2…

    kara authored and benlesh committed Apr 19, 2019
    …9983)
    
    Previous to this change, we assumed embedded views could only be created after
    their parent template node had completed processing. As a result, we only set
    up query logic for containers after directives on the node were created.
    However, this assumption didn't take into account the case where a directive
    on a template node could create views in its constructor.
    
    This commit fixes query logic to work with views created in constructors.
    In that case, we need to create a query container before the new view is
    rendered so query results in the view aren't lost. But since the query container
    is created before directives have completed processing, we also have to ensure
    that query results gathered later on the template node are inserted before that
    query container. Otherwise, query results in embedded views will clobber query
    results on template nodes.
    
    This splice mode may be slightly slower than the normal matching for queries on
    containers, but we should only fall back to this strategy in the edge case where
    views are created in constructors. (We should encourage developers to create
    views in ngOnInit instead).
    
    PR Close #29983
Commits on Apr 17, 2019
  1. fix(ivy): directiveInject should fall back to inject (#29948)

    kara authored and alxhub committed Apr 17, 2019
    If a component has its definition set by defineComponent (as opposed to
    JIT getter), then it will generate a factory that uses directiveInject()
    to retrieve its dependencies. This can be problematic in test code because
    tests could use the injection utility before bootstrapping the component,
    and directiveInject() relies on the view having been created.
    
    This commit tweaks directiveInject() to fall back to inject() if the view
    has not been created. This will allow injection to work in tests even if
    it is called before the component is bootstrapped.
    
    PR Close #29948
  2. fix(ivy): support providing components and dirs in tests (#29945)

    kara authored and alxhub committed Apr 16, 2019
    Previous to this commit, providing a component or directive in a test
    module without @Injectable() would throw because the injectable factory
    would not be found. Providing components in tests in addition to declaring
    or importing them is not necessary, but it should not throw an error.
    
    This commit ensures factory data is saved when component defs and directive
    defs are created, which allows them to be processed by the module injector.
    
    Note that bootstrapping is still required for this setup to work because
    directiveInject() does not support cases where the view has not been
    created. This case will be handled in a future commit.
    
    PR Close #29945
Commits on Apr 16, 2019
  1. fix(ivy): coalesced listeners should preventDefault if any returns fa…

    kara authored and alxhub committed Apr 16, 2019
    …lse (#29934)
    
    We had a bug where event.preventDefault() was not always called if listeners
    were coalesced. This is because we were overwriting the previous listener's
    result every time we called the next listener, so listeners early in the chain
    that returned false would be ignored and preventDefault would not be called.
    
    This commit fixes that issue, so now preventDefault() is called if any listener
    in a coalesced chain returns false. This brings us in line with View Engine
    behavior.
    
    PR Close #29934
Commits on Apr 12, 2019
  1. fix(ivy): log errors instead of re-throwing them (#29853)

    kara authored and alxhub committed Apr 11, 2019
    In order to be backwards compatible with View Engine, Ivy should log
    errors by default in the TestBed error handler rather than re-throwing
    them. Re-throwing the errors is a breaking change that causes issues with
    libraries like ngrx that have async behavior and custom error handling.
    
    This logging approach has issues (for both VE and Ivy) because it can allow
    tests to pass inappropriately if errors are thrown inside listeners. However,
    since re-throwing would be breaking and requires a larger redesign, we should
    wait until post-Ivy.
    
    PR Close #29853
Commits on Apr 2, 2019
  1. docs: add Deborah Kurata to Trusted Collaborators (#29605)

    kara authored and jasonaden committed Mar 30, 2019
    This commit adds Deborah to the Trusted Collaborators list, so she will appear in the Collaborators list on angular.io.
    PR Close #29605
Commits on Mar 28, 2019
  1. refactor: update tsickle comment to be more precise (#29513)

    kara authored and jasonaden committed Mar 28, 2019
    Co-Authored-By: benlesh <ben@benlesh.com>
    PR Close #29513
Commits on Mar 26, 2019
  1. fix(ivy): generate empty QueryList for root component content queries (

    kara authored and mhevery committed Mar 26, 2019
    …#29514)
    
    In View Engine, we used to generate empty QueryLists for content queries on root
    components (though we did not actually support populating these lists). We need
    to keep this behavior in Ivy for backwards compatibility. Otherwise, components
    that are sometimes used as root will fail if they are relying on content query
    results to always be defined.
    
    PR Close #29514
Commits on Mar 20, 2019
  1. test(ivy): add new material tests to blocklist (#29409)

    kara authored and matsko committed Mar 20, 2019
    After rebasing Material on master, we found new tests that were
    added and are still failing. This commit adds them to the blocklist
    so we can fix them.
    
    PR Close #29409
Commits on Mar 19, 2019
  1. fix(ivy): prevent templateOverrides from causing infinite loop (#29402)

    kara authored and matsko committed Mar 19, 2019
    Previously, the transitive scope calculation could lead into re-compiling
    the same module multiple times. This fix ensures we cannot get into this loop.
    It should be fixed more completely (e.g. more cases) once FW-1178 is resolved.
    
    PR Close #29402
Commits on Mar 15, 2019
  1. fix(ivy): add temporary hack for deprecatedOverrideProvider (#29324)

    kara authored and matsko committed Mar 15, 2019
    HACK: This is NOT the correct implementation for deprecatedOverrideProvider.
    We do not plan to implement this at all since the API is deprecated and
    scheduled for removal in V8. This hack is here temporarily for Ivy testing
    until we transition apps inside Google to the overrideProvider API. At that
    point, we will be able to remove this method entirely. In the meantime, we
    can use overrideProvider here to test apps with Ivy that don't care about
    eager instantiation. This fixes 97% of cases in our blueprint.
    
    PR Close #29324
Commits on Mar 13, 2019
  1. test(ivy): update blocklist to turn on table tests (#29271)

    kara committed Mar 13, 2019
    PR Close #29271
  2. release: cut the v8.0.0-beta.8 release

    kara committed Mar 13, 2019
Commits on Mar 12, 2019
  1. docs: release notes for the v7.2.9 release

    kara committed Mar 12, 2019
  2. ci: fix size regression to unblock master (#29263)

    kara committed Mar 12, 2019
    PR Close #29263
Commits on Mar 8, 2019
  1. test(ivy): fix failing view ref test (#29178)

    kara committed Mar 8, 2019
    PR Close #29178
Commits on Mar 7, 2019
  1. test(ivy): turn on passing Material tests for cdk-tree (#29162)

    kara committed Mar 7, 2019
    PR Close #29162
Commits on Mar 6, 2019
  1. test(ivy): turn on passing Material tests for mat-select (#29144)

    kara committed Mar 6, 2019
    PR Close #29144
  2. test(ivy): fix export tests to work in IE (#29125)

    kara authored and AndrewKushnir committed Mar 6, 2019
    Some of the export tests had assertions that relied on capitalization
    of attributes in the DOM. IE treats capitalization somewhat differently,
    so our SauceLabs tests were failing.
    
    This commit tweaks the tests so that the assertions do not rely on
    attributes to be capitalized or not.
    
    PR Close #29125
Commits on Mar 5, 2019
  1. test(ivy): restore root causes that were accidentally deleted (#29109)

    kara authored and AndrewKushnir committed Mar 5, 2019
    PR Close #29109
Commits on Mar 1, 2019
  1. fix(ivy): move views that are already attached in insert() (#29047)

    kara authored and AndrewKushnir committed Mar 1, 2019
    Currently if a user accidentally calls ViewContainerRef.insert() with
    a view that has already been attached, we do not clean up the references
    properly, so we create a view tree with a cycle. This causes an infinite
    loop when the view is destroyed.
    
    This PR ensures that we fall back to ViewContainerRef.move() behavior
    if we try to insert a view that is already attached. This fixes the
    cycle and honors the user intention.
    
    PR Close #29047
Commits on Feb 28, 2019
  1. ci: remove dev-infra as owner on material-ci folder (#28990)

    kara authored and AndrewKushnir committed Feb 26, 2019
    Currently, whenever someone on fw-core approvals list approves a change
    to the angular_material_blocklist.js file, it is not sufficient because
    dev-infra is also requested as a mandatory reviewer. This does not make
    sense because this folder only contains the list of ignored tests and
    not anything dev-infra related.
    
    Previously, we tried to fix this by creating a "Material CI" section
    underneath the existing "Build & CI" section, so that the "Material CI"
    rule would override the rule matching the entire "tools" folder.
    Unfortunately, this did not work. This commit attempts to resolve the
    problem by explicitly marking all sub-folders in the "tools" folder
    as owned by dev-infra (leaving out "material-ci"), so "material-ci"
    is only referenced by the rule assigning fw-core as code owners.
    
    PR Close #28990
Commits on Feb 27, 2019
  1. test(ivy): record root cause of CdkVirtualScrollViewport failures (#2…

    kara authored and benlesh committed Feb 27, 2019
    …8999)
    
    PR Close #28999
Commits on Feb 21, 2019
  1. test(ivy): turn on passing Material tests for paginator (#28890)

    kara authored and IgorMinar committed Feb 21, 2019
    PR Close #28890
  2. test(ivy): update material blocklist with root causes, remove passing…

    kara authored and IgorMinar committed Feb 21, 2019
    … tests (#28879)
    
    PR Close #28879
  3. test(ivy): turn on more passing Material tests (#28876)

    kara authored and IgorMinar committed Feb 20, 2019
    This commit removes more test from the Material blocklist so that
    they will run on CI. After static query support was added, they
    are no longer failing.
    
    PR Close #28876
Commits on Feb 20, 2019
  1. test(ivy): update material blocklist to turn on passing tests (#28873)

    kara authored and IgorMinar committed Feb 20, 2019
    We added the static flag to some dialog queries and new tests are passing.
    
    PR Close #28873
  2. test(ivy): update material golden file to turn on passing tests (#28848)

    kara authored and IgorMinar committed Feb 20, 2019
    We marked some queries in MatTab as static, which made some
    more Material tests pass in CI.
    
    PR Close #28848
  3. test(ivy): re-enable ngIf protractor test (#28845)

    kara authored and IgorMinar committed Feb 19, 2019
    We previously disabled this test because we did not yet have
    static query support in Ivy and the planned API would be
    slightly different. Now that a static query flag is available
    that works in both View Engine and Ivy, the test has been
    updated to use that flag and has been turned on to run in CI.
    
    Since the test was always unrelated to queries and was intended
    to test *ngIf behavior, updating the test in this instance
    seems reasonable.
    
    PR Close #28845
Commits on Feb 19, 2019
  1. fix(ivy): support static ContentChild queries (#28811)

    kara authored and IgorMinar committed Feb 19, 2019
    This commit adds support for the `static: true` flag in `ContentChild`
    queries. Prior to this commit, all `ContentChild` queries were resolved
    after change detection ran. This is a problem for backwards
    compatibility because View Engine also supported "static" queries which
    would resolve before change detection.
    
    Now if users add a `static: true` option, the query will be resolved in
    creation mode (before change detection runs). For example:
    
    ```ts
    @ContentChild(TemplateRef, {static: true}) template !: TemplateRef;
    ```
    
    This feature will come in handy for components that need
    to create components dynamically.
    
    PR Close #28811
  2. fix(ivy): support static ViewChild queries (#28811)

    kara authored and IgorMinar committed Feb 19, 2019
    This commit adds support for the `static: true` flag in
    `ViewChild` queries. Prior to this commit, all `ViewChild`
    queries were resolved after change detection ran. This is
    a problem for backwards compatibility because View Engine
    also supported "static" queries which would resolve before
    change detection.
    
    Now if users add a `static: true` option, the query will be
    resolved in creation mode (before change detection runs).
    For example:
    
    ```ts
    @ViewChild(TemplateRef, {static: true}) template !: TemplateRef;
    ```
    
    This feature will come in handy for components that need
    to create components dynamically.
    
    PR Close #28811
  3. feat(core): allow users to define timing of ViewChild/ContentChild qu…

    kara authored and IgorMinar committed Feb 18, 2019
    …eries (#28810)
    
    Prior to this commit, the timing of `ViewChild`/`ContentChild` query
    resolution depended on the results of each query. If any results
    for a particular query were nested inside embedded views (e.g.
    *ngIfs), that query would be resolved after change detection ran.
    Otherwise, the query would be resolved as soon as nodes were created.
    
    This inconsistency in resolution timing had the potential to cause
    confusion because query results would sometimes be available in
    ngOnInit, but sometimes wouldn't be available until ngAfterContentInit
    or ngAfterViewInit. Code depending on a query result could suddenly
    stop working as soon as an *ngIf or an *ngFor was added to the template.
    
    With this commit, users can dictate when they want a particular
    `ViewChild` or `ContentChild` query to be resolved with the `static`
    flag. For example, one can mark a particular query as `static: false`
    to ensure change detection always runs before its results are set:
    
    ```ts
    @ContentChild('foo', {static: false}) foo !: ElementRef;
    ```
    
    This means that even if there isn't a query result wrapped in an
    *ngIf or an *ngFor now, adding one to the template later won't change
    the timing of the query resolution and potentially break your component.
    
    Similarly, if you know that your query needs to be resolved earlier
    (e.g. you need results in an ngOnInit hook), you can mark it as
    `static: true`.
    
    ```ts
    @ViewChild(TemplateRef, {static: true}) foo !: TemplateRef;
    ```
    
    Note: this means that your component will not support *ngIf results.
    
    If you do not supply a `static` option when creating your `ViewChild` or
    `ContentChild` query, the default query resolution timing will kick in.
    
    Note: This new option only applies to `ViewChild` and `ContentChild`
    queries, not `ViewChildren` or `ContentChildren` queries, as those types
    already resolve after CD runs.
    
    PR Close #28810
  4. docs: clarify process surrounding merge label (#28837)

    kara authored and IgorMinar committed Feb 19, 2019
    In the TRIAGE_AND_LABELS doc, it was not clear that the merge label
    may be applied by the author before the PR is green (as a sort of
    auto-submit). After the label is applied, it is still up to the
    caretaker to determine that the PR is acceptable before merging.
    This commit adds that clarification.
    
    PR Close #28837
Commits on Feb 17, 2019
  1. test(ivy): mark unknown binding test modifiedInIvy (#28740)

    kara authored and mhevery committed Feb 14, 2019
    This commit turns off an unknown binding test that is specific
    to the View Engine implementation. In Ivy, we do property validation
    at runtime for jit, so this test does not apply.
    
    PR Close #28740
Older
You can’t perform that action at this time.