-
Notifications
You must be signed in to change notification settings - Fork 904
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
Adds functionality to monthly contribution dropdown (Panel) #957
Conversation
components/brave_rewards/browser/extension_rewards_service_observer.h
Outdated
Show resolved
Hide resolved
@@ -1502,6 +1508,10 @@ void RewardsServiceImpl::OnTipsUpdatedData(const ledger::PublisherInfoList list) | |||
} | |||
} | |||
|
|||
void RewardsServiceImpl::AddRecurringPayment(const std::string& publisher_key, double new_amount) { |
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.
Can we just use SaveRecurringDonation
directly? So that we don't need to add new function
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.
@NejcZdovc SaveRecurringDonation
is marked private and wouldn't be accessible to brave_rewards_api
and tests
...brave_rewards/resources/extension/brave_rewards/background/reducers/rewards_panel_reducer.ts
Show resolved
Hide resolved
...brave_rewards/resources/extension/brave_rewards/background/reducers/rewards_panel_reducer.ts
Show resolved
Hide resolved
89f5191
to
1873817
Compare
.release()); | ||
|
||
std::unique_ptr<extensions::Event> event(new extensions::Event( | ||
extensions::events::BRAVE_START, |
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.
Using BRAVE_START
constant per @bridiver
onAmountChange={this.onContributionAmountChange.bind(this, publisher.publisher_key)} | ||
onIncludeInAuto={this.switchAutoContribute} | ||
/> | ||
<div style={{ height: '48px' }}></div> |
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.
This is a place holder that fills the space that would be taken up by the "Enable tips on action" component. This will be reworked once that feature is supported.
@@ -306,6 +307,7 @@ test("brave_browser_tests") { | |||
":brave_browser_tests_deps", | |||
":browser_tests_runner", | |||
"//testing/gmock", | |||
"//brave/vendor/bat-native-ledger", |
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.
Adding because it was a dependency on unit tests only, not browser tests.
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.
see comments
be4e3bc
to
0ba41c0
Compare
@ryanml please rebase |
0ba41c0
to
fb19e25
Compare
@jasonrsadler rebased |
Currently getting build failure:
|
@jasonrsadler I think you may need #985, which reverts a change that mistakenly added a ledger type to the Rewards public API. |
This might require another rebase to get building |
fb19e25
to
18f492a
Compare
@jasonrsadler rebased |
18f492a
to
a4959e8
Compare
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.
@jasonrsadler dropdown clipping is part of a larger issue, limited I believe by a chrome extension panel's capabilities. Cc: @petemill |
@ryanml if we're going to use this custom html to simulate a dropdown, then we'll need to change it to avoid the viewport / |
@petemill my mistake, I remember that was the intended approach now, which is captured as part of this issue: brave/brave-ui#126 So this problem will be addressed separately, I need to work on the above issue soon. |
clipping will be addessed separately
master (0.60.x): dcc6e31 |
Reverted from master here due to failing unit tests: |
Fixes: brave/brave-browser#2245
The brunt of the work for this was adding extension functions to support:
Adding a recurring contribution
Removing a recurring contribution
Retrieving recurring contributions
Submitter Checklist:
npm test brave_unit_tests && npm test brave_browser_tests
) ongit rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
brave.com
The above six steps should be tried in different ways with different values. Ex: Ensuring that the data persists across tabs with the same site open
Reviewer Checklist: