Skip to content
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

feat(core): add scrollable view properties to connected pos strategy #2259

Merged
merged 22 commits into from
Dec 22, 2016

Conversation

andrewseguin
Copy link
Contributor

Uses new Scrollable changes from #2188. Adds a set of properties to the change position event from the connected position strategy.

Still working on writing the tests for the connected position strategy but wanted to put this out for review to get it looked at ahead of time since beta is on Tuesday and we want this in there.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Dec 16, 2016
@andrewseguin andrewseguin force-pushed the close-on-scroll-out branch 5 times, most recently from 7cfc35f to 67e0684 Compare December 20, 2016 23:10
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

Overall looks good, but I'm worried about releasing this in beta without the throttle limiter

} from './connected-position';
import {Subject} from 'rxjs/Subject';
import {Observable} from 'rxjs/Observable';
import {Scrollable} from '../scroll/scrollable';

export type ElementBoundingPositions = {
Copy link
Member

Choose a reason for hiding this comment

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

Add description for what this type is used for?

let strategy = this._overlay.position().connectedTo(this._elementRef, origin, position);
strategy.withScrollableContainers(this._scrollDispatcher.getScrollContainers(this._elementRef));
strategy.onPositionChange.subscribe((change: ConnectedOverlayPositionChange) => {
Copy link
Member

Choose a reason for hiding this comment

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

The type should be inferred here, so you should be able to just do

strategy.onPositionChange.subscribe(change => {
  // ... 
});

@andrewseguin andrewseguin changed the title feat(tooltip): close tooltip when it is scrolled out of view feat(tooltip): add scrollable bounding checks to connected pos strategy Dec 21, 2016
@andrewseguin andrewseguin changed the title feat(tooltip): add scrollable bounding checks to connected pos strategy feat(tooltip): add scrollable view properties to connected pos strategy Dec 21, 2016
@andrewseguin
Copy link
Contributor Author

Removed its usage in tooltip and sidenav until we optimize the number of scroll notifications with a throttle

@andrewseguin andrewseguin changed the title feat(tooltip): add scrollable view properties to connected pos strategy feat(core): add scrollable view properties to connected pos strategy Dec 21, 2016
@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Dec 21, 2016
@jelbourn jelbourn merged commit b60d33f into angular:master Dec 22, 2016
@andrewseguin andrewseguin deleted the close-on-scroll-out branch February 23, 2017 21:00
@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
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants