-
Notifications
You must be signed in to change notification settings - Fork 1
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
ENG-3797 ENG-3736 fix(portal): lists and claims back button and hook #805
Conversation
…we can use elsewhere
…k to claims id -- need to resolve a few more things with the default behavior
…y on a page (ie from a shared link)
…ck case when a user lands freshly on the route (ie from a link)
ENG-3797 Back button from lists routes back to home, not the page I came from
When I click "View identities" on a list in the list view, I get taken to the list of identities (as I should), but when I click the back button from this list, I do not go back to where I was looking through all the lists, I get routed back to the homepage. If I was trying to search through lists to see what's interesting, this would be very very annoying. I just stopped looking through the lists after the second time. ENG-3736 [Claims] Back Button Causes Crash
Description: Attachments: Screen Recording 2024-08-23 at 09.45.42.mov // Test Lead Notes // |
@Vitalsine85 thanks for the approval on this the other day. I missed merging it in -- as long as this still works after any other changes the last few days we can get it in! |
I think we can merge if it looked good for you! |
Affected Packages
Apps
Packages
Tools
Overview
useGoBack
hook to manage this logicScreen Captures
In app navigation with query params:
Landing on a page for the first time, such a from a link:
Declaration
PR Summary by Typo
Summary:
EXPLORE_CLAIMS
added topaths.ts
and new hooksuseGoBack
and state atomsaddIdentitiesListModalAtom
,imageModalAtom
imported and used.handleGoBack
function added toClaimDetails.tsx
usinguseGoBack
hook, andNavigationButton
component modified to usehandleGoBack
and anonClick
event listener.Key Points:
paths.ts
, a new constantEXPLORE_CLAIMS
is added.useGoBack.tsx
, a new custom hookuseGoBack
is created, and inClaimDetails.tsx
, thehandleGoBack
function is added using this hook.ListDetails.tsx
,useGoBack
,useLiveLoader
,addIdentitiesListModalAtom
, andimageModalAtom
hooks are imported and used. TheNavigationButton
component is modified to use thehandleGoBack
function and anonClick
event listener.Categories:
paths.ts
useGoBack.tsx
,useLiveLoader.tsx
addIdentitiesListModalAtom.ts
,imageModalAtom.ts
ClaimDetails.tsx
,ListDetails.tsx
apps/portal/app/consts/paths.ts
,apps/portal/app/lib/hooks/useGoBack.tsx
,apps/portal/app/lib/hooks/useLiveLoader.tsx
,apps/portal/app/routes/app+/claim+/$id.tsx
,apps/portal/app/components/ListDetails.tsx
To turn off PR summary, please visit Notification settings.