brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.87k stars 2.34k forks source link

Fetch promotional cards on Brave Rewards settings page from an endpoint so that they can update asynchronously #15860

Open Miyayes opened 3 years ago

Miyayes commented 3 years ago

Description

Currently, promotional cards on brave://rewards settings page (such as the TAP Network card) are hardcoded into the browser. This makes them inflexible and hard to update.

Spec

Ask @Miyayes

Miyayes commented 3 years ago

@jsecretan and @amirsaber may be able to help with infrastructure and endpoints for this?

saberistic commented 3 years ago

@Miyayes great idea. What are these cards components? Are they gonna be just an image or we want to have a combo of text and image to render on client? I imagine this could be a unit in catalog backed by PCDN

Miyayes commented 3 years ago

This is a text and image. Maybe it has to contain geo too, so the browser knows which ones to show depending on what OS region is. cc: @emerick

Current specifications: 117 x 157px image on the left, with short snippet of text on the right like pictured below:

image

emerick commented 3 years ago

Here's a sample of how we configure a promo in the client:

https://github.com/brave/brave-core/blob/master/components/brave_rewards/resources/page/promos/index.tsx#L71-L88

The components of a promo include:

saberistic commented 3 years ago

@emerick how's adding a new creative type to catalog, similar to Brave News?

@Miyayes is this opt in only? how does reporting work here?

jsecretan commented 3 years ago

FWIW, I'm much more of a fan of doing this with a non-catalog component.

Miyayes commented 3 years ago

@amirsaber I don't think there's any reporting for these. This is not related to Brave Ads or the ads system. It's just image/text that we hardcode into the brave://rewards settings page for select partners/promotions.

Miyayes commented 3 years ago

This might be superseded by the new Brave Rewards design in the Brave Wallet, so putting P5 and blocking on it for now.