-
Notifications
You must be signed in to change notification settings - Fork 971
add 3rd party fingerprinting block option #10181
Conversation
docs/state.md
Outdated
@@ -69,6 +69,12 @@ AppStore | |||
cookieblockAll: { | |||
enabled: boolean // enable all cookie/referer blocking | |||
}, | |||
fingerprintingProtection: { |
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.
Please sort this alphabetically
23697f9
to
0dacae2
Compare
less/switchControls.less
Outdated
@@ -85,3 +85,6 @@ | |||
} | |||
} | |||
} | |||
.pullRight { |
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.
I have a fix which is much more straightforward. please wait for a moment.
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.
++ please feel free to push to this branch (but do not rebase or squash commits)
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.
Done bcdfa30
CC @bradleyrichter for review: We could align the switches to a left row like this: Which one is better? |
the fp setting was right-aligned because that is where it was before (so people might be used to clicking in that area), but i don't have a strong opinion. actually i think 3 rows with 2 items each would look best. |
@luixxiul i like the last one the most because it matches with our existing placement |
I'll need to try a different layout. Or we need to give up the wide view.
… On Aug 2, 2017, at 10:23 PM, yan ***@***.***> wrote:
@luixxiul i like the last one the most because it matches with our existing placement
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@diracdeltas @bradleyrichter OK, so should we tag this PR as WIP for now? |
This is blocking some work that others are doing on improving fingerprinting protection, so I would prefer it not be pushed to a later milestone. Why can't we just do compact-panel only? |
Can i get this approved and then @bradleyrichter open up a follow-up issue for the UI tweak? |
0dacae2
to
fb3f28e
Compare
Also: - Add globalStyles.appIcons.question Addresses #9029 Auditors: @cezaraugusto Test Plan: 1. Open about:preferences#shields 2. Enable compact panel 3. Open https://twitter.com 4. Open compact panel 5. Make sure the fp block pulldown is placed properly 6. Disable compact panel 7. Open twitter.com again 8. Open the default panel 9. Make sure the fp pulldown is placed properly
@@ -241,21 +241,22 @@ const globalStyles = { | |||
prefsPanelHeading: '23px' | |||
}, | |||
appIcons: { |
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.
elements below this are alphabetized.
styles.braveryPanel__body__advanced__control__forms__title | ||
)}> | ||
<span data-l10n-id='fingerprintingProtection' /> | ||
<span className={globalStyles.appIcons.question} |
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.
braveryPanel__body__advanced__control__fpWrapper
is created to wrap the l10n string and the question mark to align them with flex.
app/sessionStore.js
Outdated
@@ -675,6 +675,28 @@ module.exports.runPreMigrations = (data) => { | |||
} | |||
|
|||
module.exports.runPostMigrations = (data) => { | |||
// fingerprinting protection migration |
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.
Not that we have to do it now... but I'm Curious what you think @diracdeltas and @darkdh
Similar to Ruby and Python, maybe we could create a /migrations/
folder and have a single file (ex: 0-20-0_1st_3rd_fingerprint
) with a two possible functions (postMigrate
, preMigrate
) for each type of migration that we'd like to run.
We could then call them like so:
module.exports.runPostMigrations = (data) => {
migrations = [
require('../migrations/0-12-0_search_xml'),
require('../migrations/0-14-0_autofill_data'),
require('../migrations/0-20-0_1st_3rd_fingerprint')
]
migrations.runPostMigrations()
}
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.
I really like this idea ++
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.
i'm for a migrations-migration. :)
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.
We were talking with @bbondy when can we remove some old migrations from session store file and this solution would solve it. What I would suggest as well is to create an upgrade script. So it automatically check if file for that version exists or not. For example: let's say that you are upgrading from 0.10 to 0.15.4. When we start the upgrade process we determinate that we need to check versions 0.10.x to 0.15.4 (it can be many versions in between, hot fixes). Then we check if file migration/0.10.15.js
(hot fix) exist and if so run both pre and post migration. Then you check if migration/0.11.js
exist and so on. I would have one file per version and it would be standardized with predefined functions. This way we know exactly what was added/removed in which version.
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.
++ for aggregated migrations. We have many migration scattered around now and some of them are made by me 😝
bcdfa30
to
93bd108
Compare
This has been updated to use @Jacalz's recommended layout. @bsclifton can you review? |
@bradleyrichter see my comment above yours. no need to adjust since i already did. |
Let me confirm the adjustment by @diracdeltas. |
oops. sorry @diracdeltas. Thanks... |
Also: - Add globalStyles.appIcons.question Addresses #9029 Auditors: @cezaraugusto Test Plan: 1. Open about:preferences#shields 2. Enable compact panel 3. Open https://twitter.com 4. Open compact panel 5. Make sure the fp block pulldown is placed properly 6. Disable compact panel 7. Open twitter.com again 8. Open the default panel 9. Make sure the fp pulldown is placed properly
LGTM! |
93bd108
to
ce3a8ae
Compare
Codecov Report
@@ Coverage Diff @@
## master #10181 +/- ##
==========================================
- Coverage 54.35% 54.29% -0.07%
==========================================
Files 245 245
Lines 21085 21117 +32
Branches 3249 3258 +9
==========================================
+ Hits 11461 11465 +4
- Misses 9624 9652 +28
|
I created #10488 so that we don't lose the ideas mentioned here 😄 |
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.
Changes look great (implementation matches spec, blocking/unblocking fingerprint works great) 😄 Awesome job on the tests!
@diracdeltas can you add some manual tests steps (if required)? ex: a website that uses 3rd party fingerprinting. If it's covered by tests, let's tag this as QA/no-qa-needed
👍
BTW- do we need to update the wiki?
https://github.com/brave/browser-laptop/wiki/Fingerprinting-Protection-Mode
NOTE: I updated the original issue with a link to a jsfiddle where 3rd party fingerprint block can be tested: |
Also: - Add globalStyles.appIcons.question Addresses brave#9029 Auditors: @cezaraugusto Test Plan: 1. Open about:preferences#shields 2. Enable compact panel 3. Open https://twitter.com 4. Open compact panel 5. Make sure the fp block pulldown is placed properly 6. Disable compact panel 7. Open twitter.com again 8. Open the default panel 9. Make sure the fp pulldown is placed properly
fix #9029
regular panel:
![screen shot 2017-08-02 at 12 09 21 am](https://user-images.githubusercontent.com/549654/28861724-f658062a-7716-11e7-9afe-c2c1559fc6d8.png)
compact:
![screen shot 2017-08-02 at 12 09 45 am](https://user-images.githubusercontent.com/549654/28861731-fdbe20d4-7716-11e7-9c73-84157f018b69.png)
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
Tests