-
Notifications
You must be signed in to change notification settings - Fork 3k
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: Hold request style and visibility #38471
Conversation
@Santhosh-Sellavel 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] |
Can you share a couple of still screenshots of the scanning state and the hold state? I just want to double check that the banner styles look the same. Thanks! |
@shawnborton here's one |
Awesome. Can you try making the "Hold" text use the same text color as our danger/red buttons? Also cc @Expensify/design for vis... I think some of this stuff will eventually change when we update the next steps, but for now, I think this is worth getting alignment on. We could also consider updating both of these badges to use our new badge style that's in the app too? |
@shawnborton text color updated |
Nice, that looks good to me - thanks! |
I will try merging main again tomorrow to solve the perf test. |
@Santhosh-Sellavel All checks have passed |
const styles = useThemeStyles(); | ||
const borderBottomStyle = shouldShowBorderBottom ? styles.borderBottom : {}; | ||
const badgeBackgroundColorStyle = badgeColorStyle ?? styles.moneyRequestHeaderStatusBarBadgeBackground; | ||
const badgeTextColorStyle = badgeColorStyle ? styles.textMicroBoldDangerColor : styles.textMicroBoldColor; |
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.
Why badgeColorStyle
is used like a boolean here.
Why if badgeColorStyle
color exists text style should be styles.textMicroBoldDangerColor
?
As badgeColorStyle
could be anything.
Can you please refactor this properly?
I will refactor tomorrow |
@neonbhai Can you help here by reviewing this one. Complete the Reviewer checklist. |
@neonbhai refactor done |
From @JmillsExpensify in the original issue:
cc @danielrvidal since you commented about this in Slack |
Yeah, we should not show two labels at the same time! |
@shawnborton it's just a screenshot for you to check how it looks. I played with the code to display both. @Santhosh-Sellavel there's no two labels in the same time. |
Sounds good, thanks for confirming. Let us know when there are updated screenshots to check out and we can review from there. |
@shawnborton do you want to update this too? it's not related to hold request, but on the same other header for reports |
@Santhosh-Sellavel we will not need the component HoldBanner anymore. How to proceed? |
What updates were needed for this out of curiosity?
Can you elaborate some more - why is this not needed anymore? |
this one here #38471 (comment)
We use the same component for the 3 type of messages. The HOLD one, was using a the component HoldBanner. After we updated using badges, we don't need it, because it was for UI HOLD badge |
Cool, thanks for confirming! |
Reviewer Checklist
Screenshots/VideosMacOS: DesktopHeld.Desktop.movScanning.Desktop.mov |
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.
looks good! just some small changes
@@ -12,15 +13,22 @@ type MoneyRequestHeaderStatusBarProps = { | |||
|
|||
/** Whether we show the border bottom */ | |||
shouldShowBorderBottom: boolean; | |||
|
|||
/** Is Error type */ | |||
error?: boolean; |
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's name the new prop as danger
here since we are signalling a color change and no actual error has occurred or is being passed.
@@ -12,15 +13,22 @@ type MoneyRequestHeaderStatusBarProps = { | |||
|
|||
/** Whether we show the border bottom */ | |||
shouldShowBorderBottom: boolean; | |||
|
|||
/** Is Error type */ |
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.
/** Is Error type */ | |
/** Whether we should use the danger theme color */ |
Let's use the prop description from here
Updates done |
Friendly bump, let's please get this reviewed ASAP. I have a feeling this one is going to conflict with the updates @grgia is making to the pending/scanning requests though, right? |
@Santhosh-Sellavel all good, just need approval. @neonbhai missing screenshots |
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.
Looks good to me! 🚀
👋 @NikkiWines any chance you could take the secondary internal review on this PR? |
Sure, I'll review this today! |
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.
LGTM, tests well, thanks everyone!
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.
👍 looks good!
🚀 Deployed to staging by https://github.com/NikkiWines in version: 1.4.69-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.69-2 🚀
|
Details
Fixed Issues
$ #37536
PROPOSAL: #37536 (comment)
The winning proposals are:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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