feat: Add hideSubmitButton prop to templates#8844
Merged
Merged
Conversation
hideSubmitButton prop to templates
hideSubmitButton prop to templateshideSubmitButton prop to templates
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8844 +/- ##
==========================================
+ Coverage 41.61% 43.27% +1.65%
==========================================
Files 1269 1271 +2
Lines 30869 30916 +47
Branches 3086 3092 +6
==========================================
+ Hits 12846 13378 +532
+ Misses 17246 16765 -481
+ Partials 777 773 -4 ☔ View full report in Codecov by Sentry. |
|
vinistevam
approved these changes
Mar 13, 2024
matthewwalsh0
approved these changes
Mar 13, 2024
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
This PR aims to add
hideSubmitButtonproperty to confirmation templates. Also hiding action buttons will be possible ifonSubmitandonCancelis not provided.Related issues
Fixes: https://github.com/orgs/MetaMask/projects/47/views/1?pane=issue&itemId=55391209
Similar task is resolved in extension MetaMask/metamask-extension#23085
Manual testing steps
To manually test this, either you should add
hideSubmitButtonto true in to your approval request (via code)Or temporarily set
hideSubmitButtonto true in your local atapp/components/Views/confirmations/components/Approval/TemplateConfirmation/Templates/index.tsvaluesconstant. (See the recorded video by doing this)Screenshots/Recordings
After
HideSubmitButton.in.action.mp4
Pre-merge author checklist
Pre-merge reviewer checklist