-
Notifications
You must be signed in to change notification settings - Fork 583
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(POC): add error boundary to withSuspense (#10824)
* feat: add error boundary to suspense * chore: Update withSuspense hook to use ErrorFallback prop * chore: fix sentry mock * chore: Fix sentry mock * add react error-boundary and track sentry stacktrace on error * fix: sentry mock * add test patch with query rejections * turn off persisted queries for now * use explicit empty fallback for all home view sections * Revert "use explicit empty fallback for all home view sections" This reverts commit d0395d6. * add explicit empty fallback for home view sections * Revert "add explicit empty fallback for home view sections" This reverts commit 20f464a. * pls let this be the last time * add error boundary for home view section screen * add error boundary to new works for you page * add fallback for artwork error page * add fallback for activity screen * add fallback for browse similar works * add temp strict suspense hook to track progress easier * explicit fallback for similar works * explicit fallback for profile failure * explicit fallback for NewWorksFromGalleriesYouFollow * explicit fallback for RecentlyViewArtworks * explicit fallback for SavedSearchFilterArtistSeries * remove log * explicit fallback for SavedSearchFilterPriceRange * explicit fallback for AlertPriceRangeScreen * explicit fallback for MyCollectionArtworkEdit * explicit fallback for MyCollectionCollectedArtistsPrivacy * remove log * explicit fallback for ConfirmationScreen * explicit fallback for SubmitArtworkFormEdit * explicit fallback for MyCollectionArtworkFormDeleteArtworkModal * delete unstrict suspense hook * revert to old name * remove logs * Revert "turn off persisted queries for now" This reverts commit fbed79a. * move fetch patch to a test dir * more consistent worksForYou fallback * more consistent error for activity screen * remove missed change * add better api for no fallback * pass new explicit param everywhere, fix types in withSuspense * make withSuspense take a typed object for better api * make selection of spinner fallback explicit * add some docs to the interface * render retry button when using LoadFailureView --------- Co-authored-by: brainbicycle <[email protected]>
- Loading branch information
1 parent
8caed6b
commit 23c860d
Showing
38 changed files
with
694 additions
and
369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import { Screen } from "@artsy/palette-mobile" | ||
import { LoadFailureView } from "app/Components/LoadFailureView" | ||
import { Screen, SimpleMessage } from "@artsy/palette-mobile" | ||
import { goBack } from "app/system/navigation/navigate" | ||
|
||
interface ActivityErrorScreenProps { | ||
headerTitle: string | ||
error?: Error | ||
} | ||
|
||
export const ActivityErrorScreen: React.FC<ActivityErrorScreenProps> = ({ headerTitle }) => { | ||
return ( | ||
<Screen> | ||
<Screen.Header title={headerTitle} onBack={goBack} /> | ||
<LoadFailureView justifyContent="center" mb="100px" /> | ||
<SimpleMessage m={2}>Something went wrong. Please check back later.</SimpleMessage> | ||
</Screen> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.