-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: Support standalone confirmation for re-redesigned confirmations #13550
base: main
Are you sure you want to change the base?
Conversation
Adding |
/> | ||
), | ||
}; | ||
} |
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.
👍
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 have some confusions in the PR, I added few questions.
<ConfirmWrapped styles={styles} /> | ||
</View> | ||
); | ||
} |
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.
Should not StandaloneConfirmation
be same as FlatConfirmation
?
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.
No, because FlatConfirmation
is a confirmation with fullscreen that's all.
One example of FlatConfirmation
will be SendFlow
, where it will have it's own Stack.Navigator
and Stack.Screens
.
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.
In summary;
ModalConfirmations
=> for using Signatures
, all other Transaction
types etc
FlatConfirmation
=> A confirmation where it needs to be a full flow, has it's own navigator inside
StandaloneConfirmation
=> Where we can put a confirmation anywhere in the app (In any Stack
)
I think these covering all the use cases we have it in mobile today
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.
But I think we need only 2 types of styling, which essentially is point of classification here - modal and full screen.
76e0f91
to
65f59d2
Compare
Why are we not running e2e tests on this ? We should run the staking e2e tests atleast so as to avoid any regressions. I see from staking point of view you are just adding a route but would feel more comfortable approving this if we can run the tests. |
@amitabh94 if you are asking the label Update: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/f9e83941-fe03-430a-a9a6-4f328860da44?tab=workflows If you are asking of why redesigned staking deposit confirmation not e2e tested, this has some reasons.
|
|
|
|
|
@@ -60,9 +61,14 @@ const Title = () => { | |||
const { approvalRequest } = useApprovalRequest(); | |||
const signatureRequest = useSignatureRequest(); | |||
const { styles } = useStyles(styleSheet, {}); | |||
const { isStandaloneConfirmation } = useStandaloneConfirmation(); |
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 should be able to use useFlatConfirmation
here.
expect(mockNavigate).toHaveBeenCalledTimes(1); | ||
expect(mockNavigate).toHaveBeenCalledWith(Routes.CONFIRM_FLAT_PAGE); | ||
}); | ||
// TODO: Add unit test for once we have any existing flat confirmation |
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's not remove the test case till code is there.
Hey @OGPoyraz : let's try to enable sonar again, the issue might already be fixed. |
Description
This PR aims to implement support of standalone confirmation for redesigned confirmations.
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/4217
Manual testing steps
N/A
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist