Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Simplify PhoneFeature code #10810

Merged
merged 2 commits into from Jun 8, 2020
Merged

Conversation

NotWoods
Copy link
Contributor

This gets rid of a lot of phone feature related code.

  • Replaced WebsitePermissions sealed class with data class containing feature key
  • Use map of PhoneFeature to WebsitePermissions instead of named keys
  • Make PhoneFeature parcelable to avoid ID translations

Pull Request checklist

  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not
  • Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features. In addition, it includes a screenshot of a successful accessibility scan to ensure no new defects are added to the product.

After merge

  • Milestone: Make sure issues finished by this pull request are added to the milestone of the version currently in development.

To download an APK when reviewing a PR:

  1. click on Show All Checks,
  2. click Details next to "Taskcluster (pull_request)" after it appears and then finishes with a green checkmark,
  3. click on the "Fenix - assemble" task, then click "Run Artifacts".
  4. the APK links should be on the left side of the screen, named for each CPU architecture

@codecov-commenter
Copy link

codecov-commenter commented Jun 3, 2020

Codecov Report

Merging #10810 into master will decrease coverage by 0.28%.
The diff coverage is 53.52%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #10810      +/-   ##
============================================
- Coverage     20.46%   20.17%   -0.29%     
+ Complexity      680      675       -5     
============================================
  Files           372      375       +3     
  Lines         15442    15252     -190     
  Branches       2081     2065      -16     
============================================
- Hits           3160     3077      -83     
+ Misses        11986    11888      -98     
+ Partials        296      287       -9     
Impacted Files Coverage Δ Complexity Δ
...la/fenix/settings/quicksettings/WebsiteInfoView.kt 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...x/settings/quicksettings/WebsitePermissionsView.kt 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...zilla/fenix/settings/sitepermissions/Extensions.kt 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...ssions/SitePermissionsDetailsExceptionsFragment.kt 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...ettings/sitepermissions/SitePermissionsFragment.kt 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...PermissionsManageExceptionsPhoneFeatureFragment.kt 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...sions/SitePermissionsManagePhoneFeatureFragment.kt 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...main/java/org/mozilla/fenix/settings/Extensions.kt 42.85% <60.00%> (+42.85%) 0.00 <0.00> (ø)
...ttings/quicksettings/QuickSettingsFragmentState.kt 84.61% <84.61%> (ø) 3.00 <3.00> (?)
...tings/quicksettings/QuickSettingsFragmentAction.kt 85.71% <85.71%> (ø) 0.00 <0.00> (?)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7e74e3...25402ff. Read the comment docs.

@Amejia481
Copy link
Contributor

After doing some manual testing I noticed granted/denied site permissions are not showing in the toolbar video. I was testing with https://permission.site/

@NotWoods
Copy link
Contributor Author

NotWoods commented Jun 4, 2020

Whoops, used && instead of || after the rebase. I moved the visibility check into the view, since its coupled to the displayed permissions.

Copy link
Contributor

@Amejia481 Amejia481 left a comment

Choose a reason for hiding this comment

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

Awesome work 🚢 !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants