converted baseErrorBoundary to function component with react-error-bo…#25421
Conversation
|
@rushatgabhane 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] |
|
Hi @rushatgabhane. I downloaded a package called |
|
@rushatgabhane thoughts on the react-error-boundary approach? |
Yes, I think it's fine to use this package. It supports both React and React Native, and it has no open issues :) |
rushatgabhane
left a comment
There was a problem hiding this comment.
Just left a few style comments. Also, we need to fix the merge conflict. Everything else looks good, thanks!
|
There aren't any QA steps for this @AGarciaNY, please remove them from QA steps section of your post. |
d40220d to
11473bd
Compare
Signed-off-by: AGarciaNY <aldairgarcia360@gmail.com>
379c56c to
3b305ec
Compare
|
@AGarciaNY can you address the feedback so that we can get this one closed out? |
|
Or if it has already been addressed resolve the comments and re-request review. Thanks! |
|
Hi @rushatgabhane, can you review my changes? |
This is not easily reproducible to me. Button onPress is protected so on web, it just shows console error and nothing happens instead of crash. Please update Tests step like this to reproduce clearly:
Also, this doesn't require QA unless they can reproduce crash in some specific scenario in current app. |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
puneetlath
left a comment
There was a problem hiding this comment.
One small comment. Otherwise, looks good!
|
Hi @puneetlath, I applied the change. |
|
Looks good, thanks! |
|
✋ 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/puneetlath in version: 1.3.72-0 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.72-11 🚀
|
…undary
Details
I installed a new package
react error boundaryto replacegetDerivedStateFromErrorandcomponentDidCatchthat were used in class components.Fixed Issues
$ #16148
PROPOSAL: #16148 (comment)
Tests
<HeaderWithBackButtons)App/src/pages/settings/Profile/ProfilePage.js
Line 109 in c77814f
Offline tests
QA Steps [No QA]
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
Web
errorBoundary.web.mov
Mobile Web - Chrome
Screen.Recording.2023-08-17.at.2.09.37.PM.mov
Mobile Web - Safari
Screen.Recording.2023-08-17.at.2.11.38.PM.mov
Desktop
Screen.Recording.2023-08-17.at.2.02.46.PM.mov
iOS
Android