Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

add right-click to delete ledger entry, add Bravery site settings page #4118

Merged
merged 4 commits into from
Sep 20, 2016

Conversation

diracdeltas
Copy link
Member

@diracdeltas diracdeltas commented Sep 19, 2016

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).

Fix #2545

Test Plan:

  1. browse to some sites and change the Brave settings on them
  2. go to about:preferences#shields, and verify that the changed settings appear there
  3. change the bravery global defaults and verify that the changed settings disappear

Fix #3829

Test plan:

  1. go to about:preferences#security
  2. right click on a site and select 'never include this site'
  3. make sure the entry disappears from the table

Auditors: @bbondy @mrose17

Test plan:
1. go to about:preferences#security
2. right click on a site and select 'never include this site'
3. make sure the entry disappears from the table

Fix #3829
Fix #2545

Test Plan:
1. browse to some sites and change the Brave settings on them
2. go to about:preferences#shields, and verify that the changed settings appear there
3. change the bravery global defaults and verify that the changed settings disappear
@@ -111,6 +111,18 @@ const doAction = (action) => {
if (action.key === settings.PAYMENTS_CONTRIBUTION_AMOUNT) return setPaymentInfo(action.value)
break

case appConstants.APP_CHANGE_SITE_SETTING:
if (action.key === 'ledgerPaymentsShown') {
// TODO
Copy link
Member Author

Choose a reason for hiding this comment

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

@mrose17 if action.value === false then the user has right-clicked to delete a ledger synopsis entry


case appConstants.APP_REMOVE_SITE_SETTING:
if (action.key === 'ledgerPaymentsShown') {
// TODO
Copy link
Member Author

Choose a reason for hiding this comment

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

@mrose17 this event indicates that a deleted ledger synopsis entry has been un-deleted so it should be included again

.waitUntil(function () {
return this.getText('div').then((val) => val === 'done')
})
.windowByUrl(Brave.browserWindowUrl)
Copy link
Member Author

Choose a reason for hiding this comment

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

@mrose17 this test seems to not pass because the ledger is still requiring us to be on the page for 8 seconds even though process.env.NODE_ENV === 'test'. i.e., if you add a .debug() here and wait for at least 8 seconds, then the page shows up on about:preferences as expected.

Copy link
Member

@mrose17 mrose17 left a comment

Choose a reason for hiding this comment

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

i pushed a few changes to correspond to my comments. please let me know your thoughts... thanks!

@@ -111,6 +111,18 @@ const doAction = (action) => {
if (action.key === settings.PAYMENTS_CONTRIBUTION_AMOUNT) return setPaymentInfo(action.value)
break

case appConstants.APP_CHANGE_SITE_SETTING:
if (action.key === 'ledgerPaymentsShown') {
// TODO
Copy link
Member

Choose a reason for hiding this comment

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

thanks. that's easy to handle.

@@ -967,7 +979,9 @@ var run = (delayTime) => {
var result
var siteSetting = siteSettings.get(`https?://${winner}`)

if ((siteSetting) && (siteSetting.get('ledgerPayments') === false)) return
if ((siteSetting) &&
Copy link
Member

Choose a reason for hiding this comment

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

i don't think this change is needed given my change. do you agree?

Copy link
Member

Choose a reason for hiding this comment

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

pls do in an audit, will merge so we can get it in builds.

Copy link
Member Author

Choose a reason for hiding this comment

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

seems ok

Copy link
Member

Choose a reason for hiding this comment

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

@bbondy - just so i'm on the same page: the change here doesn't break anything, i merely believe that it is unnecessary. there's no harm in keeping it...

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

Successfully merging this pull request may close these issues.

4 participants