-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor FXIOS-7337 [v120] update copy and layout for the fakespot re…
…liability card (#16577) * Refactor FXIOS-7337 [v119] update copy and layout for the fakespot reliability card (#16267) * updated FakespotReliabilityCardView as well * addressed PR comments * updated to semibolds in the FakespotReliabilityCardView * updated collapsible card title font weight * fix merge issue * moved PartnerWebsites and added the bold strings to localizations * updated bolded strings * renamed the MarkupAttributeUtility instance and moved the attributedString attribution to the view configuration method * removed redundant lines * replaced the font with the one added in the UX struct * Fix warning * Fix unit tests --------- Co-authored-by: Stefan Vladut <[email protected]> Co-authored-by: Winnie Teichmann <[email protected]>
- Loading branch information
1 parent
3078011
commit 0f76c19
Showing
10 changed files
with
93 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/ | ||
|
||
import Foundation | ||
|
||
public enum PartnerWebsite: String, CaseIterable { | ||
case amazon | ||
case walmart | ||
case bestbuy | ||
|
||
var title: String { | ||
switch self { | ||
case .bestbuy: return "Best Buy" | ||
default: return self.rawValue.capitalized | ||
} | ||
} | ||
|
||
var orderWebsites: [String] { | ||
let currentPartnerWebsites = PartnerWebsite.allCases.map { $0.title } | ||
|
||
// make sure current website is first | ||
var websitesOrder = currentPartnerWebsites.filter { $0 != self.title } | ||
websitesOrder.insert(self.title, at: 0) | ||
|
||
return websitesOrder | ||
} | ||
|
||
init?(for siteName: String?) { | ||
guard let siteName = siteName, let partner = PartnerWebsite(rawValue: siteName) else { | ||
return nil | ||
} | ||
|
||
self = partner | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.