Repository navigation
[Flat Nav R5.1c] Keep Search mounted when switching between Expenses and Reports #107108
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
Changes from all commits
f08d201
61dec00
e9e4aa4
04344da
aead264
c999619
c373093
153fb55
dc2eda9
5f0031e
b0ad0db
c7a2463
333940f
15a70c8
fdec84e
f08560f
7ed3375
48fa9f1
fffdb99
3ad6830
3ed159f
e4adc1b
49e1bf2
95fa196
b450baf
aab33f9
b6cb2ef
52e0284
26410a1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -134,3 +134,24 @@ | |
| - Upstream PR/issue: not reported yet. | ||
| - E/App issue: [#107266](https://github.com/Expensify/App/issues/107266) | ||
| - PR introducing patch: [#107282](https://github.com/Expensify/App/pull/107282) | ||
|
|
||
| ### [react-native-screens+4.28.0+012+tab-bar-item-order.patch](react-native-screens+4.28.0+012+tab-bar-item-order.patch) | ||
|
|
||
| - Reason: Android only. Adds a `tabBarItemOrder` prop to the tabs host: the screen keys in the order their items take in the tab bar. With the flat navigation beta, Expenses and Reports are two items over the one Search screen, and native shows the content of a tab only under its own item, so the tab that holds Search has to take the place of the item to highlight. Moving the tab in React replaces its fragment, which remounts Search. With this prop the React children keep their order, so no view is moved or recreated: the menu items are added in that order and, only when an order is given, the selected one is checked again after the menu is rebuilt. `TabsHostA11yCoordinator` paired tabs with menu items by index, so it now matches them by menu item id. A rebuilt menu has new item views: Material fades them in, React Native lays them out only on a later frame and Material sizes their active indicators later still, so once the update is done the patch ends that fade, lays the bar out and sizes the indicators itself. The rebuilt menu also selects its first item, so the place that was selected is selected again without an animation before the selected tab, and the indicator moves from there as it does on a tab switch. A tab that takes another place takes that item's icon in the same update, and a decode lands a few frames later, so the bitmaps of tab icons loaded before are kept and set right away. An empty or missing order keeps the order of the children, which is what every host gets without the beta. iOS does not use the order, see patch 014. | ||
| - Upstream PR/issue: not reported yet. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @MelvinBot can you create Weekly issue and assign @mountiny @sumo-slonik to report all the patches from the Flat nav prs upstream and track them being removed eventually
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Created Upstream dependency patches and track their removal, labeled Weekly and assigned to Includes an initial patch inventory and tracking for upstream reports, releases, and eventual patch removal. |
||
| - E/App issue: [#105631](https://github.com/Expensify/App/issues/105631) | ||
| - PR introducing patch: [#107108](https://github.com/Expensify/App/pull/107108) | ||
|
|
||
| ### [react-native-screens+4.28.0+013+ios-prevented-tab-selection-touches.patch](react-native-screens+4.28.0+013+ios-prevented-tab-selection-touches.patch) | ||
|
|
||
| - Reason: iOS only. The iOS 26 tab bar starts moving its liquid glass selection lens to an item on touch down, before it asks the delegate whether the tab can be selected. A tap on a tab with `preventNativeSelection`, such as the More item of the flat nav bar, pulled the lens to the item and let it spring back. A transparent view over each such item, placed in the tab bar controller's view rather than in the tab bar, takes the tap before the tab bar sees it and reports it the same way the prevented selection does. The views are kept between updates and only moved, since replacing one between touch down and touch up drops the tap. The views are made only for a screen with the new `interceptsPreventedSelectionTaps` prop, which the flat nav bar sets, so every other tab bar handles such taps as before. The selected tab keeps its taps, VoiceOver still activates the item through the tab bar, no view is made while the bar is hidden, and a tab bar without the private `_UITabButton` item views under it, such as the floating bar of a foldable iPhone, gets no such views. The item views are found by that class name, so if a later iOS renames the class, or their count stops matching the tabs, no view is made and the tab bar handles the taps itself as it did before this patch: only the lens moving to the item and back returns. | ||
| - Upstream PR/issue: not reported yet. | ||
| - E/App issue: [#105631](https://github.com/Expensify/App/issues/105631) | ||
| - PR introducing patch: [#107108](https://github.com/Expensify/App/pull/107108) | ||
|
|
||
| ### [react-native-screens+4.28.0+014+ios-tab-hosted-content.patch](react-native-screens+4.28.0+014+ios-tab-hosted-content.patch) | ||
|
|
||
| - Reason: iOS only. With the flat navigation beta, Expenses and Reports are two tab bar items over the one Search screen. React cannot move a mounted subtree to another parent, so drawing Search inside the tab of its section remounts it on every switch. Trading the places of the two tabs (patch 012) does not fit iOS: the same tab stays selected, so the iOS 26 selection lens jumps instead of gliding and the bar draws one frame with the items in the wrong order. A tab screen can now show the hosted content of another screen while it is selected: the `hostedContentSourceScreenKey` prop names that screen, and the child view with the `RNSTabsHostedContent` native ID is its hosted content. The view stays a React child of its own screen and only its native parent changes, in `shouldSelectViewController` and before a selection from JS, so the content is there when UIKit shows the tab and the bar animates its selection as for any other tab. The view controllers inside the view (a nested stack) move to the view controller of the other screen with it, because UIKit requires the parent of a view controller to match the place of its view. A snapshot of the content stays in the screen it leaves for 0.6 s, which covers UIKit's cross-fade, so that screen does not fade out empty; it is removed before the view goes back to that screen. Before React adds or removes a child of a screen whose content is shown elsewhere, the view goes back to it, and is placed again after the transaction; the transaction is looked at only while a view is shown elsewhere. Without the prop nothing is looked up or moved. | ||
| - Upstream PR/issue: not reported yet. | ||
| - E/App issue: [#105631](https://github.com/Expensify/App/issues/105631) | ||
| - PR introducing patch: [#107108](https://github.com/Expensify/App/pull/107108) | ||
Uh oh!
There was an error while loading. Please reload this page.