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

Tokens: Opacity #29

Closed
1 task done
julien-deramond opened this issue Jun 28, 2024 · 2 comments · Fixed by #61
Closed
1 task done

Tokens: Opacity #29

julien-deramond opened this issue Jun 28, 2024 · 2 comments · Fixed by #61
Assignees
Labels
feature An agile feature request

Comments

@julien-deramond
Copy link
Member

julien-deramond commented Jun 28, 2024

Description

The aim of this issue is to study and implement the opacity tokens taking into account the cohesive multi-platform approach, the customization by libraries inheriting OUDS iOS, but also what we're using for OUDS iOS: Swift UI, etc.

  • Define the possibilities
  • Define the constraints
  • Define the impacts
  • Implement the tokens (with a future Style Dictionary usage in mind)

Reminder: there will be in the end 3 layers of tokens:

  • Raw primitive values: Insertion of brand foundations.
    • These tokens will be customizable by libraries inheriting OUDS iOS.
    • These tokens cannot be used by developers using OUDS iOS.
  • Semantic applications: Depends on raw primitive values.
    • Mapping between these tokens and the raw primitive values will be customizable by libraries inheriting OUDS iOS.
    • These tokens can be used by developers using OUDS iOS.
  • Component applications: Depends on semantic applications.:
    • Mapping between these tokens and the semantic tokens should rarely be customized by libraries inheriting OUDS iOS.
    • These tokens can be used by developers using OUDS iOS.

Tokens: Opacity

Raw primitive values

Token name Token value
opacity-0 0
opacity-100 0.04
opacity-200 0.08
opacity-300 0.16
opacity-400 0.24
opacity-500 0.32
opacity-600 0.48
opacity-700 0.64
opacity-800 0.88
opacity-900 1

Semantic applications

Token name Token value
opacity-transparent opacity-0
opacity-weaker opacity-100
opacity-weak opacity-300
opacity-medium opacity-500
opacity-emphasis opacity-700
opacity-opaque opacity-900

Component applications

⚠️ This is just an example, it doesn't need to be implemented for now, it will be when the modals will be tackled

Token name Token value
overlays-modal-backdrop-opacity opacity-emphasis

Study

  • Study the architecture of these tokens, and define the technical details

Technical details

TODO

@julien-deramond julien-deramond added feature An agile feature request on hold labels Jun 28, 2024
@pylapp
Copy link
Member

pylapp commented Aug 2, 2024

For information, a first draft is available in the implementation of #33 due to the need to test the architect with available tokens.
Of course any improvements, fixes and implementations after the merge of #33 must be linked to this issue to keep consistency.

In addition, "shared" raw tokens defined in OUDSTheme module (common to all themes) are not customisable as is in OUDS iOS and should not supposed to be because they define raw types and true values for everything, like a kind of source of truth for everyone. However any theme can define its own raw tokens and assign them to semantic tokens. Of course raw tokens values can be defined thanks to generated Swift code, if we have any efficient and relevant tools suite.

What should be done for this issue:

  • Review all tokens to check if some of them are missing or have bad values
  • Add documentation
  • Add unit tests
  • Update demo app to display theses tokens (if we have guidelines)

@pylapp pylapp self-assigned this Aug 4, 2024
pylapp added a commit that referenced this issue Aug 6, 2024
THis commit updates when needed the values of raw tokens and semenatic tokens for opacity.
It brings also unit tests for theme overriding and raw tokens relationships.

Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
@pylapp pylapp linked a pull request Aug 6, 2024 that will close this issue
7 tasks
pylapp added a commit that referenced this issue Aug 6, 2024
This commit updates when needed the values of raw tokens and semenatic tokens for opacity.
It brings also unit tests for theme overriding and raw tokens relationships.

Closes #29

Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
@pylapp pylapp added ready for code review When the issue as an associated pull request ready for code review and removed ready for code review When the issue as an associated pull request ready for code review labels Aug 6, 2024
@pylapp
Copy link
Member

pylapp commented Aug 6, 2024

📣 New TestFlight ALPHA upload 🚀

  • Display name: OUDS Showcase ALPHA (29)
  • Version: 0.1.0
  • Build number: 1722937903
  • Build tag: e9bf86d
  • Build type: ALPHA
  • Build details (GitHub):29

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

pylapp added a commit that referenced this issue Aug 6, 2024
This commit updates when needed the values of raw tokens and semenatic tokens for opacity.
It brings also unit tests for theme overriding and raw tokens relationships.

Closes #29

Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
pylapp added a commit that referenced this issue Aug 7, 2024
pylapp added a commit that referenced this issue Aug 7, 2024
pylapp added a commit that referenced this issue Aug 7, 2024
Reviewed-by: Ludovic Pinel <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
@pylapp pylapp closed this as completed in #61 Aug 7, 2024
pylapp added a commit that referenced this issue Aug 7, 2024
@pylapp pylapp removed the ready for code review When the issue as an associated pull request ready for code review label Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature An agile feature request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants