Skip to content

Commit

Permalink
Warp design review (#1365)
Browse files Browse the repository at this point in the history
* Warp design review

* Fix tests

---------

Co-authored-by: Milad Ajilianabbasi <[email protected]>
  • Loading branch information
mohsen-schibsted and milad-schibsted authored Aug 2, 2024
1 parent 2bd2bac commit 9366f58
Show file tree
Hide file tree
Showing 120 changed files with 21 additions and 21 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ class IconTitleCellDemoView: UIView, Demoable {
var dismissKind: DismissKind { .button }

private var viewModels = [
ViewModel(title: "Favoritter", icon: UIImage(named: .favouriteAdded), iconTintColor: .text, hasChevron: true),
ViewModel(title: "Lagrede søk", icon: UIImage(named: .search), iconTintColor: .text),
ViewModel(title: "Betaling", icon: UIImage(named: .creditCard), iconTintColor: .text, hasChevron: false, externalIcon: UIImage(named: .webview).withTintColor(.text, renderingMode: .alwaysOriginal)),
ViewModel(title: "Favoritter", icon: UIImage(named: .favouriteAdded), iconTintColor: .iconSubtle, hasChevron: true),
ViewModel(title: "Lagrede søk", icon: UIImage(named: .search), iconTintColor: .iconSubtle),
ViewModel(title: "Betaling", icon: UIImage(named: .creditCard), iconTintColor: .iconSubtle, hasChevron: false, externalIcon: UIImage(named: .webview).withTintColor(.text, renderingMode: .alwaysOriginal)),
ViewModel(title: "Varslingsinnstillinger", hasChevron: true),
ViewModel(title: "Personvernerklæring", hasChevron: true),
ViewModel(title: "Innstillinger for personvern"),
Expand Down
2 changes: 1 addition & 1 deletion Demo/Sources/Components/TextView/TextViewDemoView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class TextViewDemoView: UIView {
placeholderText: String,
isScrollable: Bool = true,
hideUnderLine: Bool = false,
backgroundColor: UIColor = .backgroundInfoSubtle
backgroundColor: UIColor = .backgroundSubtle
) {
textView.placeholderText = placeholderText
textView.isScrollEnabled = isScrollable
Expand Down
2 changes: 1 addition & 1 deletion Demo/Sources/Fullscreen/ResultView/ResultDemoView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ extension ResultDemoView: TweakableDemo {
actionButtonTitle: "Prøv igjen",
icon: UIImage(named: .dissatisfiedFace),
backgroundColor: .background,
iconTintColor: .textNegative,
iconTintColor: Warp.UIToken.iconNegative,
iconBottomSpacing: Warp.Spacing.spacing300,
titleBottomSpacing: Warp.Spacing.spacing200,
iconHeight: 64
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public extension BadgeView {

public static var `default`: Self { .init(backgroundColor: Warp.UIColor.badgeInfoBackground, textColor: .text) }
public static var warning: Self { .init(backgroundColor: Warp.UIColor.badgeWarningBackground, textColor: .text) }
public static var sponsored: Self { .init(backgroundColor: Warp.UIColor.badgeSponsoredBackground, textColor: .text) } // change this to backgroundSponsored
public static var motorSmidig: Self { .init(backgroundColor: Warp.UIColor.badgePositiveBackground, textColor: .text) } // use badgePositive
public static var sponsored: Self { .init(backgroundColor: Warp.UIColor.badgeSponsoredBackground, textColor: .text) }
public static var motorSmidig: Self { .init(backgroundColor: Warp.UIColor.badgePositiveBackground, textColor: .text) }
}
}
12 changes: 6 additions & 6 deletions FinniversKit/Sources/Components/Button/Button/Button+Style.swift
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,17 @@ public extension Button.Style {
.normal: Button.StateStyle(
textColor: .textLink,
backgroundColor: .background,
borderColor: .backgroundDisabled
borderColor: .border
),
.highlighted: Button.StateStyle(
textColor: nil,
backgroundColor: .backgroundActive,
borderColor: .backgroundPrimary
borderColor: .borderActive
),
.disabled: Button.StateStyle(
textColor: .textDisabled,
backgroundColor: nil,
borderColor: .backgroundDisabled
borderColor: .borderDisabled
)
]
)
Expand All @@ -201,17 +201,17 @@ public extension Button.Style {
.normal: Button.StateStyle(
textColor: .text,
backgroundColor: .background,
borderColor: .backgroundDisabled
borderColor: .border
),
.highlighted: Button.StateStyle(
textColor: .text,
backgroundColor: .background,
borderColor: .border
borderColor: .borderActive
),
.disabled: Button.StateStyle(
textColor: .textDisabled,
backgroundColor: nil,
borderColor: .backgroundDisabled
borderColor: .borderDisabled
)
]
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public extension TextField {
return .clear

case .normal, .focus, .error:
return .backgroundInfoSubtle
return .backgroundSubtle
}
}

Expand Down
2 changes: 1 addition & 1 deletion FinniversKit/Sources/Components/TextField/TextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public class TextField: UIView {

private lazy var textFieldBackgroundView: UIView = {
let view = UIView()
view.backgroundColor = .backgroundInfoSubtle
view.backgroundColor = .backgroundSubtle
view.translatesAutoresizingMaskIntoConstraints = false
return view
}()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct TextViewComponent: UIViewRepresentable {
view.delegate = context.coordinator
view.font = .body
view.textColor = .text
view.backgroundColor = .backgroundInfoSubtle
view.backgroundColor = .backgroundSubtle
view.textContainerInset = UIEdgeInsets(top: Warp.Spacing.spacing100, left: Warp.Spacing.spacing100, bottom: Warp.Spacing.spacing100, right: Warp.Spacing.spacing100)
view.isScrollEnabled = false
return view
Expand Down
4 changes: 2 additions & 2 deletions FinniversKit/Sources/Components/TextView/TextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public class TextView: UIView {
let view = UITextView(frame: .zero, textContainer: nil)
view.font = .body
view.textColor = .text
view.backgroundColor = .backgroundInfoSubtle
view.backgroundColor = .backgroundSubtle
view.textContainerInset = UIEdgeInsets(top: 8, left: 8, bottom: 8, right: 8)
view.isScrollEnabled = false
view.delegate = self
Expand Down Expand Up @@ -120,7 +120,7 @@ public class TextView: UIView {

// MARK: - Public methods

public func configure(textViewBackgroundColor: UIColor = .backgroundInfoSubtle,
public func configure(textViewBackgroundColor: UIColor = .backgroundSubtle,
textViewTextColor: UIColor = .text,
textViewFont: UIFont = .body,
placeholderLabelTextColor: UIColor = .textDisabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class FullscreenGalleryOverlayView: UIView {
let label = Label(style: .bodyStrong)
label.translatesAutoresizingMaskIntoConstraints = false
label.numberOfLines = 0
label.textColor = .textStatic
label.textColor = .textInvertedStatic
label.textAlignment = .center
label.backgroundColor = UIColor.black.withAlphaComponent(0.4)
label.shadowOffset = CGSize(width: 1.0, height: 1.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class ExternalAdRecommendationCell: UICollectionViewCell, AdRecommendatio

private lazy var externalLinkImageView: UIImageView = {
let imageView = UIImageView(withAutoLayout: true)
imageView.image = UIImage(named: .webview).withTintColor(.icon)
imageView.image = UIImage(named: .webview).withTintColor(.iconSubtle)
return imageView
}()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class SettingsView: UIView {

lazy var tableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .grouped)
tableView.backgroundColor = .backgroundSubtle
tableView.backgroundColor = .background
tableView.separatorStyle = .none
tableView.dataSource = self
tableView.delegate = self
Expand Down

0 comments on commit 9366f58

Please sign in to comment.