Skip to content

refactor(drag-drop): remove manual observers count #15441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2019
Merged

refactor(drag-drop): remove manual observers count #15441

merged 1 commit into from
May 13, 2019

Conversation

vitaliy-bobrov
Copy link
Contributor

Moved event for drag-drop uses manual observers count to prevent emitting when no observers. RxJS Subject already counts it for us, we can check Subject.observers.length property - https://rxjs.dev/api/index/class/Subject#properties

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Mar 11, 2019
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

Code-wise LGTM, but the CI is broken.

crisbeto added a commit to crisbeto/material2 that referenced this pull request Mar 12, 2019
Uses the observer count from the `Subject` itself, rather than counting it manually.

Relates to angular#15441.
@vitaliy-bobrov
Copy link
Contributor Author

Hi @crisbeto,

I've updated the PR with the changes you asked. Ready for review.

@crisbeto
Copy link
Member

Sorry for the delay @vitaliy-bobrov, I must've missed the notification. It seems like the CI is failing. You should be able to fix it by running bazel run //tools/public_api_guard:cdk/drag-drop.d.ts_api.accept.

@vitaliy-bobrov
Copy link
Contributor Author

@crisbeto, Done, now all checks on CI pass. Ready for review

Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM

@crisbeto crisbeto added pr: lgtm action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Apr 2, 2019
@mmalerba mmalerba added aaa and removed aaa labels Apr 25, 2019
@jelbourn jelbourn merged commit f7c53d6 into angular:master May 13, 2019
jelbourn pushed a commit that referenced this pull request May 13, 2019
Uses the observer count from the `Subject` itself, rather than counting it manually.

Relates to #15441.
@vitaliy-bobrov vitaliy-bobrov deleted the dnd-subject-counter branch May 14, 2019 19:03
RudolfFrederiksen pushed a commit to RudolfFrederiksen/material2 that referenced this pull request Jun 21, 2019
Uses the observer count from the `Subject` itself, rather than counting it manually.

Relates to angular#15441.
RudolfFrederiksen pushed a commit to RudolfFrederiksen/material2 that referenced this pull request Jun 21, 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 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants