Skip to content
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

Adds initialized to panel and NTP flow #6321

Merged
merged 1 commit into from
Aug 4, 2020
Merged

Conversation

NejcZdovc
Copy link
Contributor

@NejcZdovc NejcZdovc commented Aug 3, 2020

Resolves brave/brave-browser#11038
Resolves brave/brave-browser#11039
Resolves brave/brave-browser#10783

Submitter Checklist:

Test Plan:

plan 1:

  • defined in the issue

plan 2:

  • try to combine enabling rewards from all 3 places (NTP, panel and rewards page)

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@NejcZdovc NejcZdovc added this to the 1.14.x - Nightly milestone Aug 3, 2020
@NejcZdovc NejcZdovc self-assigned this Aug 3, 2020
@NejcZdovc NejcZdovc changed the title Adds initialized to panel flow Adds initialized to panel and NTP flow Aug 4, 2020
@NejcZdovc NejcZdovc added the CI/skip-ios Do not run CI builds for iOS label Aug 4, 2020
@NejcZdovc NejcZdovc marked this pull request as ready for review August 4, 2020 08:08
@NejcZdovc NejcZdovc requested a review from tmancey as a code owner August 4, 2020 08:08
@NejcZdovc NejcZdovc requested review from a team, emerick and zenparsing and removed request for a team August 4, 2020 08:09
Copy link
Collaborator

@tmancey tmancey left a comment

Choose a reason for hiding this comment

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

LGTM

@NejcZdovc NejcZdovc force-pushed the panel-initialized branch 2 times, most recently from e3a4bed to dd5c0ba Compare August 4, 2020 09:20
state.initializing = true

state[key] = enable
chrome.braveRewards.saveSetting(key, enable ? '1' : '0')
Copy link
Contributor

Choose a reason for hiding this comment

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

Elsewhere in our code, I see us calling chrome.send('brave_rewards.saveSetting', [key, enable.toString()]). Might be good to be consistent, unless those are two different use cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah tried to do toString, but was failing, will try again

@LaurenWags
Copy link
Member

@NejcZdovc and I had a call where we looked at PR build from https://bravesoftware.slack.com/archives/CMH8DU4TF/p1596542545348200

Generally we checked:

  • enabling BR from brave://rewards page, panel, and NTP
  • after disabling via brave://rewards page, checked re-enabling via same page, panel, and NTP
  • checked reset functionality also

We found 3 issues:

  1. intermittent race condition with the panel on reset of rewards. sometimes if you reset rewards and the panel is busy it doesn't save state properly and so instead of getting the initial panel you get the "welcome back" panel.
  2. issue with NTP widget if you're working within the same window. example: disable or reset rewards. Open a new tab and try to join back from NTP widget. It doesn't work. however, if you have two windows open and you disable/reset rewards in one and then switch to the second window and attempt to join back from NTP widget in second window, this works as expected.
  3. multiple profile issue logged separately with [Desktop] disabling Rewards for one profile when other profile(s) are running Rewards causes problem brave-browser#11074

@NejcZdovc if I missed anything please feel free to add 😄

@NejcZdovc NejcZdovc force-pushed the panel-initialized branch 2 times, most recently from 45d2c4d to 533c430 Compare August 4, 2020 15:27
@NejcZdovc NejcZdovc requested a review from emerick August 4, 2020 15:27
Copy link
Contributor

@emerick emerick left a comment

Choose a reason for hiding this comment

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

LGTM

@NejcZdovc
Copy link
Contributor Author

CI failed on unrelated browser test

@NejcZdovc NejcZdovc merged commit 7e09376 into master Aug 4, 2020
@NejcZdovc NejcZdovc deleted the panel-initialized branch August 4, 2020 18:13
@LaurenWags
Copy link
Member

Verified using

Brave | 1.14.18 Chromium: 84.0.4147.105 (Official Build) nightly (64-bit)
-- | --
Revision | a6b12dfad6663f13a7e16e9a42a6a4975374096b-refs/branch-heads/4147@{#943}
OS | macOS Version 10.14.6 (Build 18G3020)

For brave/brave-browser#11038:

For brave/brave-browser#11039:

Since brave/brave-browser#10783 is labeled QA/No, no specific checks were completed for this.

Additionally did the following checks:

  • Generally confirmed I was able to turn on Rewards from brave://rewards, panel, NTP widget
  • Generally confirmed after turning off Rewards via brave://rewards page, I could re-enable via brave://rewards, panel, NTP
  • Generally confirmed after reset of Rewards I could re-join via brave://rewards, panel, NTP widget

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/skip-ios Do not run CI builds for iOS feature/rewards
Projects
None yet
5 participants