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

[Force upgrade]Trigger UpdateNeeded screen #4917

Merged
merged 18 commits into from
Nov 22, 2022
Merged

Conversation

owencraston
Copy link
Contributor

@owencraston owencraston commented Aug 25, 2022

Description

  • designs
    Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions,
    1. What is the reason for the change?
  • in order to make users more secure we need a way to warn them if their app has a security vulnerability
  • this change prompts users to enable automatic checks (since we do not want to enable it by default as it will expose their IP address to github)
  • after this we can verify if a users app is up to date enough to remain secure
    2. What is the improvement/solution?
  • Prompts the user to enable the automatic security checks feature
    • if the user says no thanks then the we will not show the modal to update their app
  • if the user enables this feature then we will check if their app version is over the minimum version hosted here: https://github.com/MetaMask/metamask-mobile/tree/gh-pages
  • if the minimum version is higher than the current users app version we will prompt them to update
  • if the user clicks the the "Update to latest version" button it will take them to the app store/play store
  • if they click "Remind me later" then the modal will go away until they kill the app and open it again
    Screenshots/Recordings
RPReplay_Final1664400891.MP4

QA

  • in order to QA you will need three builds, one that is 1 versions below the minimum version, one that is equal to the minimum version and one that is above the minimum version.

Below minimum version

Equal to minimum version

Above the minimum version

QA steps

  1. download the version below the minimum version (987)
  2. setup wallet

Path 1: Enabling automatic security checks

  1. a prompt will appear to enable the automatic security check, click enable
  2. on build 897 the force upgrade modal should appear
  3. dismiss this modal by either swiping down or or clicking remind me later
  4. continue to use the wallet and the modal should not appear
  5. force quit the app and reopen it
  6. the modal should appear again
  7. clicking Update to latest version should deep link to the app store/play store
  8. Update the app via test flight or by reinstalling the apk (989)
  9. opening the app you should not show the force upgrade modal again

Path 1: Automatic security checks are disabled

  1. a prompt will appear to enable the automatic security check, click No thanks
  2. kill the app
  3. this enable modal should not appear again
  4. there should also be no force upgrade modal pop up at all
  5. going to settings/privacy and scroll to the bottom
  6. the Enable automatic security checks section should be toggled off

Non force upgrade changes

  • The Backup alert issue that @cortisiko mentioned below is resolved by only showing the backup alert after the user has completed/dismissed the onboarding tutorial.

Issue

Progresses https://github.com/MetaMask/mobile-planning/issues/232
Progresses #5208

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

@github-actions
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.

@owencraston owencraston force-pushed the trigger-force-upgrade branch 3 times, most recently from 29cf366 to d384e72 Compare September 28, 2022 19:50
@owencraston owencraston marked this pull request as ready for review September 28, 2022 23:39
@owencraston owencraston requested a review from a team as a code owner September 28, 2022 23:39
@owencraston owencraston added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) Code Impact - High Major code change that can have an high impact on the codebase functionality labels Sep 29, 2022
@owencraston owencraston mentioned this pull request Sep 29, 2022
3 tasks
app/components/UI/UpdateNeeded/UpdateNeeded.tsx Outdated Show resolved Hide resolved
app/components/hooks/useEnableAutomaticSecurityChecks.tsx Outdated Show resolved Hide resolved
app/components/hooks/useMinimumVersions.ts Outdated Show resolved Hide resolved
app/constants/navigation/Routes.ts Outdated Show resolved Hide resolved
@owencraston owencraston force-pushed the trigger-force-upgrade branch from 2427ffb to 1c5efdd Compare October 3, 2022 17:36
Copy link
Member

@gantunesr gantunesr left a comment

Choose a reason for hiding this comment

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

LGTM

@owencraston
Copy link
Contributor Author

In order to prevent the Onboarding wizard from showing up on top of my Modal I had to add the prop coverScreen={false} which changed the way the existing styles interacted with the screen. To combat this I changed the styles of the Step 5 section so that the buttons fit onto the blue modal. Now the padding is the same on both sides and we don't rely on a hardcoded DRAWER_WIDTH value
Screen Shot 2022-10-03 at 3 02 23 PM

@owencraston owencraston added needs-qa Any New Features that needs a full manual QA prior to being added to a release. and removed needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Oct 3, 2022
@owencraston owencraston force-pushed the trigger-force-upgrade branch 5 times, most recently from cef7cae to eca9bb4 Compare October 4, 2022 23:21
@owencraston owencraston closed this Oct 5, 2022
@owencraston owencraston deleted the trigger-force-upgrade branch October 5, 2022 19:46
@plasmacorral
Copy link
Contributor

Translations:

Recent updates resolve the button alignment and text obfuscation issues.

Android Samsung Galaxy A8 running Android 7.1 on a 360 by 612 Viewport
CTA is much improved on German, Greek, French, Portuguese & Russian :

On a small screen iOS device with a viewport at 320 by 548.
iPhone SE 2022 running ios 15.4

Words in CTA are much improved in German, Spanish, Greek, French, Portuguese & Russian:

The full descriptions above are scroll able on both iOS and Android.

@plasmacorral
Copy link
Contributor

Have been unable to reproduce this observation, will monitor post launch.

@plasmacorral plasmacorral dismissed cortisiko’s stale review November 22, 2022 21:45

These 3 issues have been resolved

@plasmacorral plasmacorral added QA Passed A successful QA run through has been done and removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. QA in Progress QA has started on the feature. labels Nov 22, 2022
@owencraston owencraston force-pushed the trigger-force-upgrade branch from 7ed0697 to ed4799c Compare November 22, 2022 22:11
@owencraston owencraston force-pushed the trigger-force-upgrade branch from ed4799c to eac0d22 Compare November 22, 2022 22:12
@owencraston owencraston force-pushed the trigger-force-upgrade branch from eac0d22 to f1da1ee Compare November 22, 2022 22:14
@plasmacorral plasmacorral merged commit c80097c into main Nov 22, 2022
@plasmacorral plasmacorral deleted the trigger-force-upgrade branch November 22, 2022 22:39
@owencraston owencraston changed the title Trigger UpdateNeeded screen [Force upgrade]Trigger UpdateNeeded screen Dec 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Code Impact - High Major code change that can have an high impact on the codebase functionality QA Passed A successful QA run through has been done release-5.12.0 Issue or pull request that will be included in release 5.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants