Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAuto-include propagates correctly #7680
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 |
|
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
|
Ok so now I did two things
This PR is ready for a second review |
|
LGTM! |
| result = synopsis.publishers[publisher].options.stickyP | ||
| } else { | ||
| result = true | ||
| } | ||
| appActions.changeSiteSetting(pattern, 'ledgerPayments', result) | ||
| } | ||
| delete synopsis.publishers[publisher].options.stickyP |
This comment has been minimized.
This comment has been minimized.
cezaraugusto
Mar 15, 2017
•
Contributor
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)
This comment has been minimized.
This comment has been minimized.
NejcZdovc
Mar 15, 2017
•
Author
Member
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
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
NejcZdovc
Mar 16, 2017
Author
Member
@cezaraugusto can you please try again. I rebase it on the master and now I don't have any crashes.
This comment has been minimized.
This comment has been minimized.
cezaraugusto
Mar 16, 2017
•
Contributor
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
This comment has been minimized.
This comment has been minimized.
NejcZdovc
Mar 16, 2017
Author
Member
It's working for me. Do you have auto include set to off in payments?
This comment has been minimized.
This comment has been minimized.
cezaraugusto
Mar 16, 2017
•
Contributor
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 ;)
This comment has been minimized.
This comment has been minimized.
NejcZdovc
Mar 16, 2017
•
Author
Member
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
This comment has been minimized.
This comment has been minimized.
NejcZdovc
Mar 18, 2017
Author
Member
@cezaraugusto I changed the logic now, can you please try it again
f7fc142
to
a9e6e4d
|
@bsclifton PR is ready now for a review |
2607ca4
to
d6c1bce
…s-ci with #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
|
Manually tested and also ran automated tests. Everything works as expected- great job on this one |
This comment has been minimized.
This comment has been minimized.
|
@bsclifton I use this command a lot in the combination with |
This comment has been minimized.
This comment has been minimized.
|
I am running test now like this |

NejcZdovc commentedMar 13, 2017
•
edited by bsclifton
git rebase -ito squash commits (if needed).Resolves #7451
Auditors
@mrose17
Test Plan
Automated test plan
npm run test -- --grep="auto include"