Skip to content

Whats new - add pagination and infinite scroll

Jay requested to merge jswain_whats_new_pagination into master

What does this MR do?

Adding infinite scroll and "pagination" to the "whats new" component.

Something worth mentioning is the integration between the drawer and the infinite scroll. The Drawer component has the overflow-y attribute declared and it conflicts with the infinite scroll component receiving a scroll event. My solution is to hide any overflow from the drawer, and set a fixed pixel amount to the infinite scroll as a prop.

One other thing worth mentioning is the complexity of the cache key. Because we're cacheing paginated data, and I was concerned about the possibility of cacheing pages 1 - 3 with one set of data, and then the possibility of page 4 being cached with a different set of data, I relied on a filename to ensure both caches were from the same data set.

part of: gitlab-org/growth/engineering#5388 (closed)

Screenshots

Screen_Shot_2020-10-21_at_2.00.21_PM

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Jay

Merge request reports