-
Notifications
You must be signed in to change notification settings - Fork 971
Conversation
docs/state.md
Outdated
@@ -163,6 +163,7 @@ AppStore | |||
'advanced.default-zoom-level': number, // the default zoom level for sites that have no specific setting | |||
'advanced.hardware-acceleration-enabled': boolean, // false if hardware acceleration should be explicitly disabled | |||
'advanced.hide-excluded-sites': boolean, // whether to hide excluded sites in the payments list | |||
'advanced.show-less-sites': boolean, // whether to show less sites in the payments list |
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
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.
d -> ha -> hi -> s
, which is not alphabetically?
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 thought hide-excluded-sites
and show-less-sites
should be grouped.
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.
all properties in state.md
should be sorted alphabetically
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.
now is d -> ha -> hi -> s -> m
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.
all properties in state.md should be sorted alphabetically
so should be ones in appConfig.js right? working on it.
'payments.notificationTryPaymentsDismissed': boolean, // true if you dismiss the message or enable Payments | ||
'payments.sites-auto-suggest': boolean, // show auto suggestion | ||
'payments.sites-hide-excluded': boolean, // whether to hide excluded sites in the payments list | ||
'payments.sites-show-less': boolean, // whether to show less sites in the payments list |
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.
Renamed above 3 ones to group semantically
Codecov Report
@@ Coverage Diff @@
## master #10164 +/- ##
=======================================
Coverage 52.79% 52.79%
=======================================
Files 227 227
Lines 20214 20214
Branches 3236 3236
=======================================
Hits 10672 10672
Misses 9542 9542
|
Also: - Rename constants to sort them not only alphabetically but semantically - Add lacking states to docs/state.md Closes #10158 Auditors: Test Plan: 1. Run `npm run add-simulated-synopsis-visits 100` 2. Open about:preferences#payments 3. Click `Show All` button 4. Click `Show Less` button 5. Make sure the buttons work
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 on const names look way more readable. also nice work on docs.
I'm having some ledger tests failing but seems unrelated to this PR so ++
also moving to 0.21.x |
the milestone was moved: #10164 (comment) |
@luixxiul I believe we have a problem here We can't update the names of the preferences if they are already in production. People already have an existing value and this value is lost completely when they upgrade Steps to reproduce:
I checked the other values and they all kept the same name (which is good). We have to be careful about changing the names of any existing preferences. In sessionStore.js, there is a place where you can handle this migration: browser-laptop/app/sessionStore.js Line 465 in 0c57538
cc: @cezaraugusto |
The fix would look something like:
If you wanted to keep the old value (and constant), you could move the old value here: browser-laptop/js/constants/settings.js Line 89 in 821b207
All settings stored here are no longer used. We can't ignore them though, because folks could be upgrading from an old version. |
sorry I was unaware of that and thanks for the heads-up. I'll came along with a follow-up to avoid revert. |
@bsclifton thanks for the heads-up from me too. @cezaraugusto thanks in advance :-) |
@cezaraugusto you may check out the conversation in #10181 (comment) for a proposal that would solve this issue too 😄 |
We're running into issues and unfortunately, this PR is causing issues with the BAT Mercury work (since settings were renamed). I'm going to pull this into 0.19.x |
…BAT Mercury. Details: Because the settings were renamed, git didn't properly handle changes when cherry-picking backwards. This caused the code in 0.19.x and 0.20.x to use the naming from 0.21.x Merge pull request #10164 from luixxiul/polish-hideLower Replace hideLower with showLess f0d9c3d Merge pull request #10441 from brave/10322 add support for legacy ledger settings 052277d Also includes fixes from 9ad7b4f (most of this commit was already backported, just grabbed the settings migration fixes) Auditors: @NejcZdovc, @luixxiul, @cezaraugusto Fixes #11261 Fixes #11260 Fixes #11250 Fixes #11246 Fixes #11263
…BAT Mercury. Details: Because the settings were renamed, git didn't properly handle changes when cherry-picking backwards. This caused the code in 0.19.x and 0.20.x to use the naming from 0.21.x Merge pull request #10164 from luixxiul/polish-hideLower Replace hideLower with showLess f0d9c3d Merge pull request #10441 from brave/10322 add support for legacy ledger settings 052277d Also includes fixes from 9ad7b4f (most of this commit was already backported, just grabbed the settings migration fixes) Auditors: @NejcZdovc, @luixxiul, @cezaraugusto Fixes #11261 Fixes #11260 Fixes #11250 Fixes #11246 Fixes #11263
Based on the discussion on Slack.
Also:
Closes #10158
Auditors:
Test Plan:
npm run add-simulated-synopsis-visits 100
Show All
buttonShow Less
buttonSubmitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
Tests