Skip to content

adds virtual scroll adapter #14287

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

Closed
wants to merge 3 commits into from

Conversation

BenLayet
Copy link

As discussed in #10122

I order to integrate virtual scroll into mat table we need to decouple CdkVirtualScrollViewport from CdkVirtualForOf

This modification introduces an adapter between the 2 classes, so users can provide their own version of
CdkVirtualScrollAdapter

suggested by @shlomiassaf,

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@googlebot googlebot added the cla: no PR author must sign Google's Contributor License Agreement: https://opensource.google.com/docs/cla label Nov 27, 2018
@BenLayet
Copy link
Author

I signed it!

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@BenLayet
Copy link
Author

I signed it!

@BenLayet BenLayet force-pushed the virtual-scroll-with-adapter branch from a08d922 to f326ec6 Compare November 27, 2018 14:09
@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes PR author has agreed to Google's Contributor License Agreement and removed cla: no PR author must sign Google's Contributor License Agreement: https://opensource.google.com/docs/cla labels Nov 27, 2018
@BenLayet
Copy link
Author

It seems that CI check fail for a reason independant of my modifications.

error An unexpected error occurred: "https://registry.yarnpkg.com/flatmap-stream/-/flatmap-stream-0.1.1.tgz: Request failed \"404 Not Found\"".

Is there someone looking at the PR even if the checks fail ?

@IlCallo
Copy link
Contributor

IlCallo commented Nov 27, 2018

Related to this attack of some days ago:
dominictarr/event-stream#116

That package was malicious code and has been removed from the registry

@devversion
Copy link
Member

We've fixed this issue with #14295. If you rebase your PR, the tests should run as you would expect.

@BenLayet
Copy link
Author

Thank you @IlCallo for the info.
Do you know if the bot will retry the checks once this is fixed ?

@IlCallo
Copy link
Contributor

IlCallo commented Nov 27, 2018

As dev said, you should fetch from upstream, rebase and force push.

Some useful instructions are written into CONTRIBUTING file, I think

ben-henoida added 2 commits November 27, 2018 22:17
@mmalerba
Copy link
Contributor

mmalerba commented Dec 3, 2018

Looks good, but I would like if we could come up with a better name than CdkVirtualScrollAdapter. @jelbourn @crisbeto any naming ideas?

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.

@mmalerba I don't think I have a better name for the adapter. I was thinking about CdkVirtualScrollDataSource, but that could be confused with the ones on table and tree.

@@ -14,3 +14,4 @@ export * from './viewport-ruler';
export * from './virtual-for-of';
export * from './virtual-scroll-strategy';
export * from './virtual-scroll-viewport';
export * from './virtual-scroll-adapter';
Copy link
Member

Choose a reason for hiding this comment

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

Needs an extra newline at the end of the file.

import {Observable} from 'rxjs';
import {ListRange} from '../collections';

export interface CdkVirtualScrollAdapter<T> {
Copy link
Member

Choose a reason for hiding this comment

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

This needs some docs explaining what it does and what it's useful for.

import {ListRange} from '../collections';

export interface CdkVirtualScrollAdapter<T> {
dataStream: Observable<T[] | ReadonlyArray<T>>;
Copy link
Member

Choose a reason for hiding this comment

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

@mmalerba shouldn't we call this a dataSource for consistency with some of the other components?

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually this is different than the dataSource, in the case of cdkVirtualForOf this stream is created by connecting to the data source, but it doesn't have to be.

import {Observable} from 'rxjs';
import {ListRange} from '../collections';

export interface CdkVirtualScrollAdapter<T> {
Copy link
Member

Choose a reason for hiding this comment

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

How about CdkVirtualScrollRepeater?

@CRACKISH
Copy link

How are you doing on this request? I need this feature ))

@CharlBest
Copy link

Will this pull request help with #13862 and if so is there any timeline to get this in?

@Splaktar
Copy link
Contributor

@ben-henoida thank you for making your first contribution with this PR. Can you please address some of the review feedback above? Please let us know if you run into any issues or have questions about how to do that.

@mmalerba
Copy link
Contributor

Closing due to inactivity

@mmalerba mmalerba closed this Aug 12, 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 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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.

10 participants