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

Truncate decimals for whole numbers in tipping amounts in tipping banner/UI #15022

Closed
Miyayes opened this issue Mar 30, 2021 · 3 comments · Fixed by brave/brave-core#8404
Closed

Comments

@Miyayes
Copy link
Collaborator

Miyayes commented Mar 30, 2021

Description

Enforce the following logic in the tipping UI in order to better display various amounts of BAT:

  1. In the tipping banner, if the value is a whole number (e.g., 1.00 BAT, 5.00 BAT, 10.00 BAT), then truncate the decimals so that the number appears as 1 BAT, 5 BAT, 10 BAT.
  2. Otherwise, display the decimals (e.g., 0.25 BAT, 1.75 BAT, etc.)

Per design team @jenn-rhim.

@Miyayes Miyayes added OS/Android Fixes related to Android browser functionality OS/Desktop labels Mar 30, 2021
@Miyayes Miyayes changed the title Truncate decimals for whole numbers in suggested tipping amounts in tipping banner/UI Truncate decimals for whole numbers in tipping amounts in tipping banner/UI Mar 30, 2021
@Miyayes
Copy link
Collaborator Author

Miyayes commented Mar 31, 2021

Related: #15050

@zenparsing zenparsing self-assigned this Mar 31, 2021
@zenparsing zenparsing added this to the 1.24.x - Nightly milestone Apr 2, 2021
@GeetaSarvadnya GeetaSarvadnya added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Apr 19, 2021
@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Apr 19, 2021

Verification passed on

Brave | 1.24.65 Chromium: 90.0.4430.72 (Official Build) dev (64-bit)
-- | --
Revision | b6172ef8d07ef486489a4b11b66b2eaeed50d132-refs/branch-heads/4430@{#1233}
OS | Windows 10 OS Version 2004 (Build 19041.928)

Tipping via Rewards BAT - Verified publisher with default tipping banner

One-time tips with 1.37 BAT tipping amount

Ensured that 1.37 BAT One-time tipping amount is shown in tipping banner
image
image

Ensured Total One-Time tipping amount and individual pubs tipping amount is shown correctly in Tips panel
image
image

Ensured Total One-Time tipping amount and individual pubs tipping amount is shown correctly in Monthly Statement
image

Ensured that the total amount and the contributed amount is shown correctly in the Rewards internal page
image
image

One-time tips with 10.5 BAT tipping amount

Ensured that 10.5 BAT One-time tipping amount is shown in tipping banner
image
image

Ensured Total One-Time tipping amount and individual pubs tipping amount is shown correctly in Tips panel
image

Ensured Total One-Time tipping amount and individual pubs tipping amount is shown correctly in Monthly Statement
image

Ensured that the total amount and the contributed amount is shown correctly in the Rewards internal page
image
image

One-time tips with 5 BAT tipping amount

Ensured that 5 BAT One-time tipping amount is shown in tipping banner
image
image

Ensured Total One-Time tipping amount and individual pubs tipping amount is shown correctly in Tips panel
image
image

Ensured Total One-Time tipping amount and individual pubs tipping amount is shown correctly in Monthly Statement
image

Ensured that the total amount and the contributed amount is shown correctly in the Rewards internal page
image
image

One-time tips with_Tip set (1.25+5+10.5)

Ensured Tip set 1.25 BAT, 5 BAT and 10.5 BAT are displayed on the tipping banner
image

Sent One-time tips 1.25 BAT, 5 BAT, and 10.5 BAT to a verified pubs and ensured wallet balance is shown correctly
image
image

Ensured Total Monthly tipping amount and individual pubs tipping amount is shown correctly in Monthly Statement
image

Ensured that the total amount and the contributed amount is shown correctly in the Rewards internal page
image

Recurring tips with_Tip set (1.25+5+10.5)

Ensured Tip set 1.25 BAT, 5 BAT and 10.5 BAT are displayed on the tipping banner
image

Sent Recurring tips 1.25 BAT, 5 BAT, and 10.5 BAT to a verified pub and ensured wallet balance is shown correctly
image
image

Ensured Total Monthly tipping amount and individual pubs tipping amount is shown correctly in Monthly Statement
image

Ensured that the total amount and the contributed amount is shown correctly in the Rewards internal page
image

Recurring tips with 1.37 BAT tipping amount

Ensured that 1.37 BAT monthly tipping amount is shown in tipping banner
image
image

Ensured Total Monthly tipping amount and individual pubs tipping amount is shown correctly in Monthly Contributions panel
image
image
image

Ensured Total Monthly tipping amount and individual pubs tipping amount is shown correctly in Monthly Statement
image

Ensured that the total amount and the contributed amount is shown correctly in the Rewards internal page
image
image

Recurring tips with 0.25 BAT tipping amount

Ensured that 0.25 BAT monthly tipping amount is shown in tipping banner
image
image
image

Ensured Total Monthly tipping amount and individual pubs tipping amount is shown correctly in Monthly Statement
image

Ensured that the total amount and the contributed amount is shown correctly in the Rewards internal page
image
image

Recurring tips all combinations (0.25+1+5)

Differnt recurring tips sent to various publishers
image
image

Ensured Total Monthly tipping amount and individual pubs tipping amount is shown correctly in Monthly Statement
image

Ensured that the total amount and the contributed amount is shown correctly in the Rewards internal page
image

Tipping via Rewards BAT - Verified publisher with Custom tipping banner

One time tipping - Screenshots
  • Ensured that one-time tipping works as expected when we tip verified pubs with custom tipping banner
    image
    image
    image
    image
    image
Recurring tipping - Screenshots
  • Ensured that recurring tips work as expected when we tip verified pubs with custom tipping banner
    image
    image
    image
    image
    image

Tipping via Rewards BAT - Non verified publisher

Non verified pubs - Screenshots
  • Verified tips sent to non verified publisher goes to pending contributions table
    image
    image
    image
    image
    image
    image

Tipping via Uphold BAT - Verified publisher

Screenshots

Recurring tip and one-time tips sent to various publishers
image
image

Ensured Total Monthly tipping amount and individual pubs tipping amount is shown correctly in Monthly Statement
image
image
image

Ensured that the total amount and the contributed amount is shown correctly in the Rewards internal page
image
image
image

Ensured that BAT distribution among verified publisher and brave fee (5%) is shown correctly in uphold transaction list
image

Tipping via Uphold BAT_Tip set(1.25+5+10.5) - Verified publisher

Screenshots

Ensured Tip set 1.25 BAT, 5 BAT and 10.5 BAT are displayed on the tipping banner
image

Sent One-time tips 1.25 BAT, 5 BAT, and 10.5 BAT to a verified pubs
image
image

Ensured Total Monthly tipping amount and individual pubs tipping amount is shown correctly in Monthly Statement
image

Ensured that the total amount and the contributed amount is shown correctly in the Rewards internal page
image

Ensured that BAT distribution among verified publisher and brave fee (5%) is shown correctly in uphold transaction list
image

*****
Issues encountered


Verified passed with

Brave	1.24.81 Chromium: 90.0.4430.93 (Official Build) (x86_64)
Revision	4df112c29cfe9a2c69b14195c0275faed4e997a7-refs/branch-heads/4430@{#1348}
OS	macOS Version 10.15.7 (Build 19H1030)

Testing notes can be found under #15050 (comment) as the test plan is the same for this and that issue.


Verification passed on

Brave 1.24.81 Chromium: 90.0.4430.93 (Official Build) (64-bit)
Revision 4df112c29cfe9a2c69b14195c0275faed4e997a7-refs/branch-heads/4430@{#1348}
OS Ubuntu 18.04 LTS

Verification done in #15050

@srirambv
Copy link
Contributor

srirambv commented May 5, 2021

Removing Android label as Android specific issue is logged #15618

@srirambv srirambv removed the OS/Android Fixes related to Android browser functionality label May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment