Repository navigation
MenuItem decomposition - section rows
#101594
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
Merged
roryabraham
merged 22 commits into
Expensify:main
from
software-mansion-labs:war-in/menuitem-decomposition-section
Sep 25, 2026
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
b8bfde2
feat: add `MenuItemSectionRow` preset and migrate section rows
war-in 64863dc
Merge branch 'main' into war-in/menuitem-decomposition-section
war-in 5935732
refactor: migrate to MenuItemSectionRow
war-in 19fbbb4
Merge branch 'main' into war-in/menuitem-decomposition-section
war-in 190c193
refactor: migrate to MenuItemSectionRow component
war-in 8a681dd
test: update mock
war-in c9a5af7
refactor: migrate SamlConfigurationDetailsSectionContent to MenuItem …
war-in 58606fd
fix: lint
war-in 93ac719
refactor: migrate to MenuItemSectionRow
war-in 61a4075
Merge branch 'main' into war-in/menuitem-decomposition-section
war-in 3ad68e6
refactor: use `MenuItemField.Row`
war-in 72d5650
Merge branch 'main' into war-in/menuitem-decomposition-section
war-in 3bd30f5
fix: remove unused MenuItemSectionRowProps export and apply Oxfmt
war-in 64a78b2
chore: add comparison
war-in 7f01c57
chore: improve comment
war-in 52a6d93
fix: improve function names
war-in 78f238e
Merge branch 'main' into war-in/menuitem-decomposition-section
war-in cf9870a
refactor: migrate QBO & Xero to composable MenuItem
war-in 7f3f9ca
refactor: migrate workflow approver to composable MenuItem
war-in 7eac018
Merge branch 'main' into war-in/menuitem-decomposition-section
war-in e2fe61f
refactor: rename MenuItemSectionRow.tsx to MenuItemSectionRoot.tsx
war-in b02d828
test: fix after migration
war-in File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| import MenuItemRoot from '@components/MenuItem/layout/MenuItemRoot'; | ||
| import type {MenuItemRootProps} from '@components/MenuItem/layout/MenuItemRoot'; | ||
|
|
||
| import useResponsiveLayout from '@hooks/useResponsiveLayout'; | ||
| import useThemeStyles from '@hooks/useThemeStyles'; | ||
|
|
||
| import type {RefObject} from 'react'; | ||
|
|
||
| import React from 'react'; | ||
| import {View} from 'react-native'; | ||
|
|
||
| type MenuItemSectionRootProps = MenuItemRootProps & { | ||
| /** Ref to the bleed wrapper. Use it when a popover needs to anchor on the row. */ | ||
| ref?: RefObject<View | null>; | ||
| }; | ||
|
|
||
| /** A `MenuItem.Root` that spans the full width of a `Section`, ignoring the section's own horizontal padding */ | ||
| function MenuItemSectionRoot({children, onPress, isDisabled = false, sentryLabel, testID, accessibilityLabel, ref}: MenuItemSectionRootProps) { | ||
| const styles = useThemeStyles(); | ||
| const {shouldUseNarrowLayout} = useResponsiveLayout(); | ||
|
|
||
| return ( | ||
| <View | ||
| ref={ref} | ||
| style={shouldUseNarrowLayout ? styles.mhn5 : styles.mhn8} | ||
| > | ||
| <MenuItemRoot | ||
| onPress={onPress} | ||
| isDisabled={isDisabled} | ||
| sentryLabel={sentryLabel} | ||
| testID={testID} | ||
| accessibilityLabel={accessibilityLabel} | ||
| > | ||
| <View style={!shouldUseNarrowLayout && styles.ph3}>{children}</View> | ||
| </MenuItemRoot> | ||
| </View> | ||
| ); | ||
| } | ||
|
|
||
| export default MenuItemSectionRoot; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.