-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Security and Privacy Settings Re-org #16756
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
@@ -91,37 +89,6 @@ export default class AdvancedTab extends PureComponent { | |||
handleSettingsRefs(t, t('advanced'), this.settingsRefs); | |||
} | |||
|
|||
renderMobileSync() { |
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.
The changes in this file are huge because I have to re-arrange the renderXXX methods such that if follows a logical order of this.settingsRefs[XXX], so this.settingsRefs[0] comes before this.settingsRefs[14] for instance.
This will make adding/removing new renderXXX method in the future easier.
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
renderTokenDetectionToggle() { |
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.
The only change logic-wise in this file, is that this method (and attendant variables) was removed and moved to security tab component.
@@ -83,6 +99,61 @@ export default class SecurityTab extends PureComponent { | |||
); | |||
} | |||
|
|||
renderIncomingTransactionsOptIn() { |
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 had to make the same arrangement for renderXXX methods here like I did in advanced tab components.
Builds ready [bd0900b]
Page Load Metrics (2164 ± 115 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
highlights:storybook
|
dc7e3c7
to
ac8b530
Compare
@segun please remove the |
7d17714
to
b4e5797
Compare
Builds ready [b4e5797]
Page Load Metrics (2528 ± 268 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
highlights:storybook
|
e2a2875
to
f8c7afd
Compare
Builds ready [abb3b72]
Page Load Metrics (1928 ± 56 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
highlights:storybook
|
@@ -35,6 +35,7 @@ export default class PreferencesController { | |||
useNonceField: false, | |||
usePhishDetect: true, | |||
dismissSeedBackUpReminder: false, | |||
showGasFeeEstimationBuySwapTokens: true, |
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 can remove the toggle that controls this boolean from this PR
app/scripts/metamask-controller.js
Outdated
@@ -1637,6 +1637,10 @@ export default class MetamaskController extends EventEmitter { | |||
setUseTokenDetection: preferencesController.setUseTokenDetection.bind( | |||
preferencesController, | |||
), | |||
setShowGasFeeEstimationBuySwapTokens: |
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 can remove the toggle that this function controls from this PR
@@ -167,7 +230,218 @@ export default class SecurityTab extends PureComponent { | |||
); | |||
} | |||
|
|||
renderMultiAccountBalanceCheckerOptIn() { | |||
renderShowGasFeeEstimationBuySwapTokensToggle() { |
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.
Let's remove this from this PR. We will add this in a future PR, when we are ready to deal with those features being toggled off.
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.
Code looks good. Only change needed is to remove the toggle and associated code, which I commented on
Signed-off-by: Akintayo A. Olusegun <[email protected]> Toggle all security & privacy settings by a single checkbox Signed-off-by: Akintayo A. Olusegun <[email protected]> i18n Signed-off-by: Akintayo A. Olusegun <[email protected]> Global Settings toggle tests Signed-off-by: Akintayo A. Olusegun <[email protected]> Add new privacy settings show balance and price checker Signed-off-by: Akintayo A. Olusegun <[email protected]> New settings renderShowGasFeeEstimationBuySwapTokensToggle Signed-off-by: Akintayo A. Olusegun <[email protected]> Some css changes Signed-off-by: Akintayo A. Olusegun <[email protected]> Add other privacy links. Signed-off-by: Akintayo A. Olusegun <[email protected]> more i18n Signed-off-by: Akintayo A. Olusegun <[email protected]> Add custom network Signed-off-by: Akintayo A. Olusegun <[email protected]> Add custom IPFS gateway Signed-off-by: Akintayo A. Olusegun <[email protected]> Autodetect tokens Signed-off-by: Akintayo A. Olusegun <[email protected]> Batch account balance requests Signed-off-by: Akintayo A. Olusegun <[email protected]> Renamed batch account balance checker to useMultiAccountBalanceChecker Signed-off-by: Akintayo A. Olusegun <[email protected]> Tests Signed-off-by: Akintayo A. Olusegun <[email protected]> Fixtures buikder change Signed-off-by: Akintayo A. Olusegun <[email protected]> Fix rebase duplicate methods. Signed-off-by: Akintayo A. Olusegun <[email protected]> Added the learn more link Signed-off-by: Akintayo A. Olusegun <[email protected]> Remove Toggle All Signed-off-by: Akintayo A. Olusegun <[email protected]> Remove preferences we don't already have Signed-off-by: Akintayo A. Olusegun <[email protected]> Auto Detect NFTs Signed-off-by: Akintayo A. Olusegun <[email protected]> Make tests pass Signed-off-by: Akintayo A. Olusegun <[email protected]> Lint fixes Signed-off-by: Akintayo A. Olusegun <[email protected]> Fix locales. Signed-off-by: Akintayo A. Olusegun <[email protected]> Move settings to security section Signed-off-by: Akintayo A. Olusegun <[email protected]> Git ignore Signed-off-by: Akintayo A. Olusegun <[email protected]>
Signed-off-by: Akintayo A. Olusegun <[email protected]>
Signed-off-by: Akintayo A. Olusegun <[email protected]>
Signed-off-by: Akintayo A. Olusegun <[email protected]>
abb3b72
to
085ac44
Compare
Signed-off-by: Akintayo A. Olusegun <[email protected]>
Builds ready [1515943]
Page Load Metrics (2149 ± 105 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
highlights:storybook
|
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.
LGTM
{this.renderAutoDectectTokensToggle()} | ||
{this.renderBatchAccountBalanceRequestsToggle()} | ||
{this.renderCollectibleDetectionToggle()} | ||
</div> | ||
{this.renderMetaMetricsOptIn()} |
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 believe we're missing the title Usage
above this line.
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.
@darkwing if you mean the <span className="settings-page__security-tab-sub-header">
, it was decided that we should leave this like that.
Explanation
Reorganize settings so that all privacy related settings are easily discoverable, understood and toggleable.
Some settings (e.g Enhanced Token Detection) are in advanced tab, they should be moved to Security and Privacy Tab
There should also be a toggle to switch off/on all security and privacy toggles.
Screenshots/Screencaps
Before
After
Manual Testing Steps
Pre-merge author checklist
Pre-merge reviewer checklist
If further QA is required (e.g. new feature, complex testing steps, large refactor), add the
Extension QA Board
label.In this case, a QA Engineer approval will be be required.