Skip to content
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: Add hideSubmitButton prop to templates #8844

Merged
merged 7 commits into from
Mar 13, 2024

Conversation

OGPoyraz
Copy link
Member

@OGPoyraz OGPoyraz commented Mar 5, 2024

Description

This PR aims to add hideSubmitButton property to confirmation templates. Also hiding action buttons will be possible if onSubmit and onCancel is 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 hideSubmitButton to true in to your approval request (via code)
Or temporarily set hideSubmitButton to true in your local at app/components/Views/confirmations/components/Approval/TemplateConfirmation/Templates/index.ts values constant. (See the recorded video by doing this)

Screenshots/Recordings

After

HideSubmitButton.in.action.mp4

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@OGPoyraz OGPoyraz requested a review from a team as a code owner March 5, 2024 11:04
@OGPoyraz OGPoyraz changed the title Add hideSubmitButton prop to templates Add hideSubmitButton prop to templates Mar 5, 2024
@OGPoyraz OGPoyraz changed the title Add hideSubmitButton prop to templates feat: Add hideSubmitButton prop to templates Mar 5, 2024
@OGPoyraz OGPoyraz added the team-confirmations-system DEPRECATED: please use "team-confirmations" label instead label Mar 5, 2024
@codecov-commenter
Copy link

codecov-commenter commented Mar 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.27%. Comparing base (d669eb3) to head (e823483).
Report is 28 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

Copy link

sonarcloud bot commented Mar 12, 2024

@OGPoyraz OGPoyraz merged commit ef5febd into main Mar 13, 2024
29 checks passed
@OGPoyraz OGPoyraz deleted the add-hide-submit-button-option branch March 13, 2024 09:07
@github-actions github-actions bot locked and limited conversation to collaborators Mar 13, 2024
@metamaskbot metamaskbot added the release-7.19.0 Issue or pull request that will be included in release 7.19.0 label Mar 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.19.0 Issue or pull request that will be included in release 7.19.0 team-confirmations-system DEPRECATED: please use "team-confirmations" label instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants