Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Token] Spacing (semantic) modifications after Figma updates (4th of October) #156

Closed
julien-deramond opened this issue Oct 4, 2024 · 3 comments · Fixed by #175
Closed
Assignees
Labels
🧬 token Related to tokens (raws, semantics or components)

Comments

@julien-deramond
Copy link
Contributor

Description

Some modifications have been done on Figma's side. Here's a diff showing what's been modified the 4th of October by the designers.

diff --git a/build/ios/semantic/SpaceSemanticTokens.swift b/build/ios/semantic/SpaceSemanticTokens.swift
index 5dad41c..df084f7 100644
--- a/build/ios/semantic/SpaceSemanticTokens.swift
+++ b/build/ios/semantic/SpaceSemanticTokens.swift
@@ -12,36 +12,36 @@
 // 
 
 public enum SpaceSemanticTokens {
-    public static let spaceScaledTabletTallest = dimension600
-    public static let spaceScaledTabletTaller = dimension500
-    public static let spaceScaledTabletTall = dimension400
-    public static let spaceScaledTabletSpacious = dimension700
-    public static let spaceScaledTabletSmash = dimension50
-    public static let spaceScaledTabletShortest = dimension100
-    public static let spaceScaledTabletShorter = dimension150
-    public static let spaceScaledTabletShort = dimension200
-    public static let spaceScaledTabletNone = dimension0
-    public static let spaceScaledTabletMedium = dimension300
-    public static let spaceScaledMobileTallest = dimension500
-    public static let spaceScaledMobileTaller = dimension400
-    public static let spaceScaledMobileTall = dimension300
-    public static let spaceScaledMobileSpacious = dimension600
-    public static let spaceScaledMobileSmash = dimension25
-    public static let spaceScaledMobileShortest = dimension50
-    public static let spaceScaledMobileShorter = dimension100
-    public static let spaceScaledMobileShort = dimension150
-    public static let spaceScaledMobileNone = dimension0
-    public static let spaceScaledMobileMedium = dimension200
-    public static let spaceScaledDesktopTallest = dimension700
-    public static let spaceScaledDesktopTaller = dimension600
-    public static let spaceScaledDesktopTall = dimension500
-    public static let spaceScaledDesktopSpacious = dimension800
-    public static let spaceScaledDesktopSmash = dimension50
-    public static let spaceScaledDesktopShortest = dimension100
-    public static let spaceScaledDesktopShorter = dimension200
-    public static let spaceScaledDesktopShort = dimension300
-    public static let spaceScaledDesktopNone = dimension0
-    public static let spaceScaledDesktopMedium = dimension400
+    public static let spaceScaledTallestTablet = dimension600
+    public static let spaceScaledTallestMobile = dimension500
+    public static let spaceScaledTallestDesktop = dimension700
+    public static let spaceScaledTallerTablet = dimension500
+    public static let spaceScaledTallerMobile = dimension400
+    public static let spaceScaledTallerDesktop = dimension600
+    public static let spaceScaledTallTablet = dimension400
+    public static let spaceScaledTallMobile = dimension300
+    public static let spaceScaledTallDesktop = dimension500
+    public static let spaceScaledSpaciousTablet = dimension700
+    public static let spaceScaledSpaciousMobile = dimension600
+    public static let spaceScaledSpaciousDesktop = dimension800
+    public static let spaceScaledSmashTablet = dimension50
+    public static let spaceScaledSmashMobile = dimension25
+    public static let spaceScaledSmashDesktop = dimension50
+    public static let spaceScaledShortestTablet = dimension100
+    public static let spaceScaledShortestMobile = dimension50
+    public static let spaceScaledShortestDesktop = dimension100
+    public static let spaceScaledShorterTablet = dimension150
+    public static let spaceScaledShorterMobile = dimension100
+    public static let spaceScaledShorterDesktop = dimension200
+    public static let spaceScaledShortTablet = dimension200
+    public static let spaceScaledShortMobile = dimension150
+    public static let spaceScaledShortDesktop = dimension300
+    public static let spaceScaledNoneTablet = dimension0
+    public static let spaceScaledNoneMobile = dimension0
+    public static let spaceScaledNoneDesktop = dimension0
+    public static let spaceScaledMediumTablet = dimension300
+    public static let spaceScaledMediumMobile = dimension200
+    public static let spaceScaledMediumDesktop = dimension400
     public static let spaceFixedTallest = dimension500
     public static let spaceFixedTallest = dimension500
     public static let spaceFixedTaller = dimension400
     public static let spaceFixedTall = dimension300
@@ -66,22 +66,24 @@ public enum SpaceSemanticTokens {
     public static let spaceRowGapShort = dimension9xs
     public static let spaceRowGapNone = dimensionNone
     public static let spaceRowGapMedium = dimension8xs
-    public static let spacePaddingInlineWithIconTallest = dimension3xs
-    public static let spacePaddingInlineWithIconTaller = dimension5xs
-    public static let spacePaddingInlineWithIconTall = dimension7xs
-    public static let spacePaddingInlineWithIconShorter = dimension10xs
-    public static let spacePaddingInlineWithIconShort = dimension9xs
+    public static let spacePaddingInlineWithIconTallest = dimension2xs
+    public static let spacePaddingInlineWithIconTaller = dimension3xs
+    public static let spacePaddingInlineWithIconTall = dimension5xs
+    public static let spacePaddingInlineWithIconShortest = dimension10xs
+    public static let spacePaddingInlineWithIconShorter = dimension9xs
+    public static let spacePaddingInlineWithIconShort = dimension8xs
     public static let spacePaddingInlineWithIconNone = dimensionNone
-    public static let spacePaddingInlineWithIconMedium = dimension8xs
+    public static let spacePaddingInlineWithIconMedium = dimension7xs
     public static let spacePaddingInlineWithArrowTallest = dimension3xs
-    public static let spacePaddingInlineWithArrowTaller = dimension5xs
-    public static let spacePaddingInlineWithArrowTall = dimension7xs
-    public static let spacePaddingInlineWithArrowShorter = dimension10xs
-    public static let spacePaddingInlineWithArrowShort = dimension9xs
+    public static let spacePaddingInlineWithArrowTaller = dimension4xs
+    public static let spacePaddingInlineWithArrowTall = dimension6xs
+    public static let spacePaddingInlineWithArrowShortest = dimension10xs
+    public static let spacePaddingInlineWithArrowShorter = dimension9xs
+    public static let spacePaddingInlineWithArrowShort = dimension8xs
     public static let spacePaddingInlineWithArrowNone = dimensionNone
-    public static let spacePaddingInlineWithArrowMedium = dimension8xs
-    public static let spacePaddingInlineTallest = dimensionMd
-    public static let spacePaddingInlineTaller = dimensionXs
+    public static let spacePaddingInlineWithArrowMedium = dimension7xs
+    public static let spacePaddingInlineTallest = dimensionXs
+    public static let spacePaddingInlineTaller = dimension2xs
     public static let spacePaddingInlineTall = dimension3xs
     public static let spacePaddingInlineShorter = dimension9xs
     public static let spacePaddingInlineShort = dimension7xs

Sorry, the parser is not yet able to handle transitivity (that's why there are values such as "dimension7xs", etc.). Here's the mapping table to help you understand the modifications based on what you have in the library:

public static let dimensionXs = dimension400
public static let dimensionXl = dimension600
public static let dimensionSm = dimension450
public static let dimensionNone = dimension0
public static let dimensionMd = dimension500
public static let dimensionLg = dimension550
public static let dimension9xs = dimension50
public static let dimension9xl = dimension1400
public static let dimension8xs = dimension75
public static let dimension8xl = dimension1200
public static let dimension7xs = dimension100
public static let dimension7xl = dimension1000
public static let dimension6xs = dimension150
public static let dimension6xl = dimension900
public static let dimension5xs = dimension200
public static let dimension5xl = dimension800
public static let dimension4xs = dimension250
public static let dimension4xl = dimension750
public static let dimension3xs = dimension300
public static let dimension3xl = dimension700
public static let dimension2xs = dimension350
public static let dimension2xl = dimension650
public static let dimension11xl = dimension1800
public static let dimension10xs = dimension25
public static let dimension10xl = dimension1600
@pylapp pylapp self-assigned this Oct 4, 2024
@pylapp pylapp changed the title Spacing (semantic) modifications after Figma updates (4th of October) [Token] Spacing (semantic) modifications after Figma updates (4th of October) Oct 4, 2024
@pylapp pylapp added the 🧬 token Related to tokens (raws, semantics or components) label Oct 7, 2024
@pylapp
Copy link
Member

pylapp commented Oct 7, 2024

@julien-deramond FYI here is the output of the update Swift files :)

The tokens car refer to other dimension semantic token, no need of transitivity

    @objc open var spacePaddingInlineWithIconNone: SpacingPaddingInlineSemanticToken { dimensionNone }
    @objc open var spacePaddingInlineWithIconShortest: SpacingPaddingInlineSemanticToken { dimension10XS }
    @objc open var spacePaddingInlineWithIconShorter: SpacingPaddingInlineSemanticToken { dimension9XS }
    @objc open var spacePaddingInlineWithIconShort: SpacingPaddingInlineSemanticToken { dimension8XS }
    @objc open var spacePaddingInlineWithIconMedium: SpacingPaddingInlineSemanticToken { dimension7XS }
    @objc open var spacePaddingInlineWithIconTall: SpacingPaddingInlineSemanticToken { dimension5XS }
    @objc open var spacePaddingInlineWithIconTaller: SpacingPaddingInlineSemanticToken { dimension3XS }
    @objc open var spacePaddingInlineWithIconTallest: SpacingPaddingInlineSemanticToken { dimension2XS }

    @objc open var spacePaddingInlineWithArrowNone: SpacingPaddingInlineSemanticToken { dimensionNone }
    @objc open var spacePaddingInlineWithArrowShortest: SpacingPaddingInlineSemanticToken { dimension10XS }
    @objc open var spacePaddingInlineWithArrowShorter: SpacingPaddingInlineSemanticToken { dimension9XS }
    @objc open var spacePaddingInlineWithArrowShort: SpacingPaddingInlineSemanticToken { dimension8XS }
    @objc open var spacePaddingInlineWithArrowMedium: SpacingPaddingInlineSemanticToken { dimension7XS }
    @objc open var spacePaddingInlineWithArrowTall: SpacingPaddingInlineSemanticToken { dimension6XS }
    @objc open var spacePaddingInlineWithArrowTaller: SpacingPaddingInlineSemanticToken { dimension4XS }
    @objc open var spacePaddingInlineWithArrowTallest: SpacingPaddingInlineSemanticToken { dimension3XS }

To reduce the number of variables, we gather both "mobile" (i.e. compact) and "tablet" (i.e. variants regular)

    @objc open var spaceScaledNone: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension0, regular: DimensionRawTokens.dimension0) }
    @objc open var spaceScaledSmash: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension25, regular: DimensionRawTokens.dimension50) }
    @objc open var spaceScaledShortest: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension50, regular: DimensionRawTokens.dimension100) }
    @objc open var spaceScaledShorter: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension100, regular: DimensionRawTokens.dimension150) }
    @objc open var spaceScaledShort: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension150, regular: DimensionRawTokens.dimension200) }
    @objc open var spaceScaledMedium: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension200, regular: DimensionRawTokens.dimension300) }
    @objc open var spaceScaledTall: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension300, regular: DimensionRawTokens.dimension400) }
    @objc open var spaceScaledTaller: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension400, regular: DimensionRawTokens.dimension500) }
    @objc open var spaceScaledTallest: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension500, regular: DimensionRawTokens.dimension600) }
    @objc open var spaceScaledSpacious: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension600, regular: DimensionRawTokens.dimension700) }

@pylapp
Copy link
Member

pylapp commented Oct 7, 2024

📣 New TestFlight ALPHA upload available 🚀

Please, get the new build from TestFlight app, or contact the project maintainers if you don't have access.

  • Display name: OUDS Showcase ALPHA (155, 156, 169, 170, 172, 173, 174)
  • Version: 0.4.0
  • Build number: 1728313283
  • Build tag: 1522281
  • Build type: ALPHA
  • Build details (GitHub): 155, 156, 169, 170, 172, 173, 174

cc @B3nz01d @pylapp @ludovic35 @Tayebsed93 @mccart77

This is an automated message sent with love and Fastlane from our CI/CD pipeline 🤘

@pylapp pylapp mentioned this issue Oct 18, 2024
pylapp added a commit that referenced this issue Oct 18, 2024
Release of version 0.4.0
See below the full CHANGELOG details.

Added

- [DemoApp] Update opacity screen with new design ([#200](#200))
- [DemoApp] Add color tokens screen in demo app ([#152](#152))
- [Library] Add semantic tokens `spacePaddingInlineTallest`, `spacePaddingBlockTallest`, `spaceColumnGapTaller`, `spaceColumnGapWithArrowShortest`, `spaceRowGapShortest` (Figjam final synchronization of October 16th)
- [Library] Add semantic color tokens ([#124](#124))
- [DemoApp] Fix some design issues and mutualize some UI elements ([#189](#189))
- [DemoApp] Add sizing tokens screen in demo app ([#150](#150))
- [DemoApp] Add spacing tokens screen in demo app ([#149](#149))
- [Library] Add color semantic tokens `colorContentTransparentDefault`, `colorBorderTransparentDefault` and `colorBackgroundTransparentDefault` (October 8th) ([#177](#177))
- [DemoApp] On opacity screen, add a border around the view showing the opacity ([#157](#157))

Changed

- [Library] Update of semantic typography tokens (Figjam final synchronization of October 16th)
- [Library] Update of semantic grid tokens `gridExtraCompactColumnCount`, `gridCompactColumnGap`, `gridRegularColumnGap` (Figjam final synchronization of October 16th)
- [Library] Update of semantic elevation token `elevationStickyNavigationScrolled` (Figjam final synchronization of October 16th)
- [Library] Update of semantic color tokens, semantic sizing tokens (Figjam final synchronization of October 16th)
- [Library/DemoApp] Updates SwiftLint rules, fix linter warnings ([#143](#143))
- [Tool] Update the templates for GitHub issues
- [Tool] Improve script for documentation generation ([#168](#168))
- [Library] Rename raw brand-specific color tokens in Orange theme (no use of "brand" word) ([#179](#179))
- [Library] `fontLetterSpacingMobile*` and `fontLetterSpacingTablet*` merged in `MultipleFontLetterSpacingTokens` objects
- [Library] `fontLineHeightMobile*` and `fontLineHeightTablet*` merged in `MultipleFontLineHeightTokens` objects
- [Library] `fontSizeMobile*` and `fontSizeTablet*` merged in `MultipleFontSizeTokens` objects 
- [Library] Update semantic and raw tokens for fonts ([#155](#155))
- [Library] Update semantic tokens for fonts (October 7th) ([#172](#172))
- [Library] Update raw tokens for fonts (October 7th) ([#170](#170))
- [Library] Any semantic token of sizing `TypeXXX` has been replaced by `TypeSizeXXX` (update of October 7th)
- [Library] Any semantic tokens of sizing `WithTypeXXX` has been replaced by `TypzeXXX` (update of October 7th)
- [Library] Update semantic tokens for sizing (October 7th) ([#173](#173))
- [Library] Any semantic tokens of spacing `isIcon` and `isArrow` are now `withIcon` and `withArrow` (update of October 7th)
- [Library] Update semantic tokens for spacing (October 4th) ([#174](#174))
- [Library] Update semantic tokens for spacing (October 4th) ([#156](#156))
- [Library] Update raw tokens for dimensions (October 7th) ([#169](#169))

Removed

- [Library] Raw typography token `fontSize100` (Figjam final synchronization of October 16th)
- [Library] Semantic token `spaceColumnGapWithArrowTaller` (Figjam final synchronization of October 16th)
- [Library] Remove all color alias semantic tokens and any optional color tokens type uses
- [Library] `SoshTheme` ([#180](#180))
- [Library] `fontSizeMobile*`, `fontSizeTablet*`, `fontLineHeightMobile*`, `fontLineHeightTablet*`, `fontLetterSpacingMobile*`, `fontLetterSpacingTablet*` removed (update of October 4th)
- [Library] `spaceRowGapWithIconTaller`, `spaceColumnGapWithIconTaller` removed (update of October 7th)

Fixed

- [Library] `typeBodyDefaultLarge` font weight ([#191](#191))

Co-authored-by: Pierre-Yves Lapersonne <[email protected]>
Co-authored-by: Ludovic Pinel <[email protected]>
Co-authored-by: Tayeb Sedraia <[email protected]>
@pylapp
Copy link
Member

pylapp commented Oct 18, 2024

ℹ️ Released with version v0.4.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧬 token Related to tokens (raws, semantics or components)
Projects
None yet
2 participants