This is a follow-up to https://github.com/angular/components/pull/16221. What we hadn't accounted for in the aforementioned PR is that the consumer may have turned off `autoFocus` so that they can handle it themselves and with our changes focus would be reset back to the container. These changes add an extra check which will ensure that focus is only moved if it's not inside the dialog already.
Marks all e2e test suites as flaky with Bazel's `flaky` rule
attribute. This should improve CI stability as e2e tests can
sometimes fail due to browser crashes, port collisions.
We currently use `glob` in order to find rule directories automatically. This
has implications because it means that we depend on `glob` that is usually
brought in transitively by other project dependencies. This means that the
glob version is not guaranteed to be working due to previous `glob`
issues on windows.
Related to #16208
The breakpoint observer emits multiple and incorrect states when more than one query changes.
Debounce the observer emissions to eliminate the incorrect states and emit once.
References #10925
Fixes the `click` and `transitionend` event handlers not being removed from the backdrop that is being destroyed. Since they're referring to things inside the `OverlayRef`, they could cause some memory to be retained.
Currently the dialog's cleanup logic is tied to its exit animation completing. This usually isn't a problem since by default the dialog is attached to the application ref, however if the consumer has set a `viewContainerRef` and that ref is destroyed mid-animation, the exit animation event will never fire. These changes add a timeout as a fallback in case the animation doesn't finish in the specified time.
Fixes#16284.
Along the same lines as #16309.
Currently the bottom sheet's cleanup logic is tied to its exit animation completing. This usually isn't a problem since by default the bottom sheet is attached to the application ref, however if the consumer has set a viewContainerRef and that ref is destroyed mid-animation, the exit animation event will never fire. These changes add a timeout as a fallback in case the animation doesn't finish in the specified time.
Bumps the versions of the linters so we don't fall behind too much in case any of their APIs change. We were behind some major versions on `stylelint` in particular.
The `snapshot_tests_local_browsers` job currently seems
to fail because in order to run the setup snapshots script,
we already need to have the `node_modules` installed. This
means that we need to run Yarn twice for the cronjob. Though
this shouldn't have any performance implications because
we recently updated Yarn to a version that is able to
properly cache/restore the `node_modules`.
The goal of https://github.com/angular/components/commit/2ce5ffd56b70c3791331ceedeadc1f1f6daf3924 was to avoid the
use of Bazel through the `node_modules` because it adds unnecessary code overhead, slows down CI and means that
some tools need to be installed multiple times (such as `yarn`). Unfortunately when building a release with Bazel
right now, the bazel workspace status script depends on the global `node` binary. This means that we need
to bring in Node when running with the `--config=release` flag.. Since that causes inconsistent behavior
and just complicates the setup, we are using Bazel through Yarn for now. Similar to how we did it for
`angular/angular` with https://github.com/angular/angular/commit/8fc4ae51fb66d14f6dc82712a536c3842205fc6d.
We currently wait for browser tunnels of Saucelabs and Browserstack
to terminate by repeatedly checking with `ps -p`. This is not reliable and
can break if the host system is not removing forcibly killed child processes
from the process table. This is valid since the tunnels are launched as child
processes and we ideally wait for those to terminate using the `wait` command.
In order to be able to take advantage of Google's official
bazel docker images, we no longer can use a NodeJS script
for setting up the snapshot builds because NodeJS is not
installed in the image. Rather we need to convert the script
to a python script in order to be able to perform the package.json
modification.
Since this script is not intended to be executed locally, we
are free to use Python for this.
We no longer use Bazel from the `ngcontainer` image as it is
no longer maintained and we need to use the latest version of
Bazel in CircleCI. It's not ideal to use Bazel through Yarn since
binaries like that should be actually part of the docker image, but
for now we need to do this for jobs that use NodeJS & Bazel at the same time.
This is similar to what `angulart/angular` does.
Currently we support the part of the spec where the autocomplete panel is supposed to close when pressing alt + up arrow, however at some point we added more functionality that ends up reopening the panel immediately. These changes ensure that the user is able to close the panel via alt + up arrow.
Works around the expansion panel header animating on init, if its header is different from the default one. The original issue comes from the code introduced in #13088, but we can't remove that code, because it's there to work around a bug in Angular.
Fixes#16067.
We use the `isTouchEvent` any time we need to normalize something between touch and mouse events which happens for every pixel that the user has dragged. These changes switch to using direct comparison, rather than `startsWith`, which should be slightly faster since there's a narrow set of touch event types.
In order to make our component inputs which use boolean coercion more
consistent with other inputs which aren't declared through setters, we should
no longer call `markForCheck` within input setters as Angular automatically
runs change detection if input values are updated.
This breaks the programmatic usage of these inputs as Angular in that case
won't be able to run change detection (since it can't detect that the value
of the input changes).. though this is a more general problem with the
`OnPush` strategy as we can't have consistent behavior for programmatic
input updates without switching *every* input to a setter.
Instead, in order to still support programmatic input updates, we
should expose a method that allows developers to mark the MDC
components as dirty. This is necessary so that developers which
_really_ need to update programmatically (e.g. through `ViewChild`)
can still update the componet to reflect the changes. The benefit is
that we don't need to convert every input to a setter w/ markForCheck
in order to make the OnPush inputs behavior consistent.
Related to COMP-170
* feat(datepicker): align multi-year-view based on minDate and maxDate
If minDate is set (and maxDate not set), let first page begin with minYear.
If maxDate is set, let last page end with maxYear,
and disable year(s) < minYear (if any) in first page.
Fixes#10646
* add tests for feat(datepicker): align multi-year-view based on minDate and maxDate
* refactor feat(datepicker): align multi-year-view based on minDate and maxDate
* omit helper func from public api
* fixup, resolve conflict
refactor with private methods feat(datepicker): align multi-year-view based on minDate and maxDate
* share func feat(datepicker): align multi-year-view based on minDate and maxDate
* fix formatting nit
Currently some animations in the tab components don't get disabled, when using the `NoopAnimationsModule`, because they don't go through the Angular animations. These changes ensure that everything will be disabled.
Fixes#10590.
Disables all of the chip animations and transitions when the consumer is using the `NoopAnimationsModule`. Also cleans up some repetitive code.
Relates to #10590.
Currently our version of Yarn is installed through the "angular/ngcontainer"
docker image. This is problematic because in order to be able to update
Yarn, we always need to update the docker image to a version that comes
with the desired Yarn version. Sometimes there is no docker image with the
desired latest Yarn version, and therefore we cannot easily update the Yarn version.
Additionally the latest Yarn versions contain various fixes for debugging timeout
issues and also have improved logic for restoring existing `node_modules`. This
is **essential** to take advantage of the CircleCI caching mechanism.