Skip to content

Commit

Permalink
style: break lines to solve linter warnings (#279)
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
  • Loading branch information
pylapp committed Nov 21, 2024
1 parent 9557a47 commit 88493fa
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

/// Defines a group of all **raw tokens** related to **borders**.
/// Values are defined in *BorderRawTokens+Values.swift* file and generated by the tokenator.
/// `BorderRawTokens` are tokens to use to define *borders* of components. Several types of *raw tokens* exist to render a border: radius (`BorderRadiusRawToken`), style (`BorderStyleRawToken`) and width (`BorderWidthRawToken`).
/// `BorderRawTokens` are tokens to use to define *borders* of components.
/// Several types of *raw tokens* exist to render a border: radius (`BorderRadiusRawToken`), style (`BorderStyleRawToken`) and width (`BorderWidthRawToken`).
///
/// Primitive types such as `Double` and `String` must be used to as to allow to use `@objc` keywords in _Swift extensions_ for overriding.
/// Such tokens are packed in a _Swift enum_ so as to gather them in one object with the suitable namespace and avoid to have just constants in nothing else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

/// Defined as the group of all **raw tokens** related to **elevations**.
/// Values are defined in *ElevationRawTokens+Values.swift* file updated by the tokenator and *ElevationRawTokens+Values.swift* updated manualy by the development team.
/// `ElevationRawTokens` are tokens to use to define *elevations* , i.e. in the end box shadow effects. These tokens are used to define these effects thanks to several types: the *blur*, the *X offset* and the *Y offset*, all of them being `ElevationRawToken` type.
/// `ElevationRawTokens` are tokens to use to define *elevations* , i.e. in the end box shadow effects.
/// These tokens are used to define these effects thanks to several types: the *blur*, the *X offset* and the *Y offset*, all of them being `ElevationRawToken` type.
/// Combinations of these three values can be defined inside `ElevationCompositeRawToken` i.e. *composite tokens* defining a whil box shadow to use for elevation effect.
///
/// Primitive types such as `CGFloat` must be used to as to allow to use `@objc` keywords in extensions for overriding.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@
//

/// Defined as the group of all **raw tokens** related to **typography**.
/// Values are defined in *TypographyRawTokens+Values.swift* file generated by the tokenator and in *TypographyRawTokens+Composites.swift* updaed manualy by the develoment team.
/// `TypographyRawTokens` are tokens to use for *typography* thingss , i.e. kind of values to use to render texts. These tokens define the *font family* to apply (`TypographyFontFamilyRawToken`), the *font weight* (`TypographyFontWeightRawToken`)n the *font size* (`TypographyFontSizeRawToken`) and also the line height (`TypographyFontLineHeightRawToken`) and the *font letter spacing* (`TypographyFontLetterSpacingRawToken`).
/// Values are defined in *TypographyRawTokens+Values.swift* file generated by the tokenator and in *TypographyRawTokens+Composites.swift* updated manualy by the develoment team.
/// `TypographyRawTokens` are tokens to use for *typography* thingss , i.e. kind of values to use to render texts.
/// These tokens define:
/// - the *font family* to apply (`TypographyFontFamilyRawToken`)
/// - the *font weight* (`TypographyFontWeightRawToken`),
/// - the *font size* (`TypographyFontSizeRawToken`)
/// - the line height (`TypographyFontLineHeightRawToken`)
/// - and the *font letter spacing* (`TypographyFontLetterSpacingRawToken`).
/// Combinations of these raw tokens can be made inside `TypographyCompositeRawToken`, which are composite tokens defining in the end a specific typography to apply.
///
/// Primitive types such as `Int` and `String` must be used to as to allow to use `@objc` keywords in extensions for overriding.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

// swiftlint:disable missing_docs

/// Extracted in a separated file because *Figma* is not able to manage *composite tokens*, even if the design team tinkered them in this tool. So *Figma* cannot output such *composite tokens* to its JSON file, and then *tokenator* cannot process things which do not exist.
/// Extracted in a separated file because *Figma* is not able to manage *composite tokens*,
/// even if the design team tinkered them in this tool.
/// So *Figma* cannot output such *composite tokens* to its JSON file, and then *tokenator* cannot process things which do not exist.
extension ElevationRawTokens {

// MARK: Primitive token - Elevation - Box Shadow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

// swiftlint:disable missing_docs

/// Extracted in a separated file because *Figma* is not able to manage *composite tokens*, even if the design team tinkered them in this tool. So *Figma* cannot output such *composite tokens* to its JSON file, and then *tokenator* cannot process things which do not exist.
/// Extracted in a separated file because *Figma* is not able to manage *composite tokens*, even if the design team tinkered them in this tool.
/// So *Figma* cannot output such *composite tokens* to its JSON file, and then *tokenator* cannot process things which do not exist.
extension TypographyRawTokens {

// MARK: Primitive token - Typography - Composite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ import SwiftUI
/// // It is recommended to use the higher level version as it is less error-prone.
///
/// The case of this `MultipleElevationTokens` is quite particular because in fact it contains `ElevationCompositeRawToken` (i.e. raw tokens) instead of semantic tokens.
/// In fact only the *color* of the elevation effect vary depending to the color scheme, but in the *Figma* kit this is composite raw tokens which are defined for ligh and dark mode as only one token.
/// In fact only the *color* of the elevation effect vary depending to the color scheme,
/// but in the *Figma* kit this is composite raw tokens which are defined for ligh and dark mode as only one token.
public final class MultipleElevationTokens: NSObject, Sendable {

/// For **light** mode scheme
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ import OUDSTokensRaw
/// // Then the develoment team declares an "higher" level font letter spacing semantic token for fontLetterSpacingDisplayMedium
/// // inside TypographyMultipleSemanticTokens protocol,
/// // and defined inside OUDSTheme+TypographyMultipleSemanticTokens extension
/// var fontLetterSpacingDisplayMedium: MultipleFontLetterSpacingTokens { MultipleFontLetterSpacingTokens(compact: fontLetterSpacingDisplayMediumMobile, regular: fontLetterSpacingDisplayMediumTablet) }
/// var fontLetterSpacingDisplayMedium: MultipleFontLetterSpacingTokens {
/// MultipleFontLetterSpacingTokens(compact: fontLetterSpacingDisplayMediumMobile, regular: fontLetterSpacingDisplayMediumTablet)
/// }
///
/// // If the same value is used whatever the size class is
/// var fontLetterSpacingDisplayMedium: MultipleFontLetterSpacingTokens { MultipleFontLetterSpacingTokens(fontLetterSpacingDisplayMediumMobile) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ import OUDSTokensRaw
/// // Then the develoment team declares an "higher" level line height semantic token for fontLineHeightLabelXLarge
/// // inside TypographyMultipleSemanticTokens protocol,
/// // and defined inside OUDSTheme+TypographyMultipleSemanticTokens extension
/// var fontLineHeightLabelXLarge: MultipleFontLineHeightTokens { MultipleFontLineHeightTokens(compact: fontLineHeightLabelXLargeMobile, regular: fontLineHeightLabelXLargeTablet) }
/// var fontLineHeightLabelXLarge: MultipleFontLineHeightTokens {
/// MultipleFontLineHeightTokens(compact: fontLineHeightLabelXLargeMobile, regular: fontLineHeightLabelXLargeTablet)
/// }
///
/// // If the same value is used whatever the size class is
/// var fontLineHeightLabelXLarge: MultipleFontLineHeightTokens { MultipleFontLineHeightTokens(fontLineHeightLabelXLargeMobile) }
Expand Down

0 comments on commit 88493fa

Please sign in to comment.