-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix: claim offer banner in concierge page is not centered #61688
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
fix: claim offer banner in concierge page is not centered #61688
Conversation
@hungvu193 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
On it |
Please complete screenshots for all the platform @samranahm |
@@ -82,7 +82,7 @@ function EarlyDiscountBanner({isSubscriptionPage, GuideBookingButton, onboarding | |||
const smallScreenStyle = shouldUseNarrowLayout ? [styles.flex0, styles.flexBasis100, styles.justifyContentCenter] : []; | |||
return ( | |||
<View style={[styles.flexRow, styles.gap2, smallScreenStyle, styles.alignItemsCenter]}> | |||
<View style={[shouldUseNarrowLayout && styles.w50]}>{onboardingHelpDropdownButton}</View> | |||
{!!onboardingHelpDropdownButton && <View style={[styles.w50]}>{onboardingHelpDropdownButton}</View>} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really curious about styles.w50
here. If there's case 3 buttons appear at the same time then we'll have broken UI again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use flex layout solution here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me take a look
@@ -82,7 +82,7 @@ function EarlyDiscountBanner({isSubscriptionPage, GuideBookingButton, onboarding | |||
const smallScreenStyle = shouldUseNarrowLayout ? [styles.flex0, styles.flexBasis100, styles.justifyContentCenter] : []; | |||
return ( | |||
<View style={[styles.flexRow, styles.gap2, smallScreenStyle, styles.alignItemsCenter]}> | |||
<View style={[shouldUseNarrowLayout && styles.w50]}>{onboardingHelpDropdownButton}</View> | |||
{!!onboardingHelpDropdownButton && <View style={[styles.w50]}>{onboardingHelpDropdownButton}</View>} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use flex layout solution here?
@hungvu193 I don't think we should have a condition where we display all three buttons in So to cater the case where we want to display three buttons we can adjust this condition @Expensify/design |
Is there any issue with using flex layout here? Both guideButton and claim offer button are using flex. |
@hungvu193 Using flex layout make the Onboarding help button bit larger than claim offer is this expected ![]() |
We previously used Flex layout for all the buttons. But it had an issue with Spanish language when the text is too long. If we use
|
Ahh, It make sense. Thanks for pointing this out. |
We still need the confirmation from Design team |
Alright, lets wait for design team if they decided to make any change we will proceed with that. |
Little bump @Expensify/design to give your thoughts on this: |
3ff31a5
to
f2b8304
Compare
Looks like this was closed but the version for "With flexShrink: 1, flexGrow: 1, flexBasis: 'auto'" was definitely feeling better to me. |
@samranahm I think you closed this by accident right? |
I am planing to open to open a new PR that will link to our issue not the blocker, and i will use the |
Please link the blocker. Thanks |
Explanation of Change
We were passing
onboardingHelpDropdownButton
toEarlyDiscountBanner
even when no button available now we will explicitly checkshouldShowOnBoardingHelpDropdownButton
and in case of false Claim offer will take full space in bannerFixed Issues
$ #61662
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectioncanBeMissing
param foruseOnyx
toggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop