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

Enable Generic Discontiguous Regions within VirtualizedList #32638

Closed

Commits on Nov 21, 2021

  1. Enable Generic Discontiguous Regions within VirtualizedList

    Builds upon the `CellRenderMask` data structure added with facebook#31420, and VirtualizedList coverage added with facebook#31401.
    
    VirtualizedList currently keeps a [first, last] range as state, tracking the region of cells to render. The render functions uses this as an input, along with a few special cases to render more (sticky headers, initial render region.)
    
    This change moves to instead keep state which describes discontiguous render regions. This mask is continually updated as the viewport changes, batch renders expand the region, etc. Special cases are baked into the render mask, with a relatively simple tranformation from the mask to render function.
    
    This representation makes it much easier to support keyboarding scenarios, which require keeping distinct regions (e.g. for last focused) realized while out of viewport.
    
    MS/FB folks have a video discussion about VirtualizedList here: https://msit.microsoftstream.com/video/fe01a1ff-0400-94b1-d4f1-f1eb924b1809
    
    facebook#31401 added quite a few snapshot tests, centering around the logic this change is touching. I manually validated RNTester FlatList examples (and their should be some upstream UI testing for them).
    NickGerleman committed Nov 21, 2021
    Configuration menu
    Copy the full SHA
    1cff8dc View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2021

  1. Configuration menu
    Copy the full SHA
    b1dd0c3 View commit details
    Browse the repository at this point in the history

Commits on Dec 17, 2021

  1. Configuration menu
    Copy the full SHA
    76859b5 View commit details
    Browse the repository at this point in the history