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

Allow duplication of tokens #142

Closed
usethetics opened this issue Jun 7, 2021 · 4 comments · Fixed by #226
Closed

Allow duplication of tokens #142

usethetics opened this issue Jun 7, 2021 · 4 comments · Fixed by #226
Labels
enhancement Internal new feature or functionality

Comments

@usethetics
Copy link

Would it be possible to add a feature to copy a ‘token set’?

With token set I mean all properties in i.e. a typography.heading-1.

Currently I have a token set for a heading-1 that contains the typographic properties for a heading level one. For level heading two I only want to change the font-size but I have to create a new heading-2 set and re-enter all the properties one by one.

It would be great if I could just duplicate heading-1, rename it to heading-2 and only change the font-size. Or maybe better yet, reference heading-1 and only set the font-size as a cascading overwrite in heading-2.

I hope I explained it clearly…

Screenshot 2021-06-07 at 16 31 42

@usethetics
Copy link
Author

I tried copying the heading-1 entry in the JSON file but that seems a no-go since it resolves in an ‘Invalid Values’ error.

@six7
Copy link
Collaborator

six7 commented Jun 8, 2021

Hey @usethetics - I think what would solve many use cases would be a way for users to simply duplicate a token. Of course, having some more logic like a cascading overwrite would be even better, but I think for simplicity's sake a duplication method should suffice.

In a way, it would be great if we could duplicate not only single tokens but possibly a token group (such a gray color palette).

@six7 six7 added the enhancement Internal new feature or functionality label Jun 8, 2021
@usethetics
Copy link
Author

I think what would solve many use cases would be a way for users to simply duplicate a token.
for simplicity's sake a duplication method should suffice.

Agree, being able to simply duplicate a token (and token group) would solve many use cases.

@six7 six7 changed the title Allow copying of token sets Allow duplication of tokens Jun 8, 2021
@six7
Copy link
Collaborator

six7 commented Jun 8, 2021

Changed title to not create confusion with token sets (themes).

Plus, a duplicate feature would probably be the same for all token types (be it a single value token or a composable like typography)

six7 added a commit that referenced this issue Oct 17, 2021
@six7 six7 mentioned this issue Oct 25, 2021
7 tasks
@six7 six7 closed this as completed in #226 Oct 31, 2021
six7 added a commit that referenced this issue Oct 31, 2021
* add initial url sync

* add new provider type

* add form

* add basic functionality

* add working pull

* add push dialog, working state

* added checks for commit message

* add tests

* rework confirm message

* add dirty state

* add test

* fix jsonbin

* remove legacy code

* wip

* fix pullTokens

* add tests

* add first draft of cli script

* fix tests

* add pkg

* working cli tool with github actions

* remove console log

* Add robustness

* bump token-transformer

* prettify ui

* bump release

* add custom branch input to pushDialog

* added loading screen, fixed jsonbin add

* add excludes to token transformer

* add readme to token-transformer

* fix transformer when no excludes are present

* remove token context

* add url sync

* allow users to resize window by dragging corner

* fix url sync

* ignore tokens from style creation that start with _

* fix tooltip render error

* fix tooltip in list mode

* fix resize pointer

* fix #266

* fix colors button row

* fixes #274

* fix / replacement

* fixes #142

* add check for alias

* add token preview in edit

* fix undefined pr state if no file existed

* add editProhibited based on user role

* fix alias value of 0

* add new defaults

* remove spellcheck from inputs

* adds json5 support, fixes #270, fixes #283

* add unique check to names

* fix color opacity values not matching when using 0.5

* fixes #166, fixes #209

* add type to new token creation

* fixes #276

* fixes unique name check

* fix unique name check

* capitalize description in edit form

* introduce new merging function

* fix aliasing of rgba colors

* add new resize icon

* fix capitalization of input labels

* fix name of form

* fix async fn

* correctly saves whole context obj except secret

* add placeholder for value

* fix spec

* fix test

* remove console.log

* fix when no tokens file was present

* integrate style name ignore for updating nodes

* fix ignore part when applying

* fix modal padding except for edit token form

* fix token-transformer

* bump token transformer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Internal new feature or functionality
Projects
None yet
2 participants