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

refactor(scrolling): add dedicated module for CdkScrollable #19064

Merged
merged 1 commit into from
Apr 24, 2020

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Apr 13, 2020

This is something that originally came up in #18082 and has been coming up as issues on GitHub. Some of our overlay-based components depend on CdkScrollable to tell them when to reposition, but the problem is that it's not very easy to consume, because:

  1. It has an attribute selector so if it doesn't match, nothing will throw an error.
  2. It has to be brought in through the ScrollingModule into the proper user module. The ScrollingModule is somewhat large, because it contains other things like virtual scrolling.

These changes address the issues by adding a small module dedicated only to CdkScrollable, and exporting the module through the relevant Material components.

Note: I'm setting this as a P2, because it should be relatively safe to land and we get related issue reports about it once in a while.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Apr 13, 2020
@crisbeto crisbeto marked this pull request as ready for review April 13, 2020 11:14
@crisbeto crisbeto added P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release labels Apr 13, 2020
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

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

LGTM

@mmalerba mmalerba added lgtm action: merge The PR is ready for merge by the caretaker labels Apr 13, 2020
@jelbourn
Copy link
Member

@crisbeto passes presubmit, just needs rebase

This is something that originally came up in angular#18082 and has been coming up as issues on GitHub. Some of our overlay-based components depend on `CdkScrollable` to tell them when to reposition, but the problem is that it's not very easy to consume, because:

1. It has an attribute selector so if it doesn't match, nothing will throw an error.
2. It has to be brought in through the `ScrollingModule` into the proper user module. The `ScrollingModule` is somewhat large, because it contains other things like virtual scrolling.

These changes address the issues by adding a small module dedicated only to `CdkScrollable`, and exporting the module through the relevant Material components.
@crisbeto
Copy link
Member Author

Rebased @jelbourn.

@jelbourn jelbourn merged commit ca18f6d into angular:master Apr 24, 2020
jelbourn pushed a commit that referenced this pull request Apr 24, 2020
This is something that originally came up in #18082 and has been coming up as issues on GitHub. Some of our overlay-based components depend on `CdkScrollable` to tell them when to reposition, but the problem is that it's not very easy to consume, because:

1. It has an attribute selector so if it doesn't match, nothing will throw an error.
2. It has to be brought in through the `ScrollingModule` into the proper user module. The `ScrollingModule` is somewhat large, because it contains other things like virtual scrolling.

These changes address the issues by adding a small module dedicated only to `CdkScrollable`, and exporting the module through the relevant Material components.
soro-google pushed a commit to soro-google/components that referenced this pull request Apr 24, 2020
…19064)

This is something that originally came up in angular#18082 and has been coming up as issues on GitHub. Some of our overlay-based components depend on `CdkScrollable` to tell them when to reposition, but the problem is that it's not very easy to consume, because:

1. It has an attribute selector so if it doesn't match, nothing will throw an error.
2. It has to be brought in through the `ScrollingModule` into the proper user module. The `ScrollingModule` is somewhat large, because it contains other things like virtual scrolling.

These changes address the issues by adding a small module dedicated only to `CdkScrollable`, and exporting the module through the relevant Material components.
@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 May 25, 2020
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 P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants