From bbfd26c9fb92f2082fc13788600f0282a875321c Mon Sep 17 00:00:00 2001 From: zenparsing Date: Wed, 8 Jan 2025 13:52:52 -0500 Subject: [PATCH] [Rewards 3.0] Fix minor UI issues - Remove the "view all" link from the community card - Reduce the modal animation duration - Do not allow wrapping of recurring tip BAT amount --- browser/ui/webui/brave_rewards/rewards_page_data_source.cc | 1 - .../rewards_page/components/explore/community_card.tsx | 6 ------ .../components/home/recurring_contribution_card.style.ts | 1 + .../resources/rewards_page/components/modal.style.ts | 2 +- .../resources/rewards_page/lib/locale_strings.ts | 1 - .../resources/rewards_page/stories/storybook_model.ts | 2 +- .../resources/rewards_page/stories/storybook_strings.ts | 1 - components/resources/rewards_strings.grdp | 3 --- 8 files changed, 3 insertions(+), 14 deletions(-) diff --git a/browser/ui/webui/brave_rewards/rewards_page_data_source.cc b/browser/ui/webui/brave_rewards/rewards_page_data_source.cc index afde1bdb4c80..8fe750a42a08 100644 --- a/browser/ui/webui/brave_rewards/rewards_page_data_source.cc +++ b/browser/ui/webui/brave_rewards/rewards_page_data_source.cc @@ -266,7 +266,6 @@ static constexpr webui::LocalizedString kStrings[] = { {"tosUpdateLink", IDS_REWARDS_TOS_UPDATE_LINK_TEXT}, {"tosUpdateRequiredText", IDS_REWARDS_TOS_UPDATE_TEXT}, {"tosUpdateRequiredTitle", IDS_REWARDS_TOS_UPDATE_HEADING}, - {"viewAllLink", IDS_REWARDS_VIEW_ALL_LINK}, {"viewStoreLink", IDS_REWARDS_VIEW_STORE_LINK}, {"wdpCheckboxLabel", IDS_REWARDS_WDP_CHECKBOX_LABEL}, {"wdpOptInText", IDS_REWARDS_WDP_OPT_IN_TEXT}, diff --git a/components/brave_rewards/resources/rewards_page/components/explore/community_card.tsx b/components/brave_rewards/resources/rewards_page/components/explore/community_card.tsx index 1a5944536ec0..c7b6cbd15979 100644 --- a/components/brave_rewards/resources/rewards_page/components/explore/community_card.tsx +++ b/components/brave_rewards/resources/rewards_page/components/explore/community_card.tsx @@ -7,9 +7,6 @@ import * as React from 'react' import { useLocaleContext } from '../../lib/locale_strings' import { useAppState } from '../../lib/app_model_context' import { CardItemView } from './card_item_view' -import { NewTabLink } from '../../../shared/components/new_tab_link' - -import * as urls from '../../../shared/lib/rewards_urls' export function CommunityCard() { const { getString } = useLocaleContext() @@ -28,9 +25,6 @@ export function CommunityCard() {

{getString('communityTitle')} - - {getString('viewAllLink')} -

{card.items.map((item, i) => )} diff --git a/components/brave_rewards/resources/rewards_page/components/home/recurring_contribution_card.style.ts b/components/brave_rewards/resources/rewards_page/components/home/recurring_contribution_card.style.ts index 3becac45d8f3..aa536131bbd8 100644 --- a/components/brave_rewards/resources/rewards_page/components/home/recurring_contribution_card.style.ts +++ b/components/brave_rewards/resources/rewards_page/components/home/recurring_contribution_card.style.ts @@ -77,6 +77,7 @@ export const style = scoped.css` .amount { color: ${color.text.secondary}; text-align: right; + text-wrap: nowrap; } .exchange-amount { diff --git a/components/brave_rewards/resources/rewards_page/components/modal.style.ts b/components/brave_rewards/resources/rewards_page/components/modal.style.ts index c1a4b0f06911..f65529221549 100644 --- a/components/brave_rewards/resources/rewards_page/components/modal.style.ts +++ b/components/brave_rewards/resources/rewards_page/components/modal.style.ts @@ -8,7 +8,7 @@ import { scoped } from '../lib/scoped_css' export const modalStyle = scoped.css` & { - --self-animation-duration: 250ms; + --self-animation-duration: 120ms; --modal-header-padding-bottom: 32px; --modal-padding: 32px; diff --git a/components/brave_rewards/resources/rewards_page/lib/locale_strings.ts b/components/brave_rewards/resources/rewards_page/lib/locale_strings.ts index addd5f206797..3ef4655f8e82 100644 --- a/components/brave_rewards/resources/rewards_page/lib/locale_strings.ts +++ b/components/brave_rewards/resources/rewards_page/lib/locale_strings.ts @@ -192,7 +192,6 @@ export type StringKey = 'tosUpdateRequiredText' | 'tosUpdateRequiredTitle' | 'unconnectedAdsViewedText' | - 'viewAllLink' | 'viewStoreLink' | 'wdpCheckboxLabel' | 'wdpOptInText' | diff --git a/components/brave_rewards/resources/rewards_page/stories/storybook_model.ts b/components/brave_rewards/resources/rewards_page/stories/storybook_model.ts index 5d91c697be06..6d71e0d793ef 100644 --- a/components/brave_rewards/resources/rewards_page/stories/storybook_model.ts +++ b/components/brave_rewards/resources/rewards_page/stories/storybook_model.ts @@ -80,7 +80,7 @@ export function createModel(): AppModel { url: 'https://brave.com', platform: 'youtube' }, - amount: 1.5, + amount: 0.025, nextContributionDate: Date.now() } ], diff --git a/components/brave_rewards/resources/rewards_page/stories/storybook_strings.ts b/components/brave_rewards/resources/rewards_page/stories/storybook_strings.ts index 22c816b60357..4de040eb1817 100644 --- a/components/brave_rewards/resources/rewards_page/stories/storybook_strings.ts +++ b/components/brave_rewards/resources/rewards_page/stories/storybook_strings.ts @@ -190,7 +190,6 @@ export const localeStrings: { [K in StringKey]: string } = { tosUpdateRequiredText: 'We’ve updated the Terms of Service for Brave Rewards. We’ve made these updates to clarify our terms and ensure they cover new features. If you continue to use Brave Rewards, you are agreeing to the updated Terms of Service. If you do not agree, you can $1reset$2 Brave Rewards, which will disable the feature.', tosUpdateRequiredTitle: 'Updated Terms of Service', unconnectedAdsViewedText: 'You\'ve seen $1# Ads$2 this month', - viewAllLink: 'View all', viewStoreLink: 'View Store', wdpCheckboxLabel: 'Yes, I’d also like to contribute to Brave Search and opt in to $1Web Discovery Project$2.', wdpOptInText: 'Contribute some anonymous search and browsing data to refine Brave Search with Web Discovery Project. It’s completely open-source.', diff --git a/components/resources/rewards_strings.grdp b/components/resources/rewards_strings.grdp index 19a4560231ad..42e037861299 100644 --- a/components/resources/rewards_strings.grdp +++ b/components/resources/rewards_strings.grdp @@ -946,9 +946,6 @@ Brave merch store - - View all - View Store