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

Tipping Banner 3.0 #17647

Merged
merged 1 commit into from
Apr 17, 2023
Merged

Tipping Banner 3.0 #17647

merged 1 commit into from
Apr 17, 2023

Conversation

zenparsing
Copy link
Collaborator

@zenparsing zenparsing commented Mar 16, 2023

Resolves brave/brave-browser#28148
Resolves brave/brave-browser#23740

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
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • 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 wiki
    • npm run lint, npm run presubmit wiki, 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:

Publisher web3 URLs

Publisher data stored on the private CDN will contain a new "web3_url" field which indicates that the publisher accepts web3 contriubutions at the specified URL. A "web3-only" publisher is a publisher that does not have any verified wallet provider address (e.g. with Uphold) but does have a "web3_url". A web3-only publisher will generally appear to be verified in the UI (for instance, they will have a checkmark in the Rewards icon).

User State 1: Rewards not enabled

  • When an in-page tip icon is clicked,
    • The Rewards panel should be opened.

User State 2: Unconnected

  • When an in-page tip icon is clicked and a wallet provider is available,
    • A message should be displayed about contributions,
    • And a connect button should be displayed.
  • When an in-page tip icon is clicked and a wallet provider is not available,
    • An alternate message should be displayed about contributions,
    • And the connect button should not be displayed.

User State 3: Connected

  • When the tip panel is opened,
    • The user's BAT balance for their provider should be displayed.
  • When the tip panel is opened and the user is logged out from their wallet provider,
    • A login message should be displayed,
    • And a "Log In" button should be displayed that will take the user to the wallet provider's authorization URL.
  • When the tip panel is opened and the publisher does not have the same wallet provider as the user,
    • A "mismatch" message should be displayed.
  • When the tip panel is opened for a web3-only publisher,
    • A message should be displayed indicating that the publisher cannot accept payments from the user's wallet provider,
    • And only the "Use Web 3 Wallet" button should be displayed.
  • When the tip panel is opened for a publisher that has a web3 URL,
    • The "Use Web 3 Wallet" button should be displayed.
  • When the "Use Web 3 Wallet" button is clicked, the publisher's web3 URL should be opened in a new tab.
  • When "Send" is clicked with a valid amount,
    • The tip should be sent and the success UI should be displayed,
    • And the "Share" button should open Twitter with a "new post" prompt.
  • When "Send" is clicked and the monthly toggle is set,
    • A one-time tip should be sent,
    • And the success UI should be displayed
    • And a monthly contribution should be added to the "Monthly Contributions" list visible on the Rewards page.
  • When the tip panel is opened and a monthly contribution is already set for the publisher,
    • The tip panel should display a message indicating that a monthly contribution is already set.
  • When the Rewards panel is opened for an unverified publisher,
    • A message should be displayed stating that the publisher is not verified,
    • And the "Send Contribution" button should be disabled.
  • When the Rewards panel is opened for a verified publisher,
    • The "Send Contribution" button should be enabled.
  • When the Rewards panel is opened for a web3-only publisher,
    • The tip panel should be opened.
  • When a tip icon is clicked for an unverified publisher,
    • The Rewards panel should be opened with a message indicating the publisher is not verified,
    • And the "Send Contribution" button should be disabled.
  • When a tip icon is clicked for a web3-only publisher,
    • The tip panel should be opened.
  • When a tip icon is clicked for a verified publisher,
    • The tip panel should be opened.
  • When an error is encountered when creating a transaction with the wallet provider.
    • An error message should be displayed,
    • And a "Try Again" button should be displayed.

Users State 4: Grandfathered unconnected

  • When the tip panel is opened,
    • The user's vBAT balance should be displayed.

All other behavior should match the "Connected" state.

@github-actions github-actions bot added CI/storybook-url Deploy storybook and provide a unique URL for each build potential-layer-violation-fixes This PR touches a BUILD.gn file with check_includes=false labels Mar 16, 2023
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@zenparsing zenparsing added the CI/skip Do not run CI builds (except noplatform) label Mar 16, 2023
@zenparsing zenparsing force-pushed the ksmith-tip-panel-ui branch from 11e1093 to e8a8d55 Compare March 17, 2023 19:38
@zenparsing zenparsing removed the CI/skip Do not run CI builds (except noplatform) label Mar 20, 2023
@zenparsing zenparsing force-pushed the ksmith-tip-panel-ui branch from e8a8d55 to 4752f56 Compare March 20, 2023 20:40
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@zenparsing zenparsing force-pushed the ksmith-tip-panel-ui branch from 4752f56 to f612480 Compare March 21, 2023 01:49
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@zenparsing zenparsing force-pushed the ksmith-tip-panel-ui branch from f612480 to c6fbf84 Compare March 21, 2023 16:21
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@zenparsing zenparsing force-pushed the ksmith-tip-panel-ui branch from c6fbf84 to bf46ea4 Compare March 21, 2023 20:54
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@zenparsing zenparsing force-pushed the ksmith-tip-panel-ui branch from bf46ea4 to 041c940 Compare March 22, 2023 15:33
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@zenparsing zenparsing force-pushed the ksmith-tip-panel-ui branch from 041c940 to 4778e00 Compare March 24, 2023 14:08
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@zenparsing zenparsing force-pushed the ksmith-tip-panel-ui branch from 4778e00 to dbc3934 Compare March 27, 2023 16:32
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@zenparsing zenparsing force-pushed the ksmith-tip-panel-ui branch from dbc3934 to d0463d1 Compare March 28, 2023 16:31
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@zenparsing zenparsing force-pushed the ksmith-tip-panel-ui branch from d0463d1 to 74c6b12 Compare March 29, 2023 13:50
@zenparsing zenparsing marked this pull request as ready for review March 29, 2023 13:54
@zenparsing zenparsing requested a review from a team as a code owner March 29, 2023 13:54
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@zenparsing zenparsing force-pushed the ksmith-tip-panel-ui branch from 74c6b12 to 8d24096 Compare March 30, 2023 12:09
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

1 similar comment
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@szilardszaloki
Copy link
Collaborator

@zenparsing Just realized that there's a whole lot of code that can go away with sunsetting pending contributions. I suspect you don't want to do it in this PR. 🙂 Would you mind doing it as a follow-up, though?

Copy link
Collaborator

@mkarolin mkarolin left a comment

Choose a reason for hiding this comment

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

strings LGTM

@zenparsing zenparsing force-pushed the ksmith-tip-panel-ui branch from 4ebe088 to a5451a1 Compare April 14, 2023 18:20
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@zenparsing zenparsing force-pushed the ksmith-tip-panel-ui branch 2 times, most recently from 5801701 to c255902 Compare April 17, 2023 01:15
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@zenparsing zenparsing force-pushed the ksmith-tip-panel-ui branch from c255902 to 7c60e69 Compare April 17, 2023 14:19
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@zenparsing zenparsing merged commit 8036c7b into master Apr 17, 2023
@zenparsing zenparsing deleted the ksmith-tip-panel-ui branch April 17, 2023 17:15
@github-actions github-actions bot added this to the 1.52.x - Nightly milestone Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/storybook-url Deploy storybook and provide a unique URL for each build potential-layer-violation-fixes This PR touches a BUILD.gn file with check_includes=false
Projects
None yet
6 participants