Re-design permissions screen to support optional permissions
Categories
(Firefox for Android :: WebExtensions, enhancement, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox128 | --- | fixed |
People
(Reporter: amejia, Assigned: zmckenney)
References
(Blocks 1 open bug)
Details
(Whiteboard: [addons-jira])
Attachments
(4 files)
In this screen:
We will have three type of permissions "Required" , "Optional" and "host permissions".
"Required" are not updated able.
"Optional" can be removed or granted a run-time
"Host" they can be allow all or site specific.
Comment 1•3 years ago
|
||
Desktop side was handled in bug 1745820 and bug 1777354.
Although the summary here frames this as a MV3-only task, it's also relevant to MV2.
The main difference between MV2 and MV3 in the context of permissions is that MV3 makes all host permissions optional, whereas in MV2 an extension can have required host permissions.
In MV2 (and MV3), the extension API to request optional permissions on demand is permissions.request(). The GeckoView side of it has been implemented in bug 1601420. But the A-C/Fenix side still needs to be implemented, in bug 1810047.
The bug here would be the user-facing interface to control the permissions.
| Reporter | ||
Comment 2•3 years ago
|
||
Thanks Rob for all the context!
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•1 year ago
|
Comment 3•1 year ago
|
||
| Assignee | ||
Comment 4•1 year ago
|
||
| Assignee | ||
Comment 5•1 year ago
|
||
Updated•1 year ago
|
Comment 7•1 year ago
|
||
| bugherder | ||
Comment 8•1 year ago
|
||
The bug didn't have the leave-open keyword but not all the patches have landed yet.
Updated•1 year ago
|
Comment 10•1 year ago
|
||
Backed out for causing linting failures on AddonPermissionsScreen.kt
- Backout link
- Push with failures
- Failure Log
- Failure log:
[task 2024-05-15T04:55:39.983Z] > Task :detekt
[task 2024-05-15T04:55:39.983Z] /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:261:5: The function AddonPermissionsScreenPreview is missing documentation. [UndocumentedPublicFunction]
[task 2024-05-15T04:55:39.983Z] /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/AddonPermissionsDetailsFragment.kt:27:12: AddonPermissionsUpdateRequest is missing required documentation. [UndocumentedPublicClass]
[task 2024-05-15T04:55:39.984Z] /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:42:27: The function AddonPermissionsScreen(permissions: List<String>, optionalPermissions: List<Addon.LocalizedPermission>, originPermissions: List<Addon.LocalizedPermission>, isAllSitesSwitchVisible: Boolean, isAllSitesEnabled: Boolean, onAddOptionalPermissions: (AddonPermissionsUpdateRequest) -> Unit, onRemoveOptionalPermissions: (AddonPermissionsUpdateRequest) -> Unit, onAddAllSitesPermissions: () -> Unit, onRemoveAllSitesPermissions: () -> Unit, onLearnMoreClick: (String) -> Unit) has too many parameters. The current threshold is set to 8. [LongParameterList]
[task 2024-05-15T04:55:39.984Z] /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:42:5: The function AddonPermissionsScreen is too long (88). The maximum length is 75. [LongMethod]
[task 2024-05-15T04:55:39.984Z] /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:237:27: Missing braces on this branch, add them. [BracesOnIfStatements]
[task 2024-05-15T04:55:39.984Z] /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:240:27: Missing braces on this branch, add them. [BracesOnIfStatements]
[task 2024-05-15T04:55:39.984Z] /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:248:27: Missing braces on this branch, add them. [BracesOnIfStatements]
[task 2024-05-15T04:55:39.984Z] /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:251:27: Missing braces on this branch, add them. [BracesOnIfStatements]
[task 2024-05-15T04:55:39.984Z]
[task 2024-05-15T04:55:39.984Z] /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt - 1h 20min debt
[task 2024-05-15T04:55:39.984Z] UndocumentedPublicFunction - [The function AddonPermissionsScreenPreview is missing documentation.] at /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:261:5
[task 2024-05-15T04:55:39.984Z] LongParameterList - 10/8 - [The function AddonPermissionsScreen(permissions: List<String>, optionalPermissio(...)] at /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:42:27
[task 2024-05-15T04:55:39.984Z] LongMethod - 88/75 - [The function AddonPermissionsScreen is too long (88). The maximum length is 75.] at /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:42:5
[task 2024-05-15T04:55:39.984Z] BracesOnIfStatements - [Missing braces on this branch, add them.] at /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:237:27
[task 2024-05-15T04:55:39.984Z] BracesOnIfStatements - [Missing braces on this branch, add them.] at /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:240:27
[task 2024-05-15T04:55:39.984Z] BracesOnIfStatements - [Missing braces on this branch, add them.] at /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:248:27
[task 2024-05-15T04:55:39.984Z] BracesOnIfStatements - [Missing braces on this branch, add them.] at /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:251:27
[task 2024-05-15T04:55:39.984Z] /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/AddonPermissionsDetailsFragment.kt - 20min debt
[task 2024-05-15T04:55:39.984Z] UndocumentedPublicClass - [AddonPermissionsUpdateRequest is missing required documentation.] at /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/AddonPermissionsDetailsFragment.kt:27:12
[task 2024-05-15T04:55:39.984Z]
[task 2024-05-15T04:55:39.984Z] Overall debt: 1h 40min
[task 2024-05-15T04:55:39.984Z]
[task 2024-05-15T04:55:39.984Z] comments - 40min debt
[task 2024-05-15T04:55:39.984Z] UndocumentedPublicFunction - [The function AddonPermissionsScreenPreview is missing documentation.] at /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:261:5
[task 2024-05-15T04:55:39.984Z] UndocumentedPublicClass - [AddonPermissionsUpdateRequest is missing required documentation.] at /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/AddonPermissionsDetailsFragment.kt:27:12
[task 2024-05-15T04:55:39.984Z] complexity - 40min debt
[task 2024-05-15T04:55:39.984Z] LongParameterList - 10/8 - [The function AddonPermissionsScreen(permissions: List<String>, optionalPermissio(...)] at /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:42:27
[task 2024-05-15T04:55:39.984Z] LongMethod - 88/75 - [The function AddonPermissionsScreen is too long (88). The maximum length is 75.] at /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:42:5
[task 2024-05-15T04:55:39.984Z] style - 20min debt
[task 2024-05-15T04:55:39.984Z] BracesOnIfStatements - [Missing braces on this branch, add them.] at /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:237:27
[task 2024-05-15T04:55:39.984Z] BracesOnIfStatements - [Missing braces on this branch, add them.] at /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:240:27
[task 2024-05-15T04:55:39.984Z] BracesOnIfStatements - [Missing braces on this branch, add them.] at /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:248:27
[task 2024-05-15T04:55:39.984Z] BracesOnIfStatements - [Missing braces on this branch, add them.] at /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/ui/AddonPermissionsScreen.kt:251:27
[task 2024-05-15T04:55:39.984Z]
[task 2024-05-15T04:55:39.984Z] Overall debt: 1h 40min
[task 2024-05-15T04:55:40.083Z]
[task 2024-05-15T04:55:40.083Z] Complexity Report:
[task 2024-05-15T04:55:40.083Z] - 119,731 lines of code (loc)
[task 2024-05-15T04:55:40.083Z] - 88,592 source lines of code (sloc)
[task 2024-05-15T04:55:40.083Z] - 59,957 logical lines of code (lloc)
[task 2024-05-15T04:55:40.083Z] - 17,605 comment lines of code (cloc)
[task 2024-05-15T04:55:40.083Z] - 10,454 cyclomatic complexity (mcc)
[task 2024-05-15T04:55:40.083Z] - 5,481 cognitive complexity
[task 2024-05-15T04:55:40.083Z] - 8 number of total code smells
[task 2024-05-15T04:55:40.083Z] - 19% comment source ratio
[task 2024-05-15T04:55:40.083Z] - 174 mcc per 1,000 lloc
[task 2024-05-15T04:55:40.084Z] - 0 code smells per 1,000 lloc
Comment 11•1 year ago
|
||
Comment 12•1 year ago
|
||
Backed out for causing lint failures
Backout link: https://hg.mozilla.org/integration/autoland/rev/cad6daa324377e2b6f5705387ba5e5600313e7a7
| Assignee | ||
Comment 13•1 year ago
|
||
Running the linter in the root directory doesn't work but after running in the Fenix directory I was able to replicate the lint errors. I've now fixed all of them and am pushing the changes. Sorry for the double backout.
Comment 14•1 year ago
|
||
Comment 15•1 year ago
|
||
| bugherder | ||
Zac, would you like to nominate this for a release note?
More info at: https://wiki.mozilla.org/Release_Management/Release_Notes_Nomination
Comment 17•1 year ago
|
||
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
Description
•