Skip to content

Clarify wording of BAT payout message #10240

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

Merged
merged 1 commit into from
Sep 27, 2021

Conversation

emerick
Copy link
Contributor

@emerick emerick commented Sep 24, 2021

Resolves brave/brave-browser#17943

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

Updated NTP Widget message:
NTP Widget

Updated Rewards page message:
Rewards Page

@emerick emerick requested a review from a team as a code owner September 24, 2021 14:38
@emerick emerick self-assigned this Sep 24, 2021
@@ -499,7 +499,8 @@
<message name="IDS_BRAVE_REWARDS_LOCAL_REDIRECT_MODAL_ERROR_WALLET" desc="">Error creating Brave Browser BAT card</message>
<message name="IDS_BRAVE_REWARDS_LOCAL_REDIRECT_MODAL_KYC_REQUIRED_TITLE" desc="">You need a verified wallet to log in</message>
<message name="IDS_BRAVE_REWARDS_LOCAL_REDIRECT_MODAL_KYC_REQUIRED_TEXT" desc="">Please try again after you have completed ID verification on <ph name="CUSTODIAN">$1<ex>Uphold</ex></ph>.</message>
<message name="IDS_BRAVE_REWARDS_PENDING_REWARDS_MESSAGE" desc=""><ph name="AMOUNT">$1<ex>+1.5 BAT</ex></ph> arriving in <ph name="DAYS">$2<ex>4 days</ex></ph></message>
<message name="IDS_BRAVE_REWARDS_PENDING_REWARDS_MESSAGE" desc="">Your <ph name="AMOUNT">$1<ex>+1.5 BAT</ex></ph> payout will begin processing in <ph name="DAYS">$2<ex>4 days</ex></ph>.</message>
Copy link
Collaborator

@zenparsing zenparsing Sep 24, 2021

Choose a reason for hiding this comment

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

There are similar strings at IDS_REWARDS_WALLET_PENDING_REWARDS_TEXT (in rewards_strings.grdp) and in messages.json ("walletPendingRewardsText") that get displayed on the rewards wallet card. Do they need to be updated as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch! I updated those messages, but now I'm seeing that we have two separate implementations for rendering this message (one for the ads box and one for the wallet summary), each with slightly different styling. Any suggestions for reconciling those?

I kind of feel like showing this message in the ads box is redundant given that it appears in the summary as well, but I guess if a user is focused on the ads section they could miss it in the summary...

Copy link
Collaborator

Choose a reason for hiding this comment

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

Turns out the pending message isn't displayed in the rewards wallet card when on the rewards page (the nextPaymentDate prop is set to zero, I think), but it is displayed on the panel.

We could try to use a common component for the messages, but since the styling is slightly different we'd need to provide a way to tweak the styling from the "outside", perhaps with CSS classes or with CSS variables. The shared component tradeoff is that the more customizable it is, and the more places it's used, the harder it is to evolve and maintain.

My intuition would be to leave them separate for now. If the strings are the same, then it probably makes sense to only use the one string (maybe get rid of the one in rewards_strings.grdp) and just have "walletPendingRewardsText" (in brave_webui_source.cc) use the common one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, makes sense and that's how I was leaning as well. Unfortunately, I had to shorten the panel message a bit to get it to fit nicely (cc: @Miyayes, followed the advice you gave on that one), so the two strings are slightly different.

@emerick emerick force-pushed the rewards-change-bat-payout-message branch from 5638b7a to 25b1ec3 Compare September 24, 2021 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change "x BAT arriving in y days" text to emphasize that payouts will begin by that time
3 participants