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.
Why badgeColorStyle is used like a boolean here.
Why if badgeColorStylecolor 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 here the final screenshots |
|
@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 |
neonbhai
left a comment
There was a problem hiding this comment.
looks good! just some small changes
| shouldShowBorderBottom: boolean; | ||
|
|
||
| /** Is Error type */ | ||
| error?: boolean; |
There was a problem hiding this comment.
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.
| /** Whether we show the border bottom */ | ||
| shouldShowBorderBottom: boolean; | ||
|
|
||
| /** Is Error type */ |
There was a problem hiding this comment.
| /** 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 |
|
👋 @NikkiWines any chance you could take the secondary internal review on this PR? |
|
Sure, I'll review this today! |
Santhosh-Sellavel
left a comment
There was a problem hiding this comment.
LGTM, tests well, thanks everyone!
|
🚀 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 Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop