Skip to content

[Payment due @ZhenjaHorbach] [Dynamic Forms] Deprecate Push Rows - #106984

Merged
grgia merged 16 commits into
Expensify:mainfrom
software-mansion-labs:dynamicform-dropdown-rows
Nov 23, 2026
Merged

grgia merged 16 commits into
Expensify:mainfrom
software-mansion-labs:dynamicform-dropdown-rows

Conversation

@WojtekBoman

@WojtekBoman WojtekBoman commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Renders DynamicForm select, country, currency and multiselect fields as the expense form's bordered dropdown rows instead of push rows. Moves ExpenseFieldRow/ExpenseFieldDropdown to shared DropdownFieldRow/DropdownField, adds dropdown adapters, popover pickers, and a full-page list fallback for no room or inside a modal.

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/700999
PROPOSAL:

Tests

  1. Go to Settings > Wallet > Add bank account and pick a country handled by Wise (e.g. United Kingdom)

  2. Continue to a page with a select field (e.g. account type) and a country field

  3. Verify that each field shows as a bordered row with the field name as placeholder, like the expense form's category row

  4. Press the select row and verify that a dropdown opens anchored to the row; pick an option and verify that it closes and the row shows the picked value

  5. Press the country row, type an ISO code (e.g. GB) into search and verify that the matching country is listed; pick it and verify that the row updates

  6. Verify that no errors appear in the JS console

  7. In the same flow, reach a page with a currency field (or an amount field with its currency)

  8. Press the currency row and verify that a dropdown opens with a searchable currency list; pick one and verify that the row shows it

  9. Reach a page with a multiselect field, press it, select two options, press Apply

  10. Verify that the row lists both picks, and that closing without Apply leaves the previous value

  11. Verify that no errors appear in the JS console

  12. On a narrow layout (mobile or a narrow browser window), open a page with a required select field

  13. Press Next without answering and verify that the row shows the error under it and gets focus

  14. Press the row and verify that the list opens (sheet, or a full page when there is no room) and picking a value clears the error

  15. In a list field (e.g. add an entry to a repeated section), press a select row inside the entry modal and verify that the list opens on a full page over the modal, not hidden behind it

  16. Expense form: create a manual expense and verify that the amount, description, category, tag and report rows still look and open as before

  17. Verify that no errors appear in the JS console

Offline tests

  1. Go offline (DevTools or device network off)
  2. Open a Wise bank account page you already reached online that has a select or country field
  3. Press the row, pick a value and verify that the dropdown works and the row updates while offline

QA Steps

Same as tests

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

@melvin-bot

melvin-bot Bot commented Nov 16, 2026

Copy link
Copy Markdown

Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers!

@WojtekBoman WojtekBoman changed the title Dynamicform dropdown rows [Dynamic Forms] Deprecate Push Rows Nov 16, 2026
@codecov

codecov Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/CONST/SENTRY_LABEL.ts 100.00% <ø> (ø)
src/components/AnchoredSelectionListPopover.tsx 100.00% <100.00%> (ø)
src/components/CurrencySelectionList/index.tsx 100.00% <100.00%> (ø)
src/components/DropdownField.tsx 100.00% <100.00%> (ø)
src/components/DropdownFieldRow.tsx 100.00% <100.00%> (ø)
...m/components/DynamicFormAddressCountryDropdown.tsx 100.00% <100.00%> (ø)
...orm/components/DynamicFormAddressStateDropdown.tsx 100.00% <100.00%> (ø)
...DynamicForm/components/DynamicFormFullPageList.tsx 100.00% <100.00%> (ø)
...mponents/DynamicForm/renderers/addressRenderer.tsx 100.00% <100.00%> (ø)
...mponents/DynamicForm/renderers/choiceRenderers.tsx 100.00% <100.00%> (ø)
... and 47 more
... and 10 files with indirect coverage changes

# Conflicts:
#	src/CONST/SENTRY_LABEL.ts
#	src/components/MoneyRequestConfirmationList/sections/AmountField.tsx
#	src/components/MoneyRequestConfirmationList/sections/DescriptionField.tsx
#	tests/unit/components/MoneyRequestConfirmationList/ReportFieldDropdownRow.test.tsx
@mikolajpochec

Copy link
Copy Markdown
Member

While checking the behavior of the new dropdown, I encountered a problem with resizing a window shown below:

1.Wallet.-.High.memory.usage.-.2.5.GB.-.Google.Chrome.Te.2026-11-17.at.16.03.10.mov

@mikolajpochec mikolajpochec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! Leaving a few comments

Comment on lines +49 to +61
const [searchValue, setSearchValue, matchingOptions, searchQuery] = useSearchResults(options, (option, searchInput) => {
if (option.searchValue === undefined) {
return tokenizedSearch([option], searchInput, () => [option.text]).length > 0;
}
// A query of only punctuation sanitizes to nothing and matches no option, as in the country selector
const sanitizedInput = StringUtils.sanitizeString(searchInput);
return !!sanitizedInput && option.searchValue.includes(sanitizedInput);
});

// An option whose own value was typed, such as the country code `US`, goes first, as the country selector lists it
const sanitizedQuery = StringUtils.sanitizeString(searchQuery);
const isTypedValue = (option: {value: string; searchValue?: string}) => option.searchValue !== undefined && !!sanitizedQuery && option.value.toLowerCase() === sanitizedQuery;
const filteredOptions = [...matchingOptions.filter(isTypedValue), ...matchingOptions.filter((option) => !isTypedValue(option))];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAB
Typing "bar" lists Antigua & Barbuda before Barbados, while the old country picker showed Barbados first. This list only moves an exact code match to the top, but searchOptions also ranks names that start with the query (and accents). countryMultiselect already uses searchOptions, so both country fields would sort the same.

Could we use searchOptions(searchQuery, options) when options have a searchValue?

Comment on lines +62 to +65
const applyValues = (appliedValues: string[]) => {
if (haveSameValues(appliedValues, offeredSelectedValues)) {
return;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAB
If a multiselect ever gets dependsOn (DynamicFormMultiChoiceField picks it from DynamicFormChoiceField), a held value that drops out of the options stays in the form. Applying without changes returns early here, so the hidden value is still submitted. This also contradicts the "applying drops it" comment in MultiValueSelectionList. No such field today (industryCategories has a fixed list), so fine to leave, just flagging for later.

* button, as the attendees row applies its selection. A field that asks the server for new requirements therefore asks
* once per Apply rather than once per checked option.
*/
function MultiChoiceDropdownAdapter({items, label, title, value, onInputChange, errorText = '', disabled = false, forwardedFSClass, ref}: MultiChoiceDropdownAdapterProps) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before: open a required multiselect, close it without picking anything, and the "required" error shows right away. Now the error shows only after pressing Submit. Is that on purpose?

@WojtekBoman

Copy link
Copy Markdown
Contributor Author

@grgia @joekaufmanexpensify @ZhenjaHorbach feel free to run adhoc builds on this PR and test it out, let me know what you think!

@grgia
grgia self-requested a review November 18, 2026 08:18
@WojtekBoman

Copy link
Copy Markdown
Contributor Author

While checking the behavior of the new dropdown, I encountered a problem with resizing a window shown below:

1.Wallet.-.High.memory.usage.-.2.5.GB.-.Google.Chrome.Te.2026-11-17.at.16.03.10.mov

Thanks for reporting this! I managed to reproduce this issue, but it seems to be present on main branch as well, so I think it would be good to fix it in a separate PR :)

includePaddingTop={false}
enableEdgeToEdgeBottomSafeAreaPadding
testID="DynamicFormFullPageList"
shouldEnableKeyboardAvoidingView={false}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment
We use shouldEnableKeyboardAvoidingView={false} here, while on main the multiselect's PushRowModal kept keyboard avoiding on
With a searchable multiselect on the full page, I suppose the keyboard covers the Apply footer on iOS

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! addressed

};

return (
<DynamicFormDropdownField

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add accessibilityLabel here also?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need here: without accessibilityLabel the row reads its own name and value, and the name is the field’s own label. The currency adapter takes one only because its label is the generic “Currency” next to an amount, so it adds which amount it belongs to.

label={label}
value={displayValue}
title={title}
errorText={errorText}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add accessibilityLabel here also?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above: the row already reads the field’s label and the picked options :)

Comment on lines +99 to +109
footerContent={
<Button
variant={CONST.BUTTON_VARIANT.SUCCESS}
onPress={applyValues}
size={CONST.BUTTON_SIZE.MEDIUM}
sentryLabel={applyButtonSentryLabel}
>
<Button.KeyboardShortcut />
<Button.Text>{translate('common.apply')}</Button.Text>
</Button>
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a phone with a home indicator, the Apply button on the full page list will probably sit right at the bottom edge of the screen, under the indicator. I have not checked this on a device.

The full page uses edge-to-edge mode, so the modal does not add the bottom inset, and the SelectionList footer does not add it by default either. Maybe this list could take an addBottomSafeAreaPadding prop, and renderFullPageList could pass it, like CurrencyDropdownAdapter already does?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, added addBottomSafeAreaPadding to MultiValueSelectionList and passed it from renderFullPageList in MultiChoiceDropdownAdapter.

Comment on lines +45 to +54
<ValueSelectionList
items={items}
selectedItem={selectedItem}
isVisible={isVisible}
onItemSelected={(item) => {
onItemSelected?.(item);
onClose();
}}
addBottomSafeAreaPadding={false}
/>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a phone, a field with 12 or more options will probably open its bottom sheet with the keyboard already up, so the keyboard covers most of the list. I have not checked this on a device.

ValueSelectionList, MultiValueSelectionList and CurrencySelectionList do not set disableAutoFocus, so the search input takes focus as soon as the list opens. The category, tag and tax popovers turn this off on touch screens with canFocusInputOnScreenFocus() (CategoryPicker/index.tsx:252). Could we do the same here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, added shouldAutoFocusSearchInput to the three lists, and the popovers pass canFocusInputOnScreenFocus() like the category/tag/tax pickers.

Comment on lines +3 to +7
/**
* Whether the fields render inside a modal, such as the list entry editor. A dropdown's container draws below every
* modal, so a dropdown inside one opens its list on a full page over the modal instead.
*/
const DynamicFormModalContext = createContext(false);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works today, but the next modal that shows form fields can easily get a dropdown that opens behind the modal. The user would press the row and see nothing, with no error and no failing test.

BaseModal already tells its children that they are inside a modal through ModalContext, and ScreenWrapperContainer reads it the same way. This second context needs a provider added by hand in every modal. Could we remove it and read !useContext(ModalContext).default in DynamicFormDropdownField instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, removed DynamicFormModalContext and the field now reads !useContext(ModalContext).default

@github-actions

Copy link
Copy Markdown
Contributor

🚧 joekaufmanexpensify has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

@WojtekBoman
WojtekBoman marked this pull request as ready for review November 18, 2026 15:27
@WojtekBoman
WojtekBoman requested review from a team as code owners November 18, 2026 15:27
@github-actions

This comment has been minimized.

@joekaufmanexpensify joekaufmanexpensify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working well for me 👍

@WojtekBoman

Copy link
Copy Markdown
Contributor Author

Also minor comment But when we press the back button to close the modal We close the modal, and then the keyboard

Screen.Recording.2026-11-19.at.12.51.14.mov
And here is an example of how it should work

Screen.Recording.2026-11-19.at.12.51.36.mov

This one has been addressed!

Screen.Recording.2026-11-20.at.11.56.02.mov

@grgia

grgia commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

@WojtekBoman could you send a list of which issues you fixed and which you plan to address as follow ups from the above thread

@grgia grgia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Let's track the follow ups / decisions made in this PR before merging

@github-actions

Copy link
Copy Markdown
Contributor

🚧 grgia has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

@WojtekBoman

Copy link
Copy Markdown
Contributor Author

Follow-ups

  • Move the dropdown components out of DynamicForm, pass Sentry labels as props, add a FORMS.md entry (comment, FORMS.md reminder)
  • Window resize glitch, also on main (comment)
  • Popup list width not updating when the window resizes, also on main (comment)
  • Android delay rendering list items in the category modal (comment)

@WojtekBoman

Copy link
Copy Markdown
Contributor Author

Also, an issue we can fix as a follow-up But we render elements with a delay after opening the category modal on Android

Screen.Recording.2026-11-19.at.13.07.37.mov

This also happens on main, e.g. the Report dropdown when creating an expense (video attached). It comes from how our list component renders its first rows, not from this PR :)

main-report-dropdown-android-slowmo-4x.mp4

@WojtekBoman

Copy link
Copy Markdown
Contributor Author

@grgia Here's the comment describing all followups that we should address after merging this PR :) I think we should be ready to go ahead with this one 🫡

@grgia
grgia merged commit 9e2864b into Expensify:main Nov 23, 2026
36 of 37 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚧 grgia has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

Copy link
Copy Markdown
Contributor

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/grgia in version: 9.5.53-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update needed — this PR changes existing form fields to dropdowns without introducing a new workflow, removing beta gating, or making any existing article sentence incorrect.


view run

@jponikarchuk

Copy link
Copy Markdown

This PR failing in offline mode because of the issue #107820
This issue is reproducible in: All platforms

@albertodege

Copy link
Copy Markdown

Deploy Blocker #107857 was identified to be related to this PR.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/arosiclair in version: 9.5.53-3 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

@WojtekBoman

Copy link
Copy Markdown
Contributor Author

Follow-ups update:

That covers all the follow-ups from this PR

cc: @grgia @ZhenjaHorbach

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.