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

Permissions: Unify Location #5208

Merged
merged 8 commits into from
Nov 13, 2024

Conversation

malmstein
Copy link
Contributor

@malmstein malmstein commented Oct 29, 2024

Task/Issue URL: https://app.asana.com/0/1174433894299346/1208719691317744/f

Description

This PR moves the Location permission logic to the SitePermissionsManager
Note: This

Steps to test this PR

Location permission granted

  • Fresh install and visit permission.site
  • Ask for Location permissions
  • Verify new Location dialog appears
  • Allow permissions
  • Verify system dialog is shown
  • Allow permissions
  • Verify location is granted (location button is green)

Location permission not granted

  • Fresh install and visit permission.site
  • Ask for Location permissions
  • Verify new Location dialog appears
  • Deny permissions
  • Verify location is not granted (location button is red)

Location permission granted (not system granted)

  • Fresh install and visit permission.site
  • Ask for Location permissions
  • Verify new Location dialog appears
  • Allow permissions
  • Verify system dialog is shown
  • Deny permissions
  • Verify location is not granted (location button is red)
  • Verify Snackbar appears
  • Ask for Location permissions
  • Verify system dialog is shown
  • Deny permissions
  • Verify Settings dialog appears
  • Tap on Open Settings
  • Verify Device Settings screen opens

Copy link
Contributor Author

malmstein commented Oct 29, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @malmstein and the rest of your teammates on Graphite Graphite

@malmstein malmstein marked this pull request as ready for review October 29, 2024 20:15
@malmstein malmstein force-pushed the feature/david/10-28-permissions_unify_location branch 4 times, most recently from aa054f0 to 78888b2 Compare November 4, 2024 10:11
@malmstein malmstein force-pushed the feature/david/10-28-permissions_unify_location branch from 78888b2 to 06e5f89 Compare November 5, 2024 11:01
@malmstein malmstein mentioned this pull request Nov 5, 2024
32 tasks
Copy link
Contributor

@anikiki anikiki left a comment

Choose a reason for hiding this comment

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

Looks good and works as expected! 🎉
Left a few tiny comments.

@malmstein malmstein force-pushed the feature/david/10-28-permissions_unify_location branch from 06e5f89 to c628b45 Compare November 6, 2024 12:17
@malmstein malmstein force-pushed the feature/david/10-28-permissions_unify_location branch from c628b45 to bac553f Compare November 6, 2024 17:29
@malmstein malmstein marked this pull request as draft November 6, 2024 19:09
@malmstein malmstein force-pushed the feature/david/10-28-permissions_unify_location branch from 52c8946 to 1f41356 Compare November 6, 2024 21:18
Copy link
Contributor

@nalcalag nalcalag left a comment

Choose a reason for hiding this comment

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

@malmstein I tested your branch and there is a problem when the site requests more than one site permission.
You can reproduce it on https://webcammictest.com/ which would request mic and camera. I checked and it works fine in production.
The bug was introduced in branch feature/david/11-04-permissions_update_drm_dialogs

@malmstein malmstein force-pushed the feature/david/10-28-permissions_unify_location branch 3 times, most recently from 4931411 to ae2a35b Compare November 8, 2024 14:04
Copy link
Contributor

@anikiki anikiki left a comment

Choose a reason for hiding this comment

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

LGTM! 👍
There's a failing test.

@malmstein malmstein force-pushed the feature/david/10-28-permissions_unify_location branch from ae2a35b to b07c0b2 Compare November 12, 2024 14:50
Copy link
Contributor

@anikiki anikiki left a comment

Choose a reason for hiding this comment

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

Checked the last changes. LGTM 👍

@malmstein malmstein marked this pull request as ready for review November 12, 2024 19:26
@malmstein malmstein mentioned this pull request Nov 13, 2024
24 tasks
@malmstein malmstein force-pushed the feature/david/10-28-permissions_unify_location branch from d141612 to 98967c0 Compare November 13, 2024 14:52
Task/Issue URL: https://app.asana.com/0/0/1208750400255371/f

### Description
PIxels for the new site permission dialogs

### Steps to test this PR

_Impression pixel_
- [x] open app visit permission.site
- [x] tap on camera
- [x] verify `m_site_permissions_dialog_impresssion` with parameter
`type:camera` is sent
- [x] tap on microphone
- [x] verify `m_site_permissions_dialog_impresssion` with parameter
`type: microphone ` is sent
- [x] tap on camera + microphone
- [x] verify `m_site_permissions_dialog_impresssion` with parameter
`type:camera_and_microphone` is sent
- [x] tap on drm
- [x] verify `m_site_permissions_dialog_impresssion` with parameter
`type: drm ` is sent
- [x] tap on location
- [x] verify `m_site_permissions_dialog_impresssion` with parameter
`type:location` is sent

_Click pixel_
- [x] open app visit permission.site
- [x] tap on camera and enable system permission
- [x] tap on Allow (checked box not pressed)
- [x] verify `m_site_permissions_dialog_click` with parameters
`type:camera` and `selection:allow_once` is sent
- [x] tap on microphone and enable system permission
- [x] tap on Deny (checked box not pressed)
- [x] verify `m_site_permissions_dialog_click` with parameters
`type:microphone` and `selection:deny_once` is sent
- [x] tap on drm
- [x] tap on Allow (checked box pressed)
- [x] verify `m_site_permissions_dialog_click` with parameters
`type:drm` and `selection:allow_always` is sent
- [x] tap on location and enable system permissions
- [x] tap on Deny (checked box pressed)
- [x] verify `m_site_permissions_dialog_click` with parameters
`type:location` and `selection:deny_always` is sent

Notes: Pixels don’t include ATB
@malmstein malmstein merged commit 7a238c8 into develop Nov 13, 2024
6 checks passed
@malmstein malmstein deleted the feature/david/10-28-permissions_unify_location branch November 13, 2024 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants