Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Fix #3374: Add opt-in to Brave Today #3407

Merged
merged 2 commits into from
Mar 15, 2021
Merged

Fix #3374: Add opt-in to Brave Today #3407

merged 2 commits into from
Mar 15, 2021

Conversation

kylehickinson
Copy link
Collaborator

@kylehickinson kylehickinson commented Mar 12, 2021

Summary of Changes

This pull request fixes #3374
This pull request fixes #3290

Submitter Checklist:

  • Unit Tests are updated to cover new or changed functionality
  • User-facing strings use NSLocalizableString()

Test Plan:

  • See Brave Today Opt-In Spec in Drive

Screenshots:

image

Reviewer Checklist:

  • Issues include necessary QA labels:
    • QA/(Yes|No)
    • release-notes/(include|exclude)
    • bug / enhancement
  • Necessary security reviews have taken place.
  • Adequate unit test coverage exists to prevent regressions.
  • Adequate test plan exists for QA to validate (if applicable).
  • Issue is assigned to a milestone (should happen at merge time).

@kylehickinson kylehickinson added this to the 1.24 milestone Mar 12, 2021
@kylehickinson kylehickinson requested a review from a team March 12, 2021 16:30
@kylehickinson kylehickinson marked this pull request as draft March 12, 2021 16:32
@kylehickinson kylehickinson force-pushed the bt-opt-in branch 2 times, most recently from 5bd6e80 to 31fc625 Compare March 12, 2021 17:27
@kylehickinson kylehickinson marked this pull request as ready for review March 12, 2021 17:27
Copy link
Contributor

@iccub iccub left a comment

Choose a reason for hiding this comment

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

Looks good, add a comment to a NSLocalized string,
general rule I use is the less words are used in a string, the more explanation it needs

you English speakers have it easy, look at this funny example from my language,
all these words refer to word play, they differ based on sentence and context

pl_play

"today.introCardNew",
bundle: .braveShared,
value: "New",
comment: ""
Copy link
Contributor

Choose a reason for hiding this comment

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

Add comment what this new refers to, many languages use different words for it depending on context.
It should mention something like new as new feature introduced

/// Displays the word "New" with a gradient mask
private class MaskedNewLabel: UIView {
private let gradientView = GradientView(
// colors: [UIColor(rgb: 0xA78AFF), UIColor(rgb: 0xFF1893), UIColor(rgb: 0xFA7250)], // dark
Copy link
Contributor

Choose a reason for hiding this comment

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

comment

@@ -48,7 +48,16 @@ class BraveTodaySettingsViewController: TableViewController {
dataSource.sections = [
.init(
rows: [
.boolRow(title: Strings.BraveToday.isEnabledToggleLabel, option: Preferences.BraveToday.isEnabled)
.boolRow(title: Strings.BraveToday.isEnabledToggleLabel, option: Preferences.BraveToday.isEnabled, onValueChange: { value in
Copy link
Contributor

Choose a reason for hiding this comment

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

Is onValueChange handler safe without weak or unowned self here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm, no I think it'll lead to a retain cycle, will add weak/unowned

@kylehickinson
Copy link
Collaborator Author

Haha, good call on the localization comments 😆 Will fix those

@kylehickinson kylehickinson force-pushed the bt-opt-in branch 2 times, most recently from 29db501 to 104d3c9 Compare March 15, 2021 14:29
@kylehickinson kylehickinson added the blocked If a ticket is blocked for some reason, if not using a sub-block label, please provide info in issue label Mar 15, 2021
@kylehickinson kylehickinson removed the blocked If a ticket is blocked for some reason, if not using a sub-block label, please provide info in issue label Mar 15, 2021
@kylehickinson kylehickinson merged commit d0ff251 into development Mar 15, 2021
@kylehickinson kylehickinson deleted the bt-opt-in branch March 15, 2021 20:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add opt-in for Brave Today "Sources & Settings" under intro card sometimes uses grey text
3 participants