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

Implement UI for Brave Ads state level targeting #2637

Merged

Conversation

tmancey
Copy link
Collaborator

@tmancey tmancey commented Jun 16, 2020

Summary of Changes

This pull request fixes #2636

Submitter Checklist:

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

Test Plan:

See brave/brave-browser#9200

Screenshots:

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).

@tmancey tmancey self-assigned this Jun 16, 2020
@tmancey
Copy link
Collaborator Author

tmancey commented Jun 16, 2020

It has been decided that state names will not be localized in the MVP

@tmancey tmancey force-pushed the brave-core-1.12.x-ios-state-level-targeting branch from 87d74ff to fb52c11 Compare June 16, 2020 15:35
Comment on lines 224 to 225
static let adsSubdivisionTargeting = NSLocalizedString("BraveRewardsAdsSubdivisionTargeting", bundle: .rewardsUI, value: "State level ad targeting", comment: "")
static let adsSubdivisionTargetingTitle = NSLocalizedString("BraveRewardsAdsSubdivisionTargetingTitle", bundle: .rewardsUI, value: "State level ad targeting", comment: "")
Copy link
Collaborator

Choose a reason for hiding this comment

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

These two strings have the same value. There a reason for having both?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

cell.label.text = Strings.adsSubdivisionTargeting

var adsSubdivisionTargetingCode: String
if state.ads.subdivisionTargetingCode == "DISABLED" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there no const definition of this on ads library side that can be used to avoid string-checking here and L232?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not at this time, however, I will raise a new issue to add an API call to detect if disabled. So recommended we add at a future date, thanks

@tmancey tmancey force-pushed the brave-core-1.12.x-ios-state-level-targeting branch 2 times, most recently from bf2011e to c2205ac Compare June 16, 2020 18:38
@tmancey tmancey force-pushed the brave-core-1.12.x-ios-state-level-targeting branch from c2205ac to ea51dec Compare June 16, 2020 18:38
@kylehickinson kylehickinson merged commit 2643cf9 into brave-core-1.12.x Jun 16, 2020
@kylehickinson kylehickinson deleted the brave-core-1.12.x-ios-state-level-targeting branch June 16, 2020 18:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants