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

[Study] Common Cross-Libraries Token Architecture: Add Semantic Tokens From Outside #53

Open
1 task
julien-deramond opened this issue Jul 29, 2024 · 1 comment
Labels
🆕 feature Related to features ⚠️ on hold Not blocked but should not be processed yet

Comments

@julien-deramond
Copy link
Member

Warning

On hold until the common cross-libraries token architecture has been implemented and challenged with the creation of some components

Description

The possibility of adding semantic tokens from outside was envisaged in #33, but it was not studied in depth at the time. The complexity of creating prototypes without an existing library made this task challenging. Strategically and efficiently, adding semantic tokens from outside was deemed out of scope.

Now that the common cross-library token architecture has been implemented and validated through the creation of various components, it's time to study and implement the second version of this architecture. This new version will allow the addition (and possibly removal) of semantic tokens from outside when creating a new theme.

Study

  • Study the limitations and the way it could be done on Android

Technical details

TODO

@julien-deramond julien-deramond added 🆕 feature Related to features ⚠️ on hold Not blocked but should not be processed yet labels Jul 29, 2024
@pylapp pylapp assigned pylapp and unassigned pylapp Aug 4, 2024
@pylapp
Copy link
Member

pylapp commented Aug 6, 2024

Just for information, it seems to be possible to define today with the current architecture implemented in #33 some semantics tokens.

Indeed, there are semantic tokens shared for all themes (i.e. all semantic tokenswe have today for dimensions, spacings, sizings, etc), i.e. in highest level. These semantic tokens rely on primitive types (Int, Double, String).

A theme can define its own semantic tokens using the same primitive types or typealiases exactly like it is possible to do for raw tokens. However of course these semantic tokens can only be used in the module of the theme which defined them. These "theme exclusive" semantic tokens can be used in the module for components tokens or also to override existing semantic tokens if types match.

We should test it, but it seems it is still possible today.

@pylapp pylapp self-assigned this Aug 21, 2024
@pylapp pylapp removed their assignment Sep 18, 2024
@pylapp pylapp changed the title Common Cross-Libraries Token Architecture: Add Semantic Tokens From Outside [Study] Common Cross-Libraries Token Architecture: Add Semantic Tokens From Outside Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 feature Related to features ⚠️ on hold Not blocked but should not be processed yet
Projects
Status: Triage
Development

No branches or pull requests

2 participants