-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Refactoring] Refactoring of theme with wrappers, update documentations #79
Labels
📖 documentation
Improvements or additions to documentation
🧩 enhancement
Related to enhancements or feature requests
🧬 token
Related to tokens (raws, semantics or components)
Comments
This comment has been minimized.
This comment has been minimized.
6 tasks
pylapp
changed the title
Refactoring of theme with wrappers
[Refactoring] Refactoring of theme with wrappers
Oct 2, 2024
This comment has been minimized.
This comment has been minimized.
15 tasks
pylapp
added
🧩 enhancement
Related to enhancements or feature requests
🧬 token
Related to tokens (raws, semantics or components)
and removed
⚠️ on hold
Not blocked but should not be processed yet
labels
Dec 13, 2024
pylapp
added a commit
that referenced
this issue
Dec 13, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
11 tasks
11 tasks
pylapp
added a commit
that referenced
this issue
Dec 13, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 13, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 13, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 13, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 13, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 13, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 13, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 13, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 13, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 13, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 13, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 13, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Find attached a kind of quick-and-dirty PoC with a local theme, inheriting from cc @ludovic35 |
pylapp
added a commit
that referenced
this issue
Dec 16, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
changed the title
[Refactoring] Refactoring of theme with wrappers
[Refactoring] Refactoring of theme with wrappers, update documentations
Dec 16, 2024
pylapp
added a commit
that referenced
this issue
Dec 16, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 16, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 16, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 16, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 16, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 17, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 17, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 17, 2024
…#79) Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 17, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 17, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 17, 2024
…79) Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 17, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 17, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 17, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 17, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 17, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 17, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 17, 2024
- Defines tokens providers embeded in the theme - Improve documentation (DocC catalogs, Swift doc) Reviewed-by: Ludovic Pinel <[email protected]> Acked-by: Ludovic Pinel <[email protected]> Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 18, 2024
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 18, 2024
…ADME (#355) - Now providers are defined in concrete theme levels, not abstract theme level. It makes possible to freeze some semantic tokens like `colorRepository*` - Documentation has been updated (catalog, Swift code, README) Related to #79 Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 18, 2024
- Defines tokens providers embeded in the theme - Improve documentation (DocC catalogs, Swift doc) Reviewed-by: Ludovic Pinel <[email protected]> Acked-by: Ludovic Pinel <[email protected]> Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 18, 2024
…ADME (#355) - Now providers are defined in concrete theme levels, not abstract theme level. It makes possible to freeze some semantic tokens like `colorRepository*` - Documentation has been updated (catalog, Swift code, README) Related to #79 Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp
added a commit
that referenced
this issue
Dec 18, 2024
Release of version 0.8.0 See bellow the full CHANGELOG details. Added: - [Library] New architecture with tokens provider ([#79](#79)) - [DemoApp] Prepare new architecture to add components illustration ([#328](#328)) Changed: - [Tool] Update `net-http` gem from 0.5.0 to 0.6.0 - [Tool] Update `SwiftLint` pod from v0.57.0 to v0.57.1 - [Tool] Update `SwiftFormat/CLI` pod from v0.54.6 to v0.55.3 - [Tool] Update `fastlane` gem from v2.225.0 to v2.226.0 - [Library] Update `FontSemanticTokens` (tokenator *20241213075501*) - [Library] Update `FontSemanticTokens` (tokenator *20241211115813*) - [Library] Update `FontRawTokens` (tokenator *20241211101443*) - [Tool] Migrate from `xcode_install` to `xcodes` in Fastfile, freeze Xcode version (16.0) - [Library] Rename `Typography*` tokens and elements to `Font*` ([#322](#322)) - [Library] Update `ColorSemanticTokens` (tokenator *20241204111709*) - [Library] Update `SpaceSemanticTokens` (tokenator *20241204110127*) - [Library] Rename `opacityTransparent` opacity semantic token to `opacityInvisible` - [Library] Update `OpacitySemanticTokens` and `OpacityRawTokens` tokens (tokenator *20241204110957*) - [Library] Update `OrangeBrandColorRawTokens` tokens (tokenator *20241204111119*) - [Library] Update `SizeSemanticTokens` tokens (tokenator *20241204110236*) - [Library] Rename any `sizeIcon**` size semantic tokens applying "T-shirt sizes" template - [Library] Update `ElevationSemanticTokens` and `ColorRawTokens` tokens (tokenator *20241204111249*) - [Library] Rename any `colorTransparent*` color semantic tokens to `colorOpacity*` - [DemoApp] Reactor UI test to use theme in environment ([#299](#299)) Removed: - [Library] Font raw tokens `fontFamilyBrandDefault`, `fontFamilyBrandTV`, `fontFamilySystemArial`, `fontFamilySystemHelvetica`, `fontFamilySystemNotoSans`, `fontFamilySystemSFPro`, `fontFamilySystemRoboto`, `fontFamilyMonospaceMonaco`, `fontFamilyMonospaceCourierNew`, `fontFamilySystemArial` - [Library] Space semantic tokens `*WithIcon*`, `*WithArrow*` - [Library] Elevation semantic tokens `elevationBlurOverlayDefault`, `elevationBlurOverlayEmphasized`, `elevationXOverlayDefault`, `elevationXOverlayEmphasized`, `elevationYOverlayDefault`, `elevationYOverlayEmphasized`, `elevationColorOverlayDefaultLight`, `elevationColorOverlayEmphasizedLight`, `elevationColorOverlayDefaultDark`, `elevationColorOverlayEmphasizedDark` Co-authored-by: Pierre-Yves Lapersonne <[email protected]> Co-authored-by: Ludovic Pinel <[email protected]> Co-authored-by: boosted-bot <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
📖 documentation
Improvements or additions to documentation
🧩 enhancement
Related to enhancements or feature requests
🧬 token
Related to tokens (raws, semantics or components)
Context
Today, it is the duty of a theme to embed, override and provide any raw tokens, semantic tokens and future component tokens. It implies to have finaly a
class
with thousands of objects.Indeed this is acceptable because the logic behing OUDS is based on themes which are in fact combinations of values for any tokens.
Today a theme is a Swift
class
which is not a singleton because we don't want to instanciate such massive objects if we don't use it. Using a singleton won't help to override classes so as to have subthemes.Howeer we can agree that having thousands properties in one object does not bring a good developer experience (DX), and we may implement another solution with wrappers.
Proposal
We may in fact define as many wrappers as "family" of tokens, i.e.
ColorsWrapper
,BorderWrapper
,TypographiesWrapper
,DimensionsWrapper
etc. Each wrapper must implement (in the same way as the actual implementation of a theme) a protocol to embed specific items of tokens which will be still overridable. Thus a theme won't implement such protocols anymore but will have inside it all wrappers.If a theme must be subclasses, it should only create a subclass of a wrapper and add it to the theme.
If could result to something like:
Then the old line may move to something else:
Way may focus to this topic later when we'll have components tokens and tokens to implement.
This solution is quite elgant and may improve DX buy we may face isues with memory and performances because we keep using plenty of Swift classes in the end.
Definition of Done
OUDSTheme+BorderSemanticTokens
OUDSTheme+OpacitySemanticTokens
OUDSTheme+ColorMultipleSemanticTokens
(same wrapper as the one as simple colors)OUDSTheme+ColorSemanticTokens
(same wrapper as the one with multiple colors)OUDSTheme+ElevationCompositeSemanticTokens
(same wrapper as the one with multiple and simple elevations)OUDSTheme+ElevationMultipleSemanticTokens
(same wrapper as the one with composite and simple elevations)OUDSTheme+ElevationSemanticTokens
(same wrapper as the one with composite and multiple elevations)OUDSTheme+FontCompositeSemanticTokens
(same wrapper as the one with multiple and simple font tokens)OUDSTheme+FontMultipleSemanticTokens
(same wrapper as the one with composite and simple font tokens)OUDSTheme+FontSemanticTokens
(same wrapper as the one with multiple and composite font tokens)OUDSTheme+GridSemanticTokens
OUDSTheme+GridSemanticTokensHelper
OUDSTheme+SizeMultipleSemanticTokens
(same wrapper as the one with simple size tokens)OUDSTheme+SizeSemanticTokens
(same wrapper as the one with multiple size tokens)OUDSTheme+SpaceMultipleSemanticTokens
(same wrapper as the one with simple space tokens)OUDSTheme+SpaceSemanticTokens
(same wrapper as the one with multiple space tokens)@objc
can be removed, and more documentation about that if notOrangeTheme
init to let users to use their own wrappersInverseTheme
init to let users to use their own wrappersNote that when migrations are done, contact the @boosted-bot tokenator team to have an update on ther side to make PR with our new architecture (no need to wait for tests and doc updates).
The text was updated successfully, but these errors were encountered: