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

[Epic] Composition Tokens: M2 #1217

Closed
12 tasks done
esthercheran opened this issue Aug 23, 2022 · 6 comments
Closed
12 tasks done

[Epic] Composition Tokens: M2 #1217

esthercheran opened this issue Aug 23, 2022 · 6 comments
Assignees
Labels
Epic token type composition TS legacy token type deprecated TBD

Comments

@esthercheran
Copy link
Collaborator

esthercheran commented Aug 23, 2022

Composition tokens was launched with the 102 release, we should plan for the next iteration of this feature.

Tasks for M2

Preview Give feedback
  1. bug
    swordEdge
  2. Inspect tab token type composition 💡request 🩵 Migrated to Featurebase
  3. token type composition
  4. swordEdge
  5. enhancement token type composition
    esthercheran
  6. enhancement token type composition 🩵 Migrated to Featurebase
    esthercheran
  7. token type composition
    swordEdge
  8. design enhancement token apply multiple property token type composition 🩵 Migrated to Featurebase
  9. token type composition 💡request
  10. robinhoodie0823
  11. Figma native feature token apply multiple property token type composition 💡request 🩵 Migrated to Featurebase
  12. bug token type composition

If you've used composition tokens and have any feedback for us, leave your feedback in this issue 🙏

@six7 six7 added the Epic label Aug 24, 2022
@engegu
Copy link

engegu commented Sep 6, 2022

We are trying this out as an alternative to component tokens, a major hindrance is the inspect experience. It needs to be brought in line with other tokens in that there is at least a mouseover that lists referenced tokens and values.

@six7 six7 moved this to 🗃️ Backlog in Tokens Studio for Figma Roadmap Dec 10, 2022
@six7 six7 added the token type composition TS legacy token type deprecated TBD label Jan 13, 2023
@six7 six7 moved this from 🗃️ Backlog to 🧑‍🎨 Shaping in Tokens Studio for Figma Roadmap Jan 13, 2023
@eekprice
Copy link

eekprice commented Mar 3, 2023

Composition request: it would be great to be able to reference compositions within compositions.

Why: I’ve created a collection of what I call velocity tokens - which are groups of tokens that make up almost all of my components. It would be great to create another set of component compositions that utilize the velocity tokens, making it a lot quicker to build inside of studio.

Another request for creating compositions:
It would wonderful to automate the composition creating process.

Recommendation: After applying all your tokens to a frame in figma, select the frame. We already know what tokens are applied in that frame with the inspect tab. It could be cool to have a button that said “create composition” and it would pull all those tokens into a new composition with the name being blank.

Quick wireframes for what I was thinking with the last request. https://www.figma.com/file/UWX2pubNzWkG8i8Sf2IQCN/Automating-compostion-creation-in-studio?node-id=0%3A1&t=kMj3VPsgMbpKm2RH-1

@vnys
Copy link

vnys commented Mar 10, 2023

Composing composition tokens

Here’s what I’d like to see for composition tokens: If we could compose composition tokens, we could create base shapes or colour sets that could be reused across components. Similarly to how inheritance works with CSS, I would expect that if two composition tokens has conflicting values, the last one wins. But if you want to override a value, the order doesn’t matter because a property that you create directly on a composition token such as fontWeight for <Button> in the following example, has higher specificity than a value from another composition token that you pull in.

classDiagram
    note for colorset_primary "Colour “molecule” consisting of \n colours for bg, text, border, (icon)"
    Button *-- spacing_insetSquish_md : Composition
    Tab *-- spacing_insetSquish_md : Composition
    Button *-- typography_sm : Composition
    Tab *-- typography_md : Composition
    Button *-- colorset_primary : Composition
    Tab *-- colorset_primary_inverse : Composition
    
    
    class spacing_insetSquish_md {
        verticalSpace_sm  
        horisontalSpace_md
    }
    
    class typography_md {
        fontSize_md
        lineHeight_md
        fontWeight_400
    }
    
    class typography_sm {
        fontSize_sm
        lineHeight_sm
        fontWeight_400
    }
    
    class Button {
        fontWeight_500
        action()
    }
    
    class Tab {
        navigation()
    }
    
    class colorset_primary {
        bgColor_blue700
        textColor_neutral100
        borderColor_blue900
    }
    
    class colorset_primary_inverse {
        bgColor_blue100
        textColor_blue900
        borderColor_blue700
    }
        
Loading

@six7
Copy link
Collaborator

six7 commented Mar 12, 2023

Thanks @vnys - i've used your input in the issue's description for applying more than 1 composition token: #1682

@chongchizhang
Copy link

Would love to see the support of applying multiple composite tokens on one Figma layer. This would tremendously help us reduce repeating tokens.

Before:

"button.primary.base.medium.default": 
    "{fill.primary}",
    "horizontalPadding": "{padding.xl}",
    "verticalPadding": "{padding.sm}",
    "itemSpacing": "{gap.xs}",
    "borderRadius": "{cornerRadius.md}"

"button.secondary.base.medium.default": 
    "{fill.secondary}",
    "horizontalPadding": "{padding.xl}",
    "verticalPadding": "{padding.sm}",
    "itemSpacing": "{gap.xs}",
    "borderRadius": "{cornerRadius.md}"

After:

"button.primary.default": 
    "{fill.primary}",

"button.secondary.default": 
    "{fill.secondary}"

"button.medium"
    "horizontalPadding": "{padding.xl}",
    "verticalPadding": "{padding.sm}",
    "itemSpacing": "{gap.xs}",
    "borderRadius": "{cornerRadius.md}"

So that way button size medium can combine with primary secondary styles to achieve the same goal.

@esthercheran esthercheran changed the title Composition Tokens: M2 [Epic] Composition Tokens: M2 Nov 6, 2023
@SamIam4Hyma
Copy link
Collaborator

closing this epic as all sub-issues have been closed or migrated into Featurebase.

🪙 ➕ Support multiple tokens per layer of the same type

@SamIam4Hyma SamIam4Hyma closed this as not planned Won't fix, can't repro, duplicate, stale May 7, 2024
@github-project-automation github-project-automation bot moved this from 🧑‍🎨 Shaping to ✅ Done in Tokens Studio for Figma Roadmap May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic token type composition TS legacy token type deprecated TBD
Projects
Status: ✅ Done
Development

No branches or pull requests

7 participants