-
Notifications
You must be signed in to change notification settings - Fork 973
Conversation
Added @cezaraugusto; during our face to face, this was one that he and @mrose17 were talking about. I believe Cezar had started looking into this |
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!
Per discussion in #7451, we need to set the include flag (since it currently changes include status for items when you toggle auto include on/off- this is very confusing for the user) |
fa56568
to
c4094cd
Compare
Ok so now I did two things
This PR is ready for a second review |
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!
app/ledger.js
Outdated
result = synopsis.publishers[publisher].options.stickyP | ||
} else { | ||
result = true | ||
} | ||
appActions.changeSiteSetting(pattern, 'ledgerPayments', result) | ||
} | ||
delete synopsis.publishers[publisher].options.stickyP |
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 think you need a check here as well. With those changes synopsis.publishers[publisher]
is still undefined
at this point. App is crashing for me and pointing on that line.
Worth note: if you have a site in publisher list error doesn't happen. For publishers on exclusion list (such as Youtube), crash is intermittent. Other publishers instantly crash app.
STR: With a fresh profile (no synopsis, no session, no ledger-state), enable Payments and visit a publisher site (i.e. https://clifton.io)
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.
Ok, but why would be failing now. It was outside the if statement before this PR. It was strange for me when I was doing this change, but I left it there because it was there before. Will move it inside the if
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.
nice, let's cc @mrose17 for thoughts
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.
@cezaraugusto can you please try again. I rebase it on the master and now I don't have any crashes.
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.
thanks, no crashes this time. However I followed STR and publisher is still auto-including for me as soon as it populates payments panel.
I did a look inside publisherToggle (only part besides payments that changes publisher state) but state is only changed there if you hit urlbar icon, so it must come from ledger itself.
IMO you might want something similar to this:
https://github.com/brave/browser-laptop/pull/7289/files#diff-9b959b675446ba95e1abe0b81e0f7a9bL566
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.
It's working for me. Do you have auto include set to off in payments?
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.
yep, I removed last comment with wrong video showing STR. After your update it's working fine.
What I saw is that, if you have a clear session with a synopsis file, publishers you had previously are affected by changing auto-suggest, which should only be applied for new publishers. Note that without clearing session-store it works perfectly:
STR:
- remove session-store file
- keep ledger-synopsis.json (supposing it has publishers)
I suppose auto-include should only apply for new publishers and not for existing ones? If I'm wrong then PR is good to go ;)
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.
No this is something that needs to be fixed. I have implemented this, but it was causing a crash for some X reason (you noticed this in your first comment). So I removed it for now and will try to find another solution today
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.
@cezaraugusto I changed the logic now, can you please try it again
f7fc142
to
a9e6e4d
Compare
@bsclifton PR is ready now for a review |
2607ca4
to
d6c1bce
Compare
Resolves brave#7451 Auditors: @mrose17 Test Plan: - Enable payments in settings - Disable auto-include switch - Visit brianbondy.com in a new tab, site is added in the list and is not included Includes webdriver tests
…s-ci with brave#7773 and this broke the `uitest` task. Since the unit tests run quickly and `npm run unittest` still works great, this task isn't really needed anymore. Auditors: @NejcZdovc, @diracdeltas
0c73653
to
c8b88bb
Compare
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.
Manually tested and also ran automated tests. Everything works as expected- great job on this one 😄
git rebase -i
to squash commits (if needed).Resolves #7451
Auditors
@mrose17
Test Plan
Automated test plan
npm run test -- --grep="auto include"