Skip to content

Commit

Permalink
refactor: remove border tokens radius circle and radius pill (#58)
Browse files Browse the repository at this point in the history
Closes #58

Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
  • Loading branch information
pylapp committed Sep 12, 2024
1 parent 8331d0d commit 07068a7
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 16 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [Library] "OUDSThemesCommons" product has been renamed to "OUDS"
- [Library] Update value of opacity raw token "opacity800" from 0.88 to 0.80 ([#87](https://github.com/Orange-OpenSource/ouds-ios/issues/87))
- [Library] Add missing unit tests for opacity raw tokens
### Removed

- [Library] Remove token borderRadiusPill and borderRadiusCircle ([#58](https://github.com/Orange-OpenSource/ouds-ios/issues/58))

### Fixed

Expand Down Expand Up @@ -59,7 +62,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [Library] Add raw tokens and semantic tokens for border ([#30](https://github.com/Orange-OpenSource/ouds-ios/issues/30))
- [Library] Define Swift Package architecture of library and tokens (raw and semantic) ([#33](https://github.com/Orange-OpenSource/ouds-ios/issues/33))
- [Library] Define Swift Package library for OUDS ([#46](https://github.com/Orange-OpenSource/ouds-ios/issues/46))

- [Showcase] Publication of comment on issues about new alpha build upload on TestFlight ([#56](https://github.com/Orange-OpenSource/ouds-ios/issues/56))
- [Showcase] Distribute demo app development version ([#12](https://github.com/Orange-OpenSource/ouds-ios/issues/12))
- [Showcase] Distribute demo app for feature validation ([#13](https://github.com/Orange-OpenSource/ouds-ios/issues/13))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ extension OUDSTheme: BorderSemanticTokens {
@objc open var borderRadiusShort: BorderRadiusSemanticToken { BorderRawTokens.borderRadius75 }
@objc open var borderRadiusMedium: BorderRadiusSemanticToken { BorderRawTokens.borderRadius150 }
@objc open var borderRadiusTall: BorderRadiusSemanticToken { BorderRawTokens.borderRadius300 }
@objc open var borderRadiusPill: BorderRadiusSemanticToken { BorderRawTokens.borderRadius9999 }
// TODO: How to deal with "border-radius-circle : 50%"?

// MARK: Semantic token - Border - Style

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ extension MockTheme {
override var borderRadiusShort: BorderRadiusSemanticToken { Self.mockThemeBorderRadiusRawToken }
override var borderRadiusMedium: BorderRadiusSemanticToken { Self.mockThemeBorderRadiusRawToken }
override var borderRadiusTall: BorderRadiusSemanticToken { Self.mockThemeBorderRadiusRawToken }
override var borderRadiusPill: BorderRadiusSemanticToken { Self.mockThemeBorderRadiusRawToken }

// MARK: Semantic token - Border - Style

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@ final class TestThemeOverrideOfBorderSemanticTokens: XCTestCase {
XCTAssertTrue(inheritedTheme.borderRadiusTall == MockTheme.mockThemeBorderRadiusRawToken)
}

func testInheritedThemeCanOverrideSemanticTokenBorderRadiusPill() throws {
XCTAssertNotEqual(inheritedTheme.borderRadiusPill, abstractTheme.borderRadiusPill)
XCTAssertTrue(inheritedTheme.borderRadiusPill == MockTheme.mockThemeBorderRadiusRawToken)
}

// MARK: - Semantic token - Border - Style

func testInheritedThemeCanOverrideSemanticTokenBorderStyleDefault() throws {
Expand Down
1 change: 0 additions & 1 deletion OUDS/Core/Tokens/RawTokens/Sources/BorderRawTokens.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ public enum BorderRawTokens {
public static let borderRadius500: BorderRadiusRawToken = borderBase * 5
public static let borderRadius600: BorderRadiusRawToken = borderBase * 6
public static let borderRadius800: BorderRadiusRawToken = borderBase * 8
public static let borderRadius9999: BorderRadiusRawToken = 2000

// MARK: Primitive token - Border - Style

Expand Down
4 changes: 0 additions & 4 deletions OUDS/Core/Tokens/RawTokens/Tests/BorderRawTokensTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ final class BorderRawTokensTests: XCTestCase {
XCTAssertLessThan(BorderRawTokens.borderRadius600, BorderRawTokens.borderRadius800)
}

func testBorderRadiusRawToken800LessThan9999() throws {
XCTAssertLessThan(BorderRawTokens.borderRadius800, BorderRawTokens.borderRadius9999)
}

// MARK: - Primitive token - Border - Style

/// Border styles raw tokens must be different
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ public protocol BorderSemanticTokens {
var borderRadiusShort: BorderRadiusSemanticToken { get }
var borderRadiusMedium: BorderRadiusSemanticToken { get }
var borderRadiusTall: BorderRadiusSemanticToken { get }
var borderRadiusPill: BorderRadiusSemanticToken { get }
// TODO: How to deal with "border-radius-circle"?

// MARK: - Semantic token - Border - Style

Expand Down

0 comments on commit 07068a7

Please sign in to comment.