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

fix(fabric, lists): disable view flattening in VirtualizedList #2292

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Nov 21, 2024

  1. [fabric] Disable view flattening in VirtualizedList cells

    Summary:
    Scroll views set up with an inverted vertical axis can't support view flattening due to the flattening not taking the axis inversion in consideration while repositioning the views.
    
    This diff disables view flattening on the cells of the virtualized list so that the layout would be correct in inverted scroll views when using Fabric.
    
    The change is not being applied to ScrollView directly because we can safely assume that vertical axis inversion will only be enabled on VirtualizedList/FlatList.
    
    Test Plan:
    Run Zeratul with Fabric and check that the vertical order of grouped bubble messages is correct.
    
    | Before | After |
    |--|
    |  {F1136386200}  |  {F1136386364}  |
    
    Reviewers: shawndempsey, #rn-desktop
    
    Reviewed By: shawndempsey
    
    Differential Revision: https://phabricator.intern.facebook.com/D50846483
    
    Tasks: T167539420
    Nick Lefever authored and Saadnajmi committed Nov 21, 2024
    Configuration menu
    Copy the full SHA
    d546971 View commit details
    Browse the repository at this point in the history
  2. [fabric] Disable view flattening in header/footer/empty/spacer compon…

    …ents of VirtualizedList
    
    Summary:
    View flattening was already disabled in the cell renderer used by the Virtualized List in this diff D50846483
    
    This diff disables view flattening in the header, footer, empty and spacer cells to fix the layout being broken because of the vertical axis flipping used by the reverse order virtualized list.
    
    Test Plan:
    Run Zeratul with Fabric enabled and scroll to the top of a message thread to show the participants summary header.
    
    | Before | After |
    |--|
    |  {F1145726580}  |  {F1145726618}  |
    
    Reviewers: shawndempsey, chpurrer, #rn-desktop
    
    Reviewed By: chpurrer
    
    Differential Revision: https://phabricator.intern.facebook.com/D51182545
    
    Tasks: T167539420
    Nick Lefever authored and Saadnajmi committed Nov 21, 2024
    Configuration menu
    Copy the full SHA
    f7a8d4a View commit details
    Browse the repository at this point in the history