-
Notifications
You must be signed in to change notification settings - Fork 965
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
Conversation
components/brave_rewards/resources/page/components/arriving_soon_message.tsx
Outdated
Show resolved
Hide resolved
@@ -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> |
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.
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?
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 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...
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.
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.
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, 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.
components/brave_rewards/resources/page/components/arriving_soon_message.tsx
Outdated
Show resolved
Hide resolved
5638b7a
to
25b1ec3
Compare
Resolves brave/brave-browser#17943
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
Updated NTP Widget message:

Updated Rewards page message:
