-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: wrapping for semantic tokens of grids (#79)
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
- Loading branch information
Showing
13 changed files
with
139 additions
and
84 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
42 changes: 42 additions & 0 deletions
42
OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+AllGridSemanticTokens.swift
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,42 @@ | ||
// | ||
// Software Name: OUDS iOS | ||
// SPDX-FileCopyrightText: Copyright (c) Orange SA | ||
// SPDX-License-Identifier: MIT | ||
// | ||
// This software is distributed under the MIT license, | ||
// the text of which is available at https://opensource.org/license/MIT/ | ||
// or see the "LICENSE" file for more details. | ||
// | ||
// Authors: See CONTRIBUTORS.txt | ||
// Software description: A SwiftUI components library with code examples for Orange Unified Design System | ||
// | ||
|
||
import Foundation | ||
import OUDSTokensRaw | ||
import OUDSTokensSemantic | ||
|
||
// swiftlint:disable required_deinit | ||
|
||
/// Overrides **all** the grid semantic tokens (from its super class, i.e. `OUDSGridSemanticTokensWrapper` so as to test overriding of them (unit tests) | ||
/// and to act like smoke tests with crashing tests if some tokens disappeared. | ||
final class MockThemeGridSemanticTokensWrapper: OUDSGridSemanticTokensWrapper { | ||
|
||
static let mockThemeGridRawToken: GridRawToken = 3_630 | ||
|
||
override public var gridExtraCompactMinWidth: GridSemanticToken { Self.mockThemeGridRawToken } | ||
override public var gridExtraCompactMaxWidth: GridSemanticToken { Self.mockThemeGridRawToken } | ||
override public var gridExtraCompactMargin: GridSemanticToken { Self.mockThemeGridRawToken } | ||
override public var gridExtraCompactColumnGap: GridSemanticToken { Self.mockThemeGridRawToken } | ||
|
||
override public var gridCompactMinWidth: GridSemanticToken { Self.mockThemeGridRawToken } | ||
override public var gridCompactMaxWidth: GridSemanticToken { Self.mockThemeGridRawToken } | ||
override public var gridCompactMargin: GridSemanticToken { Self.mockThemeGridRawToken } | ||
override public var gridCompactColumnGap: GridSemanticToken { Self.mockThemeGridRawToken } | ||
|
||
override public var gridRegularMinWidth: GridSemanticToken { Self.mockThemeGridRawToken } | ||
override public var gridRegularMaxWidth: GridSemanticToken { Self.mockThemeGridRawToken } | ||
override public var gridRegularMargin: GridSemanticToken { Self.mockThemeGridRawToken } | ||
override public var gridRegularColumnGap: GridSemanticToken { Self.mockThemeGridRawToken } | ||
} | ||
|
||
// swiftlint:enable required_deinit |
File renamed without changes.
38 changes: 0 additions & 38 deletions
38
OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+GridSemanticTokens.swift
This file was deleted.
Oops, something went wrong.
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.