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

Add methods for observing dock visibility #14736

Merged
merged 1 commit into from Jun 22, 2017

Conversation

Projects
None yet
2 participants
@matthewwithanm
Member

matthewwithanm commented Jun 7, 2017

This adds an onDidChangeVisible() and observeVisible() method to docks so that other objects can be notified when they're toggled.

Since this functionality covers the didHide() callback use case, I removed that.

One thing I'd like to discuss is the semantics of this. In the original docks PR, I had avoided calling this "visible" because it'll actually be false while the dock is visible but being animated closed. If you're using this API, for example, to show or hide contents of an item, you could wind up with surprising results.

@matthewwithanm

This comment has been minimized.

Show comment
Hide comment
@matthewwithanm

matthewwithanm Jun 9, 2017

Member

For posterity: the conclusion after talking to @maxbrunsfeld was that this API should behave as-is. A later PR can toggle the display of the dock item containers before and after animation so that IntersectionObserver can be used. (Currently, it's not working with "overflow: hidden" masking.)

Member

matthewwithanm commented Jun 9, 2017

For posterity: the conclusion after talking to @maxbrunsfeld was that this API should behave as-is. A later PR can toggle the display of the dock item containers before and after animation so that IntersectionObserver can be used. (Currently, it's not working with "overflow: hidden" masking.)

@maxbrunsfeld maxbrunsfeld merged commit c1c0e7e into master Jun 22, 2017

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@maxbrunsfeld maxbrunsfeld deleted the fb-mdt-observe-dock-visibility branch Jun 22, 2017

@maxbrunsfeld

This comment has been minimized.

Show comment
Hide comment
@maxbrunsfeld

maxbrunsfeld Jun 22, 2017

Contributor

👍

Contributor

maxbrunsfeld commented Jun 22, 2017

👍

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