This repository was archived by the owner on Feb 24, 2025. It is now read-only.
Repository navigation
privacy protection dashboard #184
Merged
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
8095f21
start of ui work
brindy 73a5337
show dashboard modally
brindy 357a27a
use embedded view for navigation controller
brindy 22a19da
add transition for showing privacy protection dashboard under omni bar
brindy 584e9f9
add more privacy protection ui and fix a bug with transitions
brindy 2e08d63
add placeholder for toggle
brindy 81d428f
support kerning of text
brindy 6cb746b
Merge branch 'develop' into feature/privacy_protection_dashboard
brindy 6fc18c4
Merge branch 'develop' into feature/privacy_protection_dashboard
brindy 418a39d
add structure for navigating in the privacy protection screens
brindy 51c0092
add more ui setup for privacy protection
brindy ac7f3b7
show privacy grade and update it when it changes
brindy d204970
add additional updates to the ui based on site rating
brindy dd66963
update trackers info on the overview screen
brindy 80802d0
update privacy practices
brindy 58c73b3
disable table selections
brindy 085a802
show upgraded status of the protection
brindy 2026072
fix broken tests and add one for blocked only
brindy 701e04e
remove unused content blocker ui
brindy 132f47a
Merge branch 'develop' into feature/privacy_protection_dashboard
brindy 0a537ac
remove content blocking toggle from settings
brindy e589b89
address PR feedback
brindy 1fa54b0
more pr feedback and a rename, as discussed
brindy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
update trackers info on the overview screen
- Loading branch information
commit dd669639c5bfc688be24425d2b53ca3624610d5c
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,7 +55,15 @@ public class SiteRating { | |
|
|
||
| return nil | ||
| } | ||
|
|
||
|
|
||
| public var majorTrackersDetected: Int { | ||
| return majorTrackers(trackers: trackersDetected) | ||
| } | ||
|
|
||
| public var majorTrackersBlocked: Int { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as before, rename to |
||
| return majorTrackers(trackers: trackersBlocked) | ||
| } | ||
|
|
||
| public var containsMajorTracker: Bool { | ||
| return trackersDetected.contains(where: { $0.key.fromMajorNetwork } ) | ||
| } | ||
|
|
@@ -72,7 +80,7 @@ public class SiteRating { | |
| let detectedCount = trackersDetected[tracker] ?? 0 | ||
| trackersDetected[tracker] = detectedCount + 1 | ||
|
|
||
| if blocked{ | ||
| if blocked { | ||
| let blockCount = trackersBlocked[tracker] ?? 0 | ||
| trackersBlocked[tracker] = blockCount + 1 | ||
| } | ||
|
|
@@ -93,4 +101,9 @@ public class SiteRating { | |
| public var totalTrackersBlocked: Int { | ||
| return trackersBlocked.reduce(0) { $0 + $1.value } | ||
| } | ||
|
|
||
| private func majorTrackers(trackers: [Tracker: Int]) -> Int { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same again, rename to |
||
| return Set(trackers.keys.filter({ $0.fromMajorNetwork }).flatMap({ $0.parentDomain })).count | ||
| } | ||
|
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really a count of the unique major tracker networks detected (not a total). Maybe rename to `uniqueMajorTrackerNetworksDetected?