-
Notifications
You must be signed in to change notification settings - Fork 62
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
Define error handling #200
Labels
Milestone
Comments
This was referenced Jan 23, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see : #121 (comment)
Defining which error cases can be expected while parsing a tokens file and what to do for each error is critical.
Errors carve out space for future extensions.
A simplistic example :
foo
has a declared type ofstring
but a numeric value."10"
)If we allow tools to be forgiving and help authors by casting types or passing on invalid tokens we reduce the available space for future extension.
https://tr.designtokens.org/format/#typography
What if we want to add number values for
lineHeight
but give them specific meaning?This is only possible if number values are not in use by accident.
edit: at the time of writing this
lineHeight
had a JSON value ofstring
I don't have a strong opinion about the best definition of error handling for design tokens.
But I think it is important to have some definition and then test each token type against this definition.
The main questions are :
These questions must be seen from the perspective of a mature ecosystem.
The text was updated successfully, but these errors were encountered: