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

Rewards 3.0 android #26945

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Rewards 3.0 android #26945

wants to merge 20 commits into from

Conversation

deeppandya
Copy link
Contributor

@deeppandya deeppandya commented Dec 9, 2024

Resolves brave/brave-browser#38434
Resolves brave/brave-browser#42273

Submitter Checklist:

  • I confirm that no security/privacy review is needed and no other type of reviews are needed, or that I have requested them
  • 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 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:

@deeppandya deeppandya added this to the 1.75.x - Nightly milestone Dec 9, 2024
@deeppandya deeppandya self-assigned this Dec 9, 2024
Copy link
Contributor

@samartnik samartnik left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Collaborator

@vadimstruts vadimstruts left a comment

Choose a reason for hiding this comment

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

LGTM

@deeppandya deeppandya marked this pull request as ready for review December 11, 2024 15:27
@deeppandya deeppandya requested review from a team as code owners December 11, 2024 15:27
@deeppandya deeppandya marked this pull request as draft December 16, 2024 17:00
@deeppandya deeppandya force-pushed the rewards_3.0_android branch 2 times, most recently from ffa5e43 to e0a1e45 Compare January 3, 2025 20:08
@deeppandya deeppandya marked this pull request as ready for review January 3, 2025 20:08
@deeppandya deeppandya requested a review from a team as a code owner January 3, 2025 20:08
@deeppandya deeppandya changed the title Rewards 3.0 android [WIP] Rewards 3.0 android Jan 23, 2025
@deeppandya deeppandya marked this pull request as draft January 23, 2025 19:56
@deeppandya deeppandya force-pushed the rewards_3.0_android branch 2 times, most recently from ba637da to 19caaef Compare January 26, 2025 00:03
Copy link
Contributor

Chromium major version is behind target branch (132.0.6834.111 vs 133.0.6943.27). Please rebase.

@github-actions github-actions bot added the chromium-version-mismatch The Chromium version on the PR branch does not match the version on the target branch label Jan 27, 2025
@github-actions github-actions bot removed the chromium-version-mismatch The Chromium version on the PR branch does not match the version on the target branch label Jan 28, 2025
@deeppandya deeppandya force-pushed the rewards_3.0_android branch 3 times, most recently from 2dfc44b to 6d3daac Compare February 4, 2025 20:27
@deeppandya deeppandya changed the title [WIP] Rewards 3.0 android Rewards 3.0 android Feb 4, 2025
@deeppandya deeppandya requested a review from samartnik February 4, 2025 20:28
Copy link
Contributor

Chromium major version is behind target branch (133.0.6943.98 vs 134.0.6998.15). Please rebase.

@github-actions github-actions bot added the chromium-version-mismatch The Chromium version on the PR branch does not match the version on the target branch label Feb 18, 2025
@github-actions github-actions bot removed the chromium-version-mismatch The Chromium version on the PR branch does not match the version on the target branch label Feb 19, 2025
Copy link
Contributor

[puLL-Merge] - brave/brave-core@26945

Description

This PR introduces a new full-screen custom tab activity for displaying Brave Rewards pages on Android. It includes feature flags for enabling a new Rewards UI and additions to handle publisher information more comprehensively. The changes primarily focus on creating a better user experience for interacting with Brave Rewards.

Changes

Changes

  1. New Files:
  • FullScreenCustomTabActivity.java - Custom tab activity for full-screen display of rewards pages
  • FullScreenCustomTabRootUiCoordinator.java - Coordinator for managing the UI of full-screen custom tabs
  • rewards_page_helper.cc/h - Native helper for opening rewards pages
  1. Modified Files:
  • BraveFeatureList.java - Added NEW_REWARDS_UI_FEATURE flag
  • BraveRewardsHelper.java - Added method to check if new rewards UI should be shown
  • BraveRewardsNativeWorker.java - Updated publisher observer interface to include publisher ID
  • BraveToolbarLayoutImpl.java - Added support for new rewards page display mechanism
  • AndroidManifest.xml - Added declaration for FullScreenCustomTabActivity
  • Various build files updated to include new components
  1. Feature Additions:
  • New full-screen custom tab implementation
  • Publisher ID tracking in rewards interface
  • Smooth transitions for rewards page display
  • Feature flag control for new rewards UI
sequenceDiagram
    participant User
    participant ToolbarLayout
    participant RewardsHelper
    participant CustomTab
    participant NativeWorker

    User->>ToolbarLayout: Clicks rewards button
    ToolbarLayout->>RewardsHelper: shouldShowNewRewardsUI()
    alt New UI Enabled
        RewardsHelper-->>ToolbarLayout: true
        ToolbarLayout->>CustomTab: showRewardsPage()
        CustomTab->>User: Displays full-screen rewards
    else Legacy UI
        RewardsHelper-->>ToolbarLayout: false
        ToolbarLayout->>User: Shows rewards popup
    end

    NativeWorker->>ToolbarLayout: onFrontTabPublisherChanged
    ToolbarLayout->>ToolbarLayout: updateVerifiedPublisherMark
Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants