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: create Developer Options Setting Page #22382

Merged
merged 37 commits into from
Apr 16, 2024

Conversation

digiwand
Copy link
Contributor

@digiwand digiwand commented Dec 21, 2023

Description

The "Developer Options" setting page will provide developers with additional controls and customization to assist with development and testing. This feature will enable developers to reset app states easily, toggle certain features on/off, and update configurations without needing to reinstall the app, accelerating developer velocity.

To enable, add ENABLE_SETTINGS_PAGE_DEV_OPTIONS=true in .metamaskrc

Developer Options Supported:

  • Reset Announcements/Notifications for What's New modal
  • Reset Onboarding states and redirects to second onboarding page

Related issues

Fixes: #23592
Blocked By: MetaMask/core#4088

Manual testing steps

  1. yarn install to install the latest announcement-controller changes
  2. go to .metamaskrc
  3. paste ENABLE_SETTINGS_PAGE_DEV_OPTIONS=true
  4. yarn start

Test using test-dapp

  1. open test-dapp
  2. test with PPOM buttons

  1. See chrome-extension://hbljfohiafgaaaabejngpgolnboohpaf/home.html#settings/developer-options

Screenshots/Recordings

New UI

Screenshot 2023-12-21 at 2 33 45 PM

Screenshot 2023-12-22 at 1 58 28 PM

Screenshot 2023-12-22 at 1 59 40 PM

Announcements

Screenshot 2024-03-17 at 8 13 41 PM

Onboarding

Screenshot 2024-03-17 at 8 13 56 PM

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.

Copy link
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.

@vandan
Copy link

vandan commented Dec 21, 2023

Please take a look at some of the thinking from DevEx related to Developer settings.

@digiwand
Copy link
Contributor Author

Hi @vandan, glad you found this PR. I believe this PR would complement the "Developer Mode" you've put deep thought into. I was thinking, upon toggling the "Developer Mode" setting, it would unlock the "Developer Options" setting page. Thoughts?

@digiwand
Copy link
Contributor Author

@vandan

I think there is some crossover between developers working directly on the wallet itself and developers working with the wallet. I think DevEx focuses on developers working with the wallet. This new page was designed to suit developers working directly on the wallet. I see the page extending its boundaries to all developer experiences

@vandan
Copy link

vandan commented Dec 22, 2023

Great. Yes, I would think that a general developer mode should ideally have some functions for people building MetaMask itself as well. Everything we explored was conceptual so it's nice to see some common interest in actually solving for the developer needs.
In talking to a few folks on the team we found there is value in providing developers with a distinct onboarding path as well (to suppress features such as SRP reminder by default).

Copy link
Contributor

This PR has been automatically marked as stale because it has not had recent activity in the last 60 days. It will be closed in 14 days. Thank you for your contributions.

@github-actions github-actions bot added the stale issues and PRs marked as stale label Mar 15, 2024
@digiwand digiwand force-pushed the feat-developer-options-advanced-setting branch from 00127af to bab8673 Compare March 18, 2024 01:02
@digiwand
Copy link
Contributor Author

resurrecting PR for a demo

@digiwand digiwand added team-confirmations-secure-ux-PR PRs from the confirmations team and removed stale issues and PRs marked as stale labels Mar 18, 2024
@digiwand digiwand requested review from a team as code owners March 28, 2024 20:01
@metamaskbot
Copy link
Collaborator

Builds ready [d8af4eb]
Page Load Metrics (1609 ± 606 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint7364019213866
domContentLoaded1197352110
load57318016091262606
domInteractive1197352110
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 12.18 KiB (0.41%)
  • ui: 7.34 KiB (0.10%)
  • common: 613 Bytes (0.01%)

Copy link

codecov bot commented Mar 28, 2024

Codecov Report

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

Project coverage is 67.54%. Comparing base (6428b33) to head (5fbda42).
Report is 18 commits behind head on develop.

Files Patch % Lines
...ngs/developer-options-tab/developer-options-tab.js 4.17% 23 Missing ⚠️
ui/ducks/metamask/metamask.js 0.00% 9 Missing ⚠️
ui/helpers/constants/settings.js 10.00% 9 Missing ⚠️
ui/store/actions.ts 27.27% 8 Missing ⚠️
ui/pages/settings/settings.component.js 50.00% 2 Missing ⚠️
app/scripts/metamask-controller.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #22382      +/-   ##
===========================================
- Coverage    67.56%   67.54%   -0.02%     
===========================================
  Files         1246     1246              
  Lines        48888    48878      -10     
  Branches     12746    12753       +7     
===========================================
- Hits         33031    33013      -18     
- Misses       15857    15865       +8     

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

@digiwand digiwand changed the title feat: create Developer Options Advanced Setting feat: create Developer Options Setting Page Mar 29, 2024
@gauthierpetetin gauthierpetetin added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Apr 1, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [ab364fa]
Page Load Metrics (403 ± 377 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint602381003918
domContentLoaded97224136
load472652403784377
domInteractive97224136
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 12.18 KiB (0.41%)
  • ui: 7.34 KiB (0.10%)
  • common: 613 Bytes (0.01%)

@metamaskbot
Copy link
Collaborator

Builds ready [123b3d3]
Page Load Metrics (915 ± 547 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint633711276632
domContentLoaded96026126
load4925949151140547
domInteractive96026126
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 12.18 KiB (0.36%)
  • ui: 6.83 KiB (0.11%)
  • common: 1.11 KiB (0.02%)

@metamaskbot
Copy link
Collaborator

Builds ready [5fbda42]
Page Load Metrics (1217 ± 733 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint994131708541
domContentLoaded1684362110
load79433012171527733
domInteractive1684362110
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 12.18 KiB (0.35%)
  • ui: 6.83 KiB (0.11%)
  • common: 1.11 KiB (0.02%)

@digiwand digiwand merged commit d91e182 into develop Apr 16, 2024
75 of 77 checks passed
@digiwand digiwand deleted the feat-developer-options-advanced-setting branch April 16, 2024 13:07
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Apr 16, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 2024
@metamaskbot metamaskbot added the release-11.16.0 Issue or pull request that will be included in release 11.16.0 label Apr 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-11.16.0 Issue or pull request that will be included in release 11.16.0 team-confirmations-secure-ux-PR PRs from the confirmations team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Feat]: Add Developer Options Settings Page
8 participants