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 delay for android browser permission dialog #6745

Merged
merged 3 commits into from
Jul 6, 2023

Conversation

NicholasEllul
Copy link
Contributor

@NicholasEllul NicholasEllul commented Jul 5, 2023

Development & PR Process

  1. Follow MetaMask Mobile Coding Standards
  2. Add release-xx label to identify the PR slated for a upcoming release (will be used in release discussion)
  3. Add needs-dev-review label when work is completed
  4. Add needs-qa label when dev review is completed
  5. Add QA Passed label when QA has signed off

Description

When a webpage in the MM mobile browser requests the camera permission, a prompt is shown for users to accept or deny this request. However, in cases where a user is browsing very quickly, it is possible for a user to accidentally accept the permission without realizing it.

To resolve this, we are introducing a 0.5s delay where the allow button is not clickable. After this delay, the permission can be accepted as needed.

Screenshot 2023-07-05 at 3 55 58 PM

Manual Testing Steps

  • Run this branch in the android emulator
  • Visit https://webcamtests.com/
  • Click Test my cam and immediately click allow on the permission prompt
    • You can refresh the page to try again if you aren't quick enough
    • If you have not previously approved the OS Level camera permission, accept that prompt and refresh the page to try agian.
  • You will see that the allow button is not responsive for 500ms
Screen.Recording.2023-07-05.at.3.59.15.PM.mov

Checklist

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

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

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.

@NicholasEllul NicholasEllul added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jul 5, 2023
@NicholasEllul NicholasEllul changed the title [Android] Add delay for browser permission dialog Add delay for android browser permission dialog Jul 5, 2023
@NicholasEllul NicholasEllul changed the title Add delay for android browser permission dialog feat: Add delay for android browser permission dialog Jul 5, 2023
Copy link
Contributor

@sethkfman sethkfman left a comment

Choose a reason for hiding this comment

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

LGTM

@sethkfman sethkfman added No QA Needed/E2E Only Apply this label when your PR does not need any QA effort. Spot Check on the Release Build If a ticket doesn't require feature QA, but does require some form of manual spot checking release-7.4.0 and removed No QA Needed/E2E Only Apply this label when your PR does not need any QA effort. needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Jul 5, 2023
@sethkfman
Copy link
Contributor

@chrisleewilcox This is a minor change to add a .5 second delay to a system pop-up on the browser when accessing OS permission (e.g. camera)

@sonarcloud
Copy link

sonarcloud bot commented Jul 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@NicholasEllul NicholasEllul merged commit 7c8f2da into main Jul 6, 2023
11 checks passed
@NicholasEllul NicholasEllul deleted the ellul/delay-permission branch July 6, 2023 14:02
@github-actions github-actions bot locked and limited conversation to collaborators Jul 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.4.0 Spot Check on the Release Build If a ticket doesn't require feature QA, but does require some form of manual spot checking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants