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

Be explicit about whether or not empty groups are allowed #235

Open
c1rrus opened this issue Mar 4, 2024 · 4 comments
Open

Be explicit about whether or not empty groups are allowed #235

c1rrus opened this issue Mar 4, 2024 · 4 comments

Comments

@c1rrus
Copy link
Member

c1rrus commented Mar 4, 2024

Currently, the spec says nothing about whether or not groups can be empty - i.e. not contain any tokens or nested groups.

I've always assumed they can be empty. But I recently discovered that Cobalt UI has taken the opposite view and throws an error when it encounters an empy group.

The spec doesn't say anything, so neither view is right or wrong.

I propose we take a stance on this and be explicit in the spec. Otherwise, differing interpretations will lead to interoperability issues between tools.

My vote would be to permit empty groups. While they may seem useless they also do no harm. It's something that teams may legitimately encounter while (re-)organising their tokens and working with work-in-progress DTCG files (that's how I encountered that scenario anyway).

@nesquarx
Copy link

nesquarx commented Mar 4, 2024 via email

@eins78
Copy link

eins78 commented Mar 5, 2024

@c1rrus Note that the Cobalt UI issue you've referenced has since been updated, they now do allow empty groups.

@ilikescience
Copy link

I'm ok with empty groups as long as we specify that they can/should be ignored when parsing.

@kaelig
Copy link
Member

kaelig commented May 2, 2024

Should empty token groups be kept when importing/exporting by token management tooling vendors like Tokens Studio, Zeroheight, Figma, or Knapsack?

(my hunch is yes)

When exporting to other formats (say, CSS), then it's probably up to the tool to do what they think is the best decision based on the language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants