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: Move ENABLE_CONFIRMATION_REDESIGN feature flag to the developer settings page #25520

Merged
merged 57 commits into from
Jul 22, 2024

Conversation

pnarayanaswamy
Copy link
Contributor

@pnarayanaswamy pnarayanaswamy commented Jun 26, 2024

Description

Open in GitHub Codespaces

Related issues

Fixes: #2620

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

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.

@pnarayanaswamy pnarayanaswamy requested review from a team as code owners June 26, 2024 10:07
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.

@@ -91,6 +96,13 @@ const DeveloperOptionsTab = () => {
setIsServiceWorkerKeptAlive(value);
};

const handleToggleEnableConfirmationsRedesign = async (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps setConfirmationsRedesignEnabled as we're setting instead of toggling?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we toggle on the UI, happy to rename if necessary

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is totally optional but the reason I think set is a better fit here is that toggle functions are usually associated with flipping the value independently of what it is at the moment.

for example

const toggleEnableConfirmationsRedesign = async (): Promise<void> => {
    const previousValue = useSelector(isRedesignedConfirmationsFeatureEnabled);

    await dispatch(setRedesignedConfirmationsDeveloperEnabled(!previousValue));
    await setIsRedesignedConfirmationsFeatureEnabled(!previousValue);
}

However, in this case the function is receiving an explicit value as an argument, so it seems to be a set function.

In other words, there is indeed a feature toggle, but the function is not toggling, it's setting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@pnarayanaswamy pnarayanaswamy requested review from kumavis and a team as code owners June 27, 2024 13:28
@pnarayanaswamy pnarayanaswamy added the team-confirmations Push issues to confirmations team label Jun 27, 2024
@pnarayanaswamy pnarayanaswamy requested a review from a team June 27, 2024 13:54
@metamaskbot
Copy link
Collaborator

Builds ready [5736f66]
Page Load Metrics (46 ± 9 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint56156822914
domContentLoaded7351163
load3611446189
domInteractive7351163
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 290 Bytes (0.01%)
  • ui: 1.16 KiB (0.02%)
  • common: 653 Bytes (0.01%)

@metamaskbot
Copy link
Collaborator

Builds ready [5736f66]
Page Load Metrics (46 ± 9 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint56156822914
domContentLoaded7351163
load3611446189
domInteractive7351163
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 290 Bytes (0.01%)
  • ui: 1.16 KiB (0.02%)
  • common: 653 Bytes (0.01%)

Copy link

codecov bot commented Jun 28, 2024

Codecov Report

Attention: Patch coverage is 69.44444% with 11 lines in your changes missing coverage. Please review.

Project coverage is 69.67%. Comparing base (e3691c0) to head (50b45b5).

Files Patch % Lines
...gs/developer-options-tab/developer-options-tab.tsx 46.15% 7 Missing ⚠️
app/scripts/metamask-controller.js 0.00% 2 Missing ⚠️
ui/store/actions.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #25520   +/-   ##
========================================
  Coverage    69.67%   69.67%           
========================================
  Files         1401     1402    +1     
  Lines        49628    49652   +24     
  Branches     13713    13720    +7     
========================================
+ Hits         34577    34594   +17     
- Misses       15051    15058    +7     

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

@metamaskbot
Copy link
Collaborator

Builds ready [f32ec89]
Page Load Metrics (324 ± 293 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint703161195727
domContentLoaded992312010
load421898324611293
domInteractive992312010
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 290 Bytes (0.01%)
  • ui: 1.16 KiB (0.02%)
  • common: 660 Bytes (0.01%)

@metamaskbot
Copy link
Collaborator

Builds ready [ad9e3c2]
Page Load Metrics (172 ± 202 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint731511072110
domContentLoaded96030147
load442001172420202
domInteractive96030147
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 290 Bytes (0.01%)
  • ui: 1.16 KiB (0.02%)
  • common: 660 Bytes (0.01%)

@metamaskbot
Copy link
Collaborator

Builds ready [cd543bb]
Page Load Metrics (240 ± 236 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint761671102512
domContentLoaded116128157
load461857240492236
domInteractive116128157
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 311 Bytes (0.01%)
  • ui: 1.67 KiB (0.02%)
  • common: 685 Bytes (0.01%)

Comment on lines +1557 to +1562
"developerOptionsEnableConfirmationsRedesignDescription": {
"message": "Enables or disables the confirmations redesign feature currently in development"
},
"developerOptionsEnableConfirmationsRedesignTitle": {
"message": "Confirmations Redesign"
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can actually remove the locales here. Or I can follow-up to remove them to not block this PR.

It was discussed that we do not need to support i18n in the Developer Options Settings since this is internal

ticket to remove translations:
#24412

digiwand
digiwand previously approved these changes Jul 18, 2024
Copy link

sonarcloud bot commented Jul 22, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [50b45b5]
Page Load Metrics (135 ± 151 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6412696178
domContentLoaded96324147
load401501135314151
domInteractive96323147
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 311 Bytes (0.01%)
  • ui: 1.67 KiB (0.02%)
  • common: 685 Bytes (0.01%)

@pnarayanaswamy pnarayanaswamy merged commit 721a38b into develop Jul 22, 2024
77 checks passed
@pnarayanaswamy pnarayanaswamy deleted the developer-settings branch July 22, 2024 13:36
@github-actions github-actions bot locked and limited conversation to collaborators Jul 22, 2024
@metamaskbot metamaskbot added the release-12.3.0 Issue or pull request that will be included in release 12.3.0 label Jul 22, 2024
@digiwand digiwand added release-12.2.0 Issue or pull request that will be included in release 12.2.0 and removed release-12.3.0 Issue or pull request that will be included in release 12.3.0 labels Jul 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.2.0 Issue or pull request that will be included in release 12.2.0 team-confirmations Push issues to confirmations team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants