Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

update(core): align breakpoints with those used in CDK #1006

Merged
merged 1 commit into from
Jan 23, 2019

Conversation

ThomasBurleson
Copy link
Contributor

@ThomasBurleson ThomasBurleson commented Jan 23, 2019

  • Ensure standard breakpoints mediaQueries are aligned with those in the CDK
  • Update MediaObserver
    • isActive() enhanced to support list of aliases to determine if any match
    • properly disconnects subscribers when destroyed

The @angular/cdk BreakpointObserver will not replace @angular/flex-layout MediaObserver. MediaObserver is an enhanced version that notifies subscribers of activations for standard AND overlapping (lt-xxx, gt-xxx) breakpoints.

Note: Developers should use MediaObserver (not use MatchMedia) service to observe breakpoint activations! MediaObserver is the recommended service to use for application developers; MatchMedia should be considered a private service.

Fixes #685. Refs #1001.

@angular/cdk BreakpointObserver will not replace `MediaObserver`. **MediaObserver** is an enhanced version that notifies subscribers of activations for standard AND **overlapping (lt-xxx, gt-xxx)**  breakpoints.

* Ensure standard breakpoints mediaQueries are aligned with those in the CDK
* Update MediaObserver
  * isActive() enhanced to support list of aliases to determine if any match
  * properly disconnects subscribers when destroyed

> Note: Developers should use MediaObserver (not use MatchMedia) service to observe breakpoint activations! MediaObserver is the recommended service to use for application developers; MatchMedia should be considered a private service.

Fixes #685. Refs #1001.
@ThomasBurleson
Copy link
Contributor Author

@CaerusKaru - ping for review

Copy link
Member

@CaerusKaru CaerusKaru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@CaerusKaru CaerusKaru added pr: lgtm This PR has been approved by the reviewer pr: merge ready This PR is ready for the caretaker to presubmit and merge pr: merge safe The caretaker can merge this PR without doing a presubmit and removed pr: needs review labels Jan 23, 2019
@CaerusKaru CaerusKaru added this to the 7.0.0-beta.24 milestone Jan 23, 2019
@CaerusKaru CaerusKaru merged commit 6f43cf6 into master Jan 23, 2019
@CaerusKaru CaerusKaru deleted the thomasb/fix-match-cdk branch January 23, 2019 16:13
@CaerusKaru CaerusKaru self-assigned this Jan 23, 2019
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes pr: lgtm This PR has been approved by the reviewer pr: merge ready This PR is ready for the caretaker to presubmit and merge pr: merge safe The caretaker can merge this PR without doing a presubmit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: switch to CDK BreakpointsObserver
3 participants