tinted-theming / home

Style systems and smart build tooling for crafting high fidelity color schemes and easily using them in all your favorite apps.
MIT License
252 stars 12 forks source link

Proposal: deprecate "slugify" and require color schemes to specify a slug #94

Open belak opened 5 months ago

belak commented 5 months ago

This came up in https://github.com/tinted-theming/schemes/issues/8.

Essentially, we should drop the definition of "slugify" from the builder because it's relatively hard to understand and requires Unicode case folding to properly be implemented, meaning it's relatively easy to implement incorrectly as well.

We can do this by making "slug" a required field in the metadata.

I'm not certain if this would count as a breaking change or not, because if a builder properly implements spec-0.11, it would also support this new format. However, if a spec-0.11 scheme without a slug was passed to a builder which removed support for slugify, it would fail.

JamyGolden commented 5 months ago

I'd say it's a breaking change for the builder.md spec because it's making an optional property required. A scheme missing a slug property should be allowed after this change.

I like the idea of requiring a slug though. We should have a basic github actions test on the schemes repo to ensure that all schemes match the required schema.