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

1/5 Avoid using transform scaleY or scaleX in inverted flatlist when TalkBack and enabledTalkbackCompatibleInvertedList prop are enabled #34141

Closed

Commits on Jul 6, 2022

  1. Configuration menu
    Copy the full SHA
    5b2cb47 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    06fb1dd View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2022

  1. draft

    fabOnReact committed Jul 8, 2022
    Configuration menu
    Copy the full SHA
    f72cac2 View commit details
    Browse the repository at this point in the history
  2. workaround scrollToEnd issues for inverted flatlist

    addresses issues explained in facebook#30373 (comment)
    
    handles cases when adding new item to inverted flatlist (flatlist has to
    scroll up to the new item)
    
    test cases
    facebook#30373 (comment)
    fabOnReact committed Jul 8, 2022
    Configuration menu
    Copy the full SHA
    e53aa54 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4c08d7c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    24c612c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6215dc9 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    85f3a42 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2022

  1. remove line fullScroll

    fabOnReact committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    389487b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    050a629 View commit details
    Browse the repository at this point in the history
  3. trigger scrollToEnd on not-nested flatlist

    removing this logic creates a regression in not-nested inverted flatlist
    fabOnReact committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    c43c832 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0eb74c6 View commit details
    Browse the repository at this point in the history
  5. fix circle ci errors

    fabOnReact committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    98bea1b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6271850 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2022

  1. fix delete item inverted flatlist scrollToEnd

    the code triggers a scrollUp to the end of the inverted flatlist, when
    we delete the item on top of the flatlist.
    fabOnReact committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    e640998 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c47a75a View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2022

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

Commits on Jul 15, 2022

  1. draft - when items are appended to the end of the list, the view need…

    …s to stay in the same position
    
    it works when _onScroll is triggered:
    - the user scroll the list
    - the bottomY state is updated
    - appending item to the list will not change position
    
    still does not work when the user appends a second item
    
    Related facebook#30373 (comment)
    Was implemented on a Javascript example above, which had similar issues
    - did not work if no scroll was triggered
    - did not work if triggering many times fast appends of items
    
    Reason for this issues needs to be investigated, but the solution only
    be for TalkBack users to avoid using transform
    fabOnReact committed Jul 15, 2022
    Configuration menu
    Copy the full SHA
    c281788 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2022

  1. Configuration menu
    Copy the full SHA
    acddd08 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    94d1246 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    543a9e4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d627812 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    87c88bd View commit details
    Browse the repository at this point in the history
  6. when items are appended to the end of the list, the view needs to sta…

    …y in the same position
    
    >when items are appended to the end of the list, the view needs to stay in the same position
    
    This functionality will be introduced with a separate PR with the
    following improvement
    (OPTIONAL) instead of using onScroll to save scroll x/y coordinates, use the screenreaderFocus
    facebook#30373 (comment)
    
    Related
    facebook#34141 (comment)
    fabOnReact committed Jul 18, 2022
    Configuration menu
    Copy the full SHA
    5e81716 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    509931d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f779f9d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0c75c4d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    8e58058 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6cb1dec View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    a506b51 View commit details
    Browse the repository at this point in the history
  13. run yarn test -u

    fabOnReact committed Jul 18, 2022
    Configuration menu
    Copy the full SHA
    f9b64bd View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    3cfe035 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2022

  1. Configuration menu
    Copy the full SHA
    c163c54 View commit details
    Browse the repository at this point in the history
  2. when items appended, view stays in same position

    when items are appended to the end of the list, the view needs to stay in the same position
    was removed with 5e81716
    
    (OPTIONAL) instead of using onScroll to save scroll x/y coordinates, use the screenreaderFocus
    fabOnReact committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    adff29f View commit details
    Browse the repository at this point in the history
  3. draft - TalkBack onEndReached scroll Position

    when items are appended to the end of the list, the view needs to stay in the same position
    keep a constant scroll position after triggering onEndReached
    to be used only with inverted FlatList and TalkBack
    
    TalkBack user scroll flatlist in different ways then normal users
    - onMomentumScrollEnd/Begin and other callbacks dont trigger
    - onScroll will trigger 10 times per page scroll (aproximately)
    This logic is meant to keep the same position when scrolling on top of
    the Inverted FlatList, when more items are appended (infinite loading)
    fabOnReact committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    88c68b2 View commit details
    Browse the repository at this point in the history
  4. fix onEndReached callback triggering multiple times

    TalkBack Inverted FlastList uses a custom onEndReached callback
    
    The below check does not work in the TalkBack Inverted Flastlist
    
    >Only call onEndReached once for a given content length
    ```javascript
    this._sentEndForContentLength = this._scrollMetrics.contentLength;
    ```
    
    because we are scrolling up to Y = 0 and detect Y = 0 to trigged
    onEndReached
    
    while the default functionality scrolls Up in visually inverted flatlist
      to Y = contentHeight
    fabOnReact committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    9bdaa47 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    36e0ace View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0d1cf47 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2022

  1. Configuration menu
    Copy the full SHA
    f670f19 View commit details
    Browse the repository at this point in the history
  2. fix scrollTo bottom/top when scolling fast down

    Disabled with TalkBack inverted FlatList Triggers a scrollTo bottom and subsequent top when scrolling down
    fast, documented in facebook#34141 (comment)
    fabOnReact committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    193e9f4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ffe959e View commit details
    Browse the repository at this point in the history
  4. remove setTimeout when calling scrollToOffset

    the timeout was introduced with commit
    facebook@88c68b2
    
    The Motivation was:
    talkback inverted flatlist, height is used to compute an inverted flatlist contentLength from the bottom of the screen setTimeout is required as animated false will not work.
    
    The real cause was conflict with another scrollToOffset called here
    https://github.com/facebook/react-native/blob/ffe959efb09028fc18a9385d0c6161125232e7bc/Libraries/Lists/VirtualizedList.js#L1692-L1705
    
    adding the check this._hasTriggeredInitialScrollToIndex fixes the issue
    fabOnReact committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    f2768ab View commit details
    Browse the repository at this point in the history
  5. onMomentumScrollEnd does not work with talkback

    Previous commit facebook@88c68b2
    when items are appended to the end of the list, the view needs to stay in the same position
    keep a constant scroll position after triggering onEndReached
    to be used only with inverted FlatList and TalkBack
    
    TalkBack user scroll flatlist in different ways then normal users
    - onMomentumScrollEnd/Begin and other callbacks dont trigger
    - onScroll will trigger 10 times per page scroll (aproximately)
    This logic is meant to keep the same position when scrolling on top of
    the Inverted FlatList, when more items are appended (infinite loading)
    
    onMomentumScrollToEnd requires TalkBack implementation of event TYPE_VIEW_SCROLLED
    facebook#34141 (comment)
    
    this is a quick fix that could be replaced in my future PR when I
    implemented onMomentumScrollToEnd for TalkBack
    fabOnReact committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    0912944 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3843514 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b4abedd View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3b6fe66 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    880fd80 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    72aaa2b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    079fbfa View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    a3b8e1c View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    4b4c7a5 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    3df9a90 View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2022

  1. Configuration menu
    Copy the full SHA
    dfef050 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    239d31d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    891c4f1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6451aab View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9cbc554 View commit details
    Browse the repository at this point in the history
  6. rename variables

    fabOnReact committed Jul 21, 2022
    Configuration menu
    Copy the full SHA
    7b307d5 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a4ef645 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c41e1c8 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3d2067c View commit details
    Browse the repository at this point in the history
  10. minor changes

    fabOnReact committed Jul 21, 2022
    Configuration menu
    Copy the full SHA
    9d89b60 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    c3c2a1b View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    405d9fc View commit details
    Browse the repository at this point in the history
  13. improving conditions to enable functionality

    most important, the functionality is disabled if initialScrollIndex is
    passed, because not yet compatible with initialScrollIndex.
    
    I can add compatibility with initialScrollIndex in the next PR. It is
    easy to introduce.
    fabOnReact committed Jul 21, 2022
    Configuration menu
    Copy the full SHA
    9a894e9 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    e9f9715 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    b0d2521 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    c96f635 View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2022

  1. Configuration menu
    Copy the full SHA
    879c93f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bf78345 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2022

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

Commits on Jul 28, 2022

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

Commits on Jul 29, 2022

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

Commits on Aug 3, 2022

  1. Configuration menu
    Copy the full SHA
    6214e29 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d5c845e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    436fbed View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c7b2200 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    93e4e88 View commit details
    Browse the repository at this point in the history
  6. minor changes

    fabOnReact committed Aug 3, 2022
    Configuration menu
    Copy the full SHA
    ce9b0aa View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    48b4a4b View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2022

  1. Configuration menu
    Copy the full SHA
    a8640c3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5f7dbc6 View commit details
    Browse the repository at this point in the history
  3. VirList circleci errors

    fabOnReact committed Aug 4, 2022
    Configuration menu
    Copy the full SHA
    ceddbcd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4e7bb10 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a903479 View commit details
    Browse the repository at this point in the history
  6. minor changes

    fabOnReact committed Aug 4, 2022
    Configuration menu
    Copy the full SHA
    9943970 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2022

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

Commits on Sep 14, 2022

  1. draft example

    fabOnReact committed Sep 14, 2022
    Configuration menu
    Copy the full SHA
    c7d0d22 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b5ff683 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2022

  1. Configuration menu
    Copy the full SHA
    4266625 View commit details
    Browse the repository at this point in the history
  2. adding column-reverse to FlatList contentContainerStyle and style

    I designed a solution for the scenario reported by Samuel Susla.
    The existing inverted FlatList implementation would visually invert the FlatList using scaleY -1.
    For example, if a WhatApp chat thread had only a single message, the message would show at the bottom of the page.
    Visually inverting it would correctly handle this scenario and may have been one of the reasons to use scaleY.
    
    The ScrollView consists of two different components on Android:
    The NativeDirectionalScrollView is backed on Android by the ReactScrollViewManager and the ReactScrollView widget.
    The ReactScrollViewManager manages the ReactScrollView android widget, setting properties like pagingEnabled and adding the content passed with props.children (views, text, images displayed inside the ScrollView).
    The NativeDirectionalScrollView clips and scrolls the content included in the ScrollView.
    The FlatList style prop is applied to the NativeDirectionalScrollView component, the parent component that clips and scrolls the child content.
    The onScroll events are triggered with touch gestures in the Android ReactScrollView and delegated to the javascript ScrollView component, which handles scrolling in JavaScript.
    The contentContainer is children of NativeDirectionalScrollView and corresponds to the content rendered inside NativeDirectionalScrollView (views, text, images, and other content).
    The contentContainer includes the content to be scrolled and is styled with the contentContainerStyle.
    The contentContainerStyle accepts style options like flex, flexDirection, justifyContent, and alignItems, while flex and other properties cause issues with the NativeDirectionalScrollView style.
    The NativeDirectionalScrollView uses position or other styles to scroll and clip the underlying content, NativeDirectionalScrollView scaleX and scaleY do not cause issues with scrolling.
    
    The solution (example available here) for the issue is to handle this specific scenario with TalkBack on Android without transform scaleX, which causes accessibility issues on Android.
    Detecting when TalkBack is enabled on Android
    Apply the style (position: relative) if the content height does not exceed ScrollView height.
    An example of the implementation is available in the PR. I will add the required changes to VirtualizedList on Thursday 15th, of September.
    fabOnReact committed Sep 15, 2022
    Configuration menu
    Copy the full SHA
    496cc49 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2022

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

Commits on Sep 20, 2022

  1. WIP - column-reverse, handle short list, fix issues

    Work in Progress
    Summary:
    - use column-reverse instead of reversing order of items
    - handle short list (3 items) using column-reverse. see facebook#34141 (comment)
    - fix regression with the initial index position (inverted list needs to
      start from the last index instead of the first index)
    
    More Info
    
    "Adapt current solution to use column-reverse instead of position relative:
    Remove logic that inverts the order of the list
    Add column-reverse logic to style and contentContainerStyle
    Test logic disabled when adding more items to FlatList"	Sep 15 2:01 PM
    
    "Implement the solution in VirtualizedList
    Apply column-reverse style depending on the contentHeight (scrollEnabled and talkbackStyle)
    Review changes"	Sep 15 6:50 PM
    
    "Review diff
    Reintroduce example from commit
    Test other scenarios (infinite list, scrollToTop, horizontal flatlist)"	Sep 19 10:59 AM
    
    "Column-reverse introduced several regressions with infinite list and other scenarios:
    
    Expected: https://user-images.githubusercontent.com/24992535/191270491-4abfc24d-84b7-4b44-93ca-9e9adee8b0df.png
    Actual: https://user-images.githubusercontent.com/24992535/191270513-34573184-04c9-4f90-abef-9ea1fdf199df.png
    
    The inverted flatlist does not start at the bottom
    scrollTo a specific index works correctly with column-reverse:
    Understand reason _lastOffsetFromBottomOfScreen is null. Debug _maybeCallOnEndReached which is responsible for setting the value of _lastOffsetFromBottomOfScreen.
The value of lastOffset is used to scroll to the bottom, but the value of lastOffset is not set before calling _onContentSizeChanged
    The previous issue is caused by triggering onEndReached when loading the FlatList. The FlatList should only render 10 items, but while adding the items to the FlatList, scroll to the top triggers to add 3 more items (11, 12, 13th).
    Comment logic adding additional items when scrolling to the top in the inverted-flatlist example.
    Fix the condition in the example and avoid adding new items when FlatList is loading.
    The following regression was introduced after removing the logic to add more items to the flatlist onEndReached (infinite list).
The FlatList displays a blank screen after loading for the first time. The issue is caused by column-reverse adding 1 additional page to the flatlist. The FlatList starts scrolled to the last page (an empty page), and the last page consists of an empty screen.
After scrolling to the top, the BlankScreen disappears.
The pages are not aligned correctly. The first page displays items 5 to 10; the second page displays an empty page. The correct behavior would be:
- Page 1 => items 5 to 10
- Page 2 => Items 1 to 5 => Start Position here (inverted)
The issue reproduces in the previous example after removing onLayout and onContentSizeChange.
    The infinite list does not keep scroll position when scrolling up."	Sep 19 11:56 AM
    
    "The FlatList displays a blank screen after loading for the first time.
The issue is caused by not verifying that contentLength and visibleLength are not undefined.
    Understand the reason onLayout and onContentSizeChange trigger the issue in the content position
    Debug the value of contentLength and visibleLength"	Sep 19 4:11 PM
    
    "Rewrite inversion style logic:
    Add the logic from the flatlist inverted example to VirtList#scrollProps.
    Avoid updates when contentLength and visibleLength are undefined."	Sep 20 12:49 PM
    
    "Removing onLayout and onContentSizeChanged from the flatlist-inverted example triggers a regression. Items are displayed upside down. The inversionStyle scaleY: -1 is applied when TalkBack is enabled. The inversionStyle is applied on the Cell, but not the FlatList.
    Verify that the inversionStyle applied on the Cell is causing the issue.
    The issue was caused by adding inversionStyle to FlatList style when contentLength/visibileLength was undefined.
Solved by adding a condition that changes style to flexDirection: “column”"	Sep 20 1:47 PM
    
    "FlatList inverted does not start scrolled to the bottom (expected, actual) when TalkBack is enabled.
    Find the reason scrollTo is not triggered.
scrollToOffset is called onContentSizeChanged. The scrollTo is calculated using _lastOffsetFromBottomOfScreen, which is undefined. _lastOffsetFromBottomOfScreen is computed when the end of the page is reached (maybeCallOnEndReached).
    Understand why maybeCallOnEndReached does not update _lastOffsetFromBottomOfScreen.
The logic inside onContentSizeChanged is responsible for keeping the scroll position in an infinite list. The current behavior is correct; _lastOffsetFromBottomOfScreen is not updated because of the missing onEndReached callback.
    Find logic responsible for triggering scrollTo bottom of the list after the first render and understand the root cause of the issue.
    Review diff with the main branch.
    _hasTriggeredInitialScrollToIndex is true. An initial scroll to an index was triggered with a different _scrollMetrics.contentLength. The FlatList scrolls down 1 page instead of 3 pages."	Sep 20 2:24 PM
    
    "Implement the below solution to handle long lists that may trigger multiple onContentSizeChanged when loading for the first time. The current behavior is that the flatlist starts not scrolled to the end (for ex. Page 3/3), instead is scrolled at Page 2/3:
    save the last _scrollMetrics.contentLength
    save the last item in the list (the first one in an inverted list)
    if the contentLength changes and the lastItem does not change, trigger the scroll to the bottom
    Review existing solution
- review the diff
- try to prepend items
    Adding logic to avoid issues with multiple scrollTo animations with TalkBack. onMomentumScrollEnd and other ScrollView APIs are not compatible with the TalkBack gestures "	Sep 20 9:12 PM
    fabOnReact committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    f43ac61 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    777e282 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2022

  1. Configuration menu
    Copy the full SHA
    6e3aff2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aaada22 View commit details
    Browse the repository at this point in the history
  3. The infinite list does not work when TalkBack is enabled

    Expected: https://www.icloud.com/iclouddrive/020_5sOmaZKhm7-U7SACypf_w#infinite_list_working_without_talkback
    Actual: https://www.icloud.com/iclouddrive/0f7d5Udp1AjPbFgldIxrmmA6w#infinite_list_not_working_with_talkback
    
    - Callback _maybeCallOnEndReached is triggered
    - Callback onEndReached is not triggered with TalkBack enabled.
    
    Task: Debug _maybeCallOnEndReached and understand reason onEndReached is not triggered with TalkBack
    Solution: The issue was caused by missing _hasTriggeredInitialScrollToIndex = true at the initial scroll to bottom.
    fabOnReact committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    5546b72 View commit details
    Browse the repository at this point in the history
  4. vertical and horizontal infinite list

    Tasks:
    1) Test functionality with the infinite list (commit b3050bd)"
    Example from b3050bd
    
    2) The infinite list does not work when TalkBack is enabled (expected, actual):
    
    Expected: https://www.icloud.com/iclouddrive/020_5sOmaZKhm7-U7SACypf_w#infinite_list_working_without_talkback
    Actual: https://www.icloud.com/iclouddrive/0f7d5Udp1AjPbFgldIxrmmA6w#infinite_list_not_working_with_talkback
    TalkBack Test Case after the fix: https://www.icloud.com/iclouddrive/064T0QQSHLVsBx68Bf03NClrQ#infinite_list_working_with_talkback
    
    - Callback _maybeCallOnEndReached is triggered
    - Callback onEndReached is not triggered with TalkBack enabled.
    - Debug _maybeCallOnEndReached and understand reason onEndReached is not triggered with TalkBack
    
    The issue was caused by missing _hasTriggeredInitialScrollToIndex = true at the initial scroll to bottom (talkback test case after fix).
    
    3) Test horizontal list
    
    Test Infinite List with Horizontal FlatList https://www.icloud.com/iclouddrive/0fexoaRsobWIbHJARVGHtqv3w#horizontal_flatlist_infinite_scroll_with_talkback
    
    - Commit vertical example in flatlist-inverted
    - Add a test case of horizontal flatlist
    - Add style row-reverse for horizontal FlatList
    - Test infinite list, scrollTo index, append/prepend item
    - Save Video recording (infinite list with horizontal flatlist)
    fabOnReact committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    0a588d5 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2022

  1. Configuration menu
    Copy the full SHA
    ed87a1c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ba904fb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b4ef1a3 View commit details
    Browse the repository at this point in the history
  4. minor changes

    fabOnReact committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    3b4ca19 View commit details
    Browse the repository at this point in the history
  5. minor changes

    fabOnReact committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    8f1a234 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2022

  1. Revert "trigger initial scroll position in Java"

    This reverts commit ed87a1c.
    fabOnReact committed Sep 26, 2022
    Configuration menu
    Copy the full SHA
    ffe5c81 View commit details
    Browse the repository at this point in the history
  2. remove platform checks

    fabOnReact committed Sep 26, 2022
    Configuration menu
    Copy the full SHA
    0064acc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    82768f7 View commit details
    Browse the repository at this point in the history
  4. adapting facebook#26444 to solve issue facebook#30373

    - Import improvements from PR facebook#26444 _maybeCallOnEndReached:
    https://github.com/facebook/react-native/pull/26444/files#diff-7481ec8ed5532798b075df637e805a8e439807aa2ce671208c24068c286361e8L1374-R1413
    https://github.com/facebook/react-native/blob/2d3f6ca9801ef92b446458a2efc795db4ec17021/Libraries/Lists/VirtualizedList.js#L1372-L1414
    - Additional check _hasDoneFirstScroll for maybeCallOnEndReached (added in onScroll callback)
    - Add improved logic start/endPositionReached and isScrollingForward
    - Add threeshold instead of 2
    - Use default threeshold 30 for iOS
    - Add other improvements from method _maybeCallOnEndReached
    fabOnReact committed Sep 26, 2022
    Configuration menu
    Copy the full SHA
    3242de0 View commit details
    Browse the repository at this point in the history
  5. Revert "Revert "trigger initial scroll position in Java""

    This reverts commit ffe5c81.
    fabOnReact committed Sep 26, 2022
    Configuration menu
    Copy the full SHA
    0617ce4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    36776e9 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b3b3096 View commit details
    Browse the repository at this point in the history
  8. move onEndReached logic for inverted list to example

    moving onEndReached logic for inverted infinite list with TalkBack
    enabled to rn-tester example.
    
    To add in upcoming PR
    
    Notes of tasks done with this and previous commits:
    
    - Import improvements from PR facebook#26444 _maybeCallOnEndReached:
    https://github.com/facebook/react-native/pull/26444/files#diff-7481ec8ed5532798b075df637e805a8e439807aa2ce671208c24068c286361e8L1374-R1413
    https://github.com/facebook/react-native/blob/2d3f6ca9801ef92b446458a2efc795db4ec17021/Libraries/Lists/VirtualizedList.js#L1372-L1414
    
    - Additional check _hasDoneFirstScroll for maybeCallOnEndReached (added in onScroll callback)
    - Add improved logic start/endPositionReached and isScrollingForward
    - Add threeshold instead of 2
    - Use default threeshold 30 for iOS
    - Add other improvements from method _maybeCallOnEndReached
    
    - Complete improvements required for iOS and Android:
    - Test iOS solution onEndReached correctly works with an infinite list
    - Test Android Solution onEndReached correctly works and list starts from the end
    - Try to remove setTimeout and test if bug is reintroduced
    - On Android re-introduce java logic to start the list from the bottom
    - On iOS use initialScrollIndex={0} with inverted flatlist and VoiceOver
    
    - Code review:
    - Test setEnabledTalkbackCompatibleInvertedList
    - Remove check on lastItem
    - Remove setTimeout
Try to add more of the logic from _maybeCallOnEndReached as it may be the cause of the issue
_maybeOnCallReached could be causing the flatlist to scroll in the opposite direction later .. check if the callback is called after the scrollTo
    - Review Diff
    fabOnReact committed Sep 26, 2022
    Configuration menu
    Copy the full SHA
    4cf5c16 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2022

  1. review Java functionalities

    Try to change the scroll position onScrollChange with a fixed value of 300 in Java:
    - Add call to scrollTo(300) in onLayoutChange
    - Change the value of accessibilityCompatability prop in the component to trigger this change
    - When you add more items, the scroll position moves at y=300 instead of scrolling up"
    
    Native android prop initialScrollOffset, scrollOffset
    - Pass a prop from javascript scrollOffset (_offsetFromBottomOfScreen)
    - Test the functionality and troubleshoot
    - Improve example to call onEndReached only one time
    - Add contentOffset to example
    
    Code Review Java Functionalities:
    - Remove java logic mEnabledTalkbackCompatibleInvertedList
    - Review java logic for scrollOffset
    fabOnReact committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    b708ed9 View commit details
    Browse the repository at this point in the history
  2. Code Review JavaScript Functionalities

    - Try to remove setTimeout from the example (video test case)
    - Review diff from Libraries
    - Review diff from Example
    
    Video test case: https://www.icloud.com/iclouddrive/03bqBiQx3C2oEfHLTiDt8etRA#test_talkback_infinite_list_after_moving_outside_of_reactnative
    fabOnReact committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    8abdfb7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5919a6e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    036f088 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7206a4d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6690eeb View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e18ac41 View commit details
    Browse the repository at this point in the history
  8. fix flow errors circleci

    fabOnReact committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    8c8e68e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    099b806 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    66be76f View commit details
    Browse the repository at this point in the history
  11. inverted flatlist start from the end

    - Make sure flatlist start from the end by default when using the functionality
    - remove state contentLength and visibleLength, as already included in
      this._scrollMetrics
    fabOnReact committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    81e6116 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    8a1df99 View commit details
    Browse the repository at this point in the history
  13. re-enable _scheduleCellsToRenderUpdate for TalkBack

    Reversed commit 193e9f4
    
    The original issue facebook#34141 (comment) does not reproduce anymore
    fabOnReact committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    7f543e6 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    9202414 View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2022

  1. eslint fix check

    fabOnReact committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    9b141b9 View commit details
    Browse the repository at this point in the history
  2. minor fix to example

    fabOnReact committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    10056e4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a93d8c1 View commit details
    Browse the repository at this point in the history
  4. move variable declaration

    fabOnReact committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    1106350 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    223da5d View commit details
    Browse the repository at this point in the history
  6. move contentOffset to rn-tester example

    the logic with contentOffset does not properly work and requires future
    functionalities to detect different edge case. Will be part of the next
    PR
    
    Reintroduce changes from facebook@e18ac41 in VirtList
    fabOnReact committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    6bb091c View commit details
    Browse the repository at this point in the history
  7. fix circleci

    fabOnReact committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    7ee21a5 View commit details
    Browse the repository at this point in the history
  8. fix circleci

    fabOnReact committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    94db868 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    80d2343 View commit details
    Browse the repository at this point in the history