fix: Card details page title and toggle button spacing#91115
Open
samranahm wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the layout of ToggleSettingOptionRow (used across multiple settings screens, including the personal card details header menu) to improve spacing between the title/subtitle content and the trailing switch—especially in longer translations where wrapping occurs.
Changes:
- Increased top spacing for subtitles rendered below the switch (
mt1→mt3). - Added right margin to the default title container to create a consistent gap from the switch (
mr3). - Removed a conditional fixed-height constraint on the main row container when subtitles are placed below the switch.
Comments suppressed due to low confidence (2)
src/pages/workspace/workflows/ToggleSettingsOptionRow.tsx:199
- The new right margin (
styles.mr3) is only applied in the defaulttitlerendering path. WhencustomTitleis provided, there’s no equivalent spacing, so custom titles can still end up too close to the switch. Consider moving the margin/spacing to a shared container so it applies to bothtitleandcustomTitle.
{customTitle ?? (
<View style={[styles.flexColumn, styles.flex1, styles.mr3]}>
<Text
src/pages/workspace/workflows/ToggleSettingsOptionRow.tsx:239
- Removing the conditional
styles.h10means the row can shrink to the intrinsic height of its contents (e.g. ~28px for the switch), reducing the tappable area for the row whenshouldPlaceSubtitleBelowSwitchis true. If the fixed height was causing wrapping/clipping issues, consider using aminHeight(e.g.styles.mnh40) instead of removing the height constraint entirely.
<View style={[styles.flexRow, styles.alignItemsCenter, styles.justifyContentBetween]}>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
7 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Explanation of Change
Fixed Issues
$ #88234
PROPOSAL: #88234 (comment)
Tests
Offline tests
QA Steps
Same as test
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android.native.mp4
Android: mWeb Chrome
Android.mWeb.Chrome.mp4
iOS: Native
IOS.Native.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
macOS.Chrome.mp4
Need help on this PR? Tag
@codesmithwith what you need.