Skip to content

feat: add option to hide submit button in the confirmation template#23085

Merged
dbrans merged 7 commits into
developfrom
add-option-hide-submit-btn-confirmation-template
Feb 28, 2024
Merged

feat: add option to hide submit button in the confirmation template#23085
dbrans merged 7 commits into
developfrom
add-option-hide-submit-btn-confirmation-template

Conversation

@vinistevam

@vinistevam vinistevam commented Feb 21, 2024

Copy link
Copy Markdown
Contributor

Description

This PR aims to add an option to hide the submit button in the confirmation template.

Open in GitHub Codespaces

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/2129

Manual testing steps

Note: It won't be possible to test this option as it was not adopted by any confirmation template.
I recorded a video to show the behaviour with the new option while I was testing.

Test regression adding chain and snaps both are using confirmation template.
Chain:

  1. Go to https://chainlist.org/ page
  2. Add a chain to MetaMask
  3. Successfully added

Snap:

  1. Go to https://snaps.metamask.io/explore/ page
  2. Install a snap to MetaMask
  3. Successfully installed

Screenshots/Recordings

hide-submit-btn.webm

Before

After

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.

@github-actions

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@codecov

codecov Bot commented Feb 21, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 90.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 68.59%. Comparing base (62af0c6) to head (3a6cd48).

Files Patch % Lines
...ponents/confirmation-footer/confirmation-footer.js 88.89% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #23085   +/-   ##
========================================
  Coverage    68.58%   68.59%           
========================================
  Files         1098     1098           
  Lines        43332    43336    +4     
  Branches     11551    11555    +4     
========================================
+ Hits         29719    29723    +4     
  Misses       13613    13613           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@metamaskbot

Copy link
Copy Markdown
Collaborator
Builds ready [607933a]
Page Load Metrics (1882 ± 121 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1144351767536
domContentLoaded95222126
load143725051882253121
domInteractive95222126
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 170 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@vinistevam vinistevam added the team-confirmations-system-deprecated DEPRECATED: please use "team-confirmations" instead label Feb 21, 2024
@metamaskbot

Copy link
Copy Markdown
Collaborator
Builds ready [53ea49d]
Page Load Metrics (1987 ± 99 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint11646719510048
domContentLoaded108332199
load16222407198720699
domInteractive108332199
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 170 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@vinistevam vinistevam marked this pull request as ready for review February 21, 2024 13:23
@vinistevam vinistevam requested a review from a team as a code owner February 21, 2024 13:23
Comment thread ui/pages/confirmations/confirmation/confirmation.js Outdated
Comment thread ui/pages/confirmations/confirmation/confirmation.js Outdated
@dbrans

dbrans commented Feb 27, 2024

Copy link
Copy Markdown
Contributor

Here's what it looks like if you do not render the actions in the confirmation footer (contrived example).

image

Specifically the alerts are still visible.

@dbrans dbrans force-pushed the add-option-hide-submit-btn-confirmation-template branch from 5e46087 to b6d8afd Compare February 27, 2024 15:52
@dbrans dbrans force-pushed the add-option-hide-submit-btn-confirmation-template branch from dbc7964 to d0975e2 Compare February 27, 2024 16:18
@HowardBraham HowardBraham removed the request for review from kumavis February 27, 2024 16:40
@dbrans

dbrans commented Feb 27, 2024

Copy link
Copy Markdown
Contributor

Linting will be fixed by #23204

@metamaskbot

Copy link
Copy Markdown
Collaborator
Builds ready [3a6cd48]
Page Load Metrics (1181 ± 391 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint771781243316
domContentLoaded96230168
load6420801181815391
domInteractive96230168
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 68 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@dbrans

dbrans commented Feb 28, 2024

Copy link
Copy Markdown
Contributor

Manual verification

Adding BNB Chain on chainlist.org

Before

image

After

Manually setting hideSubmitButton = true in template add-ethereum-chain.js

image

@dbrans dbrans merged commit 5fdb69c into develop Feb 28, 2024
@dbrans dbrans deleted the add-option-hide-submit-btn-confirmation-template branch February 28, 2024 17:11
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 28, 2024
@metamaskbot metamaskbot added the release-11.13.0 Issue or pull request that will be included in release 11.13.0 label Feb 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-11.13.0 Issue or pull request that will be included in release 11.13.0 team-confirmations-system-deprecated DEPRECATED: please use "team-confirmations" instead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants