-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 crash when opening a split bill preview on an #announce room #31291
Fix crash when opening a split bill preview on an #announce room #31291
Conversation
@mananjadhav 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] |
@@ -66,6 +66,7 @@ const propTypes = { | |||
const defaultProps = { | |||
personalDetails: {}, | |||
reportActions: {}, | |||
transaction: {}, |
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 decided to use the alternate solution as this also fix the prop types console error.
@bernhardoj I was wondering if instead of Not found page we should just avoid making the skeleton clickable? @grgia What do you think? web-split-bill-preview-crash.movand btw for some reason the skeleton view doesn't transition into the split bill view. All I see is the skeleton view, are you seeing this problem? |
@mananjadhav yes, I see that problem too which I also mentioned in the proposal. Looks like that issue only happens on workspace chat. |
@bernhardoj Yeah I am able to reproduce this on staging as well. Is the bug reported anywhere? If not then can you please report this in the issue/slack, we'll have to fix that. |
Reviewer Checklist
Screenshots/VideosAndroid: Native**Revised** https://github.com/Expensify/App/assets/3069065/5d86eacc-5dfc-412f-9181-8116d187786bOld video Android: mWeb ChromeRevised Old video iOS: NativeRevised Old video iOS: mWeb SafariRevised Old video MacOS: Chrome / SafariRevised Old video MacOS: DesktopRevised Old video |
I agree that making it not clickable feels better than seeing "page not found" while loading @mananjadhav |
@mananjadhav Updated the code to disable the IOU preview. |
return ( | ||
<PressableWithFeedback | ||
onPress={props.onPreviewPressed} | ||
onPress={shouldDisableOnPress ? undefined : props.onPreviewPressed} |
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.
We need to manually disable it by passing an undefined onPress because if we use disabled
props, onLongPress
will also not work and therefore long pressing an IOU preview (on a mobile screen) won't show a context menu.
onPressIn={() => DeviceCapabilities.canUseTouchScreen() && ControlSelection.block()} | ||
onPressOut={() => ControlSelection.unblock()} | ||
onLongPress={showContextMenu} | ||
accessibilityLabel={props.isBillSplit ? props.translate('iou.split') : props.translate('iou.cash')} | ||
accessibilityHint={CurrencyUtils.convertToDisplayString(requestAmount, requestCurrency)} | ||
style={[styles.moneyRequestPreviewBox, ...props.containerStyles]} | ||
style={[styles.moneyRequestPreviewBox, ...props.containerStyles, shouldDisableOnPress && styles.cursorDefault]} |
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 know if we should use default or not-allowed cursor
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 think default, since that's what we do for our other skeleton UI cc @mananjadhav
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.
Completed the checklist baed on the updated code and disable pressed status.
@grgia All yours.
quick bump @grgia. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/grgia in version: 1.4.4-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.4-3 🚀
|
Details
On an #announce room, when we do a split bill and log in on other devices, the split bill preview will be in loading and show a skeleton. When we press it, the app will crash as the page expected the transaction data is ready.
Fixed Issues
$ #31136
PROPOSAL: #31136 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
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 methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Screen.Recording.2023-11-14.at.14.14.56.mov
Android: mWeb Chrome
Screen.Recording.2023-11-14.at.14.12.30.mov
iOS: Native
Screen.Recording.2023-11-14.at.14.13.31.mov
iOS: mWeb Safari
Screen.Recording.2023-11-14.at.14.14.32.mov
MacOS: Chrome / Safari
Screen.Recording.2023-11-14.at.14.08.19.mov
MacOS: Desktop
Screen.Recording.2023-11-14.at.14.08.39.mov