From 50125fe264cb0a1e7f5bb14e1b52753ff790ee1a Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 10 Jan 2025 10:35:49 +0100 Subject: [PATCH] :tada: Merge tokens-studio/develoo into develop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 82cdf41cc0a515c615df550fa61d8c8d891bc603 Author: Andrés Moya Date: Thu Jan 9 18:43:35 2025 +0100 :lipstick: Fix lint commit 29a9d39ecb1aee661e1b4ec7b7a111506c8b9359 Author: Andrés Moya Date: Thu Jan 9 18:34:07 2025 +0100 :wrench: Disable broken test commit 41e6471cc663753a71d8862379370b8ae194d382 Author: Andrés Moya Date: Thu Jan 9 18:24:06 2025 +0100 :bug: Small fix commit 6a684111203b8b6e7ef69c6fd1b89197aed402d2 Author: Andrés Moya Date: Thu Jan 9 18:06:23 2025 +0100 :sparkles: Some code enhancements commit 170a51f9e5bfd055038c2fce49a77aa61c0ff1e7 Author: Andrés Moya Date: Thu Jan 9 14:52:24 2025 +0100 :wrench: Fix merge commit e9e468ee3751287cbbad7b6441b44bb6584f1863 Merge: d980ff05c e5f865099 Author: Andrés Moya Date: Thu Jan 9 14:27:19 2025 +0100 Merge remote-tracking branch 'origin/develop' into token-studio-develop commit e5f8650994c3f212d36ee259f7d09499cfda962a Merge: 7e71a26c5 74f807d53 Author: Andrés Moya Date: Thu Jan 9 13:42:00 2025 +0100 Merge branch 'develop' of github.com:penpot/penpot into develop commit d980ff05cd243d496e8f8dc70be4e5106d37731f Author: Xaviju Date: Tue Jan 7 12:28:41 2025 +0100 :recycle: refactor swatch component commit 0c80bf76b89af74a19fce9bdd38a6c85146217f3 Merge: a5a1d3af3 97c35a8f9 Author: Eva Marco Date: Thu Jan 9 09:52:53 2025 +0100 Merge pull request #406 from tokens-studio/eva-token-bugfixing Eva token bugfixing commit a5a1d3af3c3c4f71c1305faf7a8f1353d8c457fd Author: Eva Marco Date: Wed Jan 8 12:25:48 2025 +0100 :bug: Fix open border radius on token applied commit 97c35a8f9b6e33cf5012809c5ff55c517331e313 Author: Eva Marco Date: Wed Jan 8 14:28:33 2025 +0100 :bug: Fix token pill on multiselect commit 1f5903fa16149027223ce2db060fea209832cfeb Author: Eva Marco Date: Wed Jan 8 14:28:20 2025 +0100 :bug: Fix partially applied token on Border radius commit 791cb7e5fea22f79d5e3b081587ca872476ce580 Author: Florian Schroedl Date: Thu Jan 2 09:09:11 2025 +0100 ✨ Implement set group toggling commit d41b4b4e512fc82a7bf1e1aec5d1c915319eb9f6 Author: Eva Marco Date: Tue Jan 7 11:12:05 2025 +0100 :recycle: Refactor border radius tooltips commit 8a2754cae417ab409ae4f8e7aea09fd07eb7f779 Merge: 3bd139286 328cc74c2 Author: Florian Schrödl Date: Tue Jan 7 11:04:16 2025 +0100 Merge pull request #402 from tokens-studio/move-sizing-before 💄 Move spacing before sizing commit 328cc74c2c5f3751469199d70c24cf36390c5afb Author: Florian Schroedl Date: Tue Jan 7 10:55:08 2025 +0100 💄 Move spacing before sizing commit 3bd139286a2fec9f761244c8c056b6cd048e4b85 Merge: a9e20391d 1d608edb2 Author: Eva Marco Date: Fri Jan 3 11:21:12 2025 +0100 Merge pull request #399 from tokens-studio/eva-fix-border-radius-tooltip 🐛 Fix border radius tooltip and padding on token pills commit a9e20391d90483665b65be90159257cf80d00cd0 Merge: 6284f42a7 2a1f76ad1 Author: Eva Marco Date: Fri Jan 3 11:20:58 2025 +0100 Merge pull request #353 from tokens-studio/eva-fix-context-menu ♻️ Fix context menu commit 1d608edb2752561259a56f58c6ae121a4b387072 Author: Eva Marco Date: Thu Jan 2 14:02:44 2025 +0100 :bug: Fix layout error and tooltip commit 2a1f76ad1a2bd8c42e85d7c4c65f357a3c635674 Author: Eva Marco Date: Fri Nov 22 13:54:41 2024 +0100 :recycle: Fix context menu commit 6284f42a706c4166741a907f51146806bc2387fc Merge: 272b60969 4e22a7c03 Author: Eva Marco Date: Thu Jan 2 10:36:21 2025 +0100 Merge pull request #389 from tokens-studio/eva-fix-double-click-cancel :bug: Fix double click when canceling a modal commit 272b60969131ece9cab805d420c7f630b73bdd92 Merge: 71f656cc5 f867cb110 Author: Florian Schrödl Date: Thu Jan 2 08:53:13 2025 +0100 Merge pull request #392 from tokens-studio/andrei/338-fix-positioning-of-a-stroke-created-by-token-application :sparkles: Change default storke alignment if it's created by token commit f867cb110fbdad01defd692bf1c35075c5b56317 Author: Andrey Fedorov Date: Wed Dec 18 10:02:31 2024 +0100 :sparkles: Fix stroke alignment test commit f1034c6bcbe77a9f47dadcbdbb2b6fa5ad7af36e Author: Andrey Fedorov Date: Wed Dec 18 09:53:55 2024 +0100 :sparkles: Change default storke alignment if it's created by token application commit 71f656cc5ee7e7b374b39f4606de94919a290aa9 Author: Florian Schroedl Date: Fri Dec 13 15:45:25 2024 +0100 🐛 Fix sets breaking from merge commit fa642d77177df4042333598bcd18cc702f96fc9d Author: Florian Schroedl Date: Fri Dec 13 13:07:34 2024 +0100 🐛 Fix CI breaking commit 17a873e9f8744c8e7c0966e6588e3aba665cbfa7 Author: Andrés Moya Date: Fri Dec 13 15:01:22 2024 +0100 :wrench: Restore some things broken in merge commit d70b101aa1b67f2ade97958a843f37ebaff6f235 Author: Andrés Moya Date: Fri Dec 13 13:12:21 2024 +0100 :wrench: A little cleanup commit d453b584ee45af37eded7164a234f0d9d3083442 Author: Andrés Moya Date: Fri Dec 13 11:30:21 2024 +0100 :tada: Add script to un CI tests in dev env commit 78819c68c92305bab85352189aa7232f14ddd53c Author: Andrés Moya Date: Fri Dec 13 11:19:18 2024 +0100 :bug: Fix border radius and fills tokens commit 4e22a7c039afdd8ed7fb1bff9fd20afcab609baf Author: Eva Marco Date: Fri Dec 13 10:30:32 2024 +0100 :bug: Fix double click when canceling a modal commit cd6d5491fad949f295ddbad4cd58549cb5048e79 Merge: 46a60bc71 7e71a26c5 Author: Andrés Moya Date: Thu Dec 12 17:16:07 2024 +0100 Merge remote-tracking branch 'origin/develop' into token-studio-develop commit 7e71a26c50b62d1eaef0129a8000ebc940a8e8b3 Merge: 4f845b5c4 1c76587d7 Author: Andrés Moya Date: Thu Dec 12 11:44:24 2024 +0100 Merge branch 'develop' of github.com:penpot/penpot into develop commit 46a60bc7142f5ee44dfe964850d940e15fb33e24 Merge: 797374b2b d899fd687 Author: Eva Marco Date: Thu Dec 12 10:12:42 2024 +0100 Merge pull request #348 from tokens-studio/eva-token-pill ✨ Add token status pills commit 797374b2ba51b32adc2a3ed4cd4629a95222c4f6 Merge: edfa80d5b a7c59bb41 Author: Florian Schrödl Date: Wed Dec 11 17:25:56 2024 +0100 Merge pull request #383 from tokens-studio/andrei/export-import-themes :sparkles: Import/Export: Themes #306 [WIP] commit a7c59bb4134d2e564c56cab3c690f9a4e1a5cde2 Merge: 2264efa1c 90e0021ce Author: Florian Schrödl Date: Wed Dec 11 17:25:35 2024 +0100 Merge pull request #384 from tokens-studio/andrei/369-export-on-file-without-tokens-crashes :bug: Export on file without tokens crashes [WIP] commit 2264efa1cdc390d1c4b59b4ada686d2b11f9e809 Author: Andrey Fedorov Date: Wed Dec 11 17:13:23 2024 +0100 ✨ Exclude hidden theme commit 90e0021ceca5181f325dd1b42827f7a0668668f6 Author: Andrey Fedorov Date: Wed Dec 11 13:18:48 2024 +0100 :bug: Fix export crash when there's no tokens in the project commit edfa80d5b1db2cc301937669e8661003967d2f72 Author: Andrés Moya Date: Wed Dec 11 14:25:24 2024 +0100 :tada: Automatically unapply tokens when user changes attr values commit 7e8de9aa241197dd815944eeca1f2d0a64d513c6 Author: Andrey Fedorov Date: Tue Dec 10 12:01:40 2024 +0100 ✨ Fix encoding/decoding tests commit d0ad149e20f878ef0d25ccd2d3a4de3d7845d9c5 Author: Andrey Fedorov Date: Tue Dec 10 07:54:48 2024 +0100 ✨ Add themes data to decoding commit 19ce9e8ce39a741a197208cc06e2a2a779fc0dd7 Author: Andrey Fedorov Date: Tue Dec 10 11:55:33 2024 +0100 ✨ Include themes to dtcg encoding commit 9d67d007fb271dc60b489360ce919156a31b86fa Author: Andrey Fedorov Date: Mon Dec 9 16:32:14 2024 +0100 📎 Remove trailing space commit 05ec84ca1ba2824226cbd01c447977f2f66bb4e5 Merge: 15ba0746c 78d743406 Author: Florian Schrödl Date: Tue Dec 10 17:45:55 2024 +0100 Merge pull request #381 from tokens-studio/florian/rename-set-groups ✨ Token set group renaming commit 78d743406b19e775e7bb00bd8f752e48bc5a77e4 Merge: 85ed6f140 15ba0746c Author: Florian Schroedl Date: Tue Dec 10 17:31:38 2024 +0100 Merge remote-tracking branch 'origin/token-studio-develop' into florian/rename-set-groups commit 15ba0746c6ab9f870cb13beea389b188a679df9d Merge: 88fdafa2c 6e7a5e5c7 Author: Florian Schrödl Date: Tue Dec 10 17:23:09 2024 +0100 Merge pull request #379 from tokens-studio/florian/computed-set-checkmark Display computed checkmark next to token set groups commit 6e7a5e5c7f9d25a28b399cd2e9d172e11a7212da Author: Florian Schroedl Date: Tue Dec 10 17:15:40 2024 +0100 ♻ Use dm/str commit 88fdafa2c6aa075ca3542fbe82561c082d783227 Author: Andrés Moya Date: Mon Dec 2 15:50:20 2024 +0100 :tada: Add tests to check all types of tokens commit d51a2640bfb30bbae3ea466109c4260fa69297a5 Author: Andrés Moya Date: Thu Nov 28 16:36:10 2024 +0100 :bug: Avoid marking copies touched when changing token values commit 99c30dd44f8098f14c01bafbfcd7f8a837c862a3 Author: Andrés Moya Date: Tue Nov 26 19:40:21 2024 +0100 :tada: Add frontend unit tests commit ddec03966d96faff102c051a3ac8e68570a2fc3e Author: Andrés Moya Date: Tue Nov 26 11:23:02 2024 +0100 :wrench: Partial refactor to move things to common.types commit d378937a370f452f6edde4c88d5c87eefe6411bf Author: Andrés Moya Date: Thu Nov 21 16:39:43 2024 +0100 :tada: Set touched groups when changing tokens in copies commit 6077ba6690819ab8e178c61fd6e113a8569bd3d4 Author: Andrés Moya Date: Tue Nov 19 16:14:02 2024 +0100 :sparkles: Synchronize tokens in components commit 85ed6f14096bb22def5453a2eccfcb6f49d78246 Author: Florian Schroedl Date: Tue Dec 10 14:50:34 2024 +0100 ♻ Unique naming commit d546bc04f8086796728cc182f57b93335b25b72e Author: Florian Schroedl Date: Tue Dec 10 14:49:30 2024 +0100 ♻ Update docstring commit d899fd687ff99984c652005b308a189715c172a0 Author: Eva Marco Date: Tue Nov 19 08:37:32 2024 +0100 :sparkles: Add token status pills commit 5bac53ea03c01ffa451627a40dec641f7fe0ef6b Merge: aa292e482 2a766a719 Author: Florian Schroedl Date: Tue Dec 10 14:29:00 2024 +0100 Merge remote-tracking branch 'origin/token-studio-develop' into florian/computed-set-checkmark commit aa292e4829d77f72cd5c9a04f05b844700b92ff6 Author: Florian Schroedl Date: Tue Dec 10 14:04:32 2024 +0100 🐛 Fix missing active sets in set groups showing partial selection commit 5ff3469da70657e245a832fef293949c748b21c8 Author: Florian Schroedl Date: Tue Dec 10 14:04:11 2024 +0100 ♻ Accessible checkbox commit ddc30b7a3cf6d36ec29c135ce60ec53b32cd83b8 Author: Florian Schroedl Date: Mon Dec 9 15:09:44 2024 +0100 ✨ Rename set groups commit 2a766a7190f2e6316a1465180057eb906395b9c9 Author: Florian Schroedl Date: Mon Dec 9 11:52:08 2024 +0100 ♻ Fix lint commit 82ce61ef490308be86f36715c31647ab32fecc7a Author: Florian Schroedl Date: Mon Dec 9 11:44:16 2024 +0100 ♻ Fix lint commit 09e5d8883595f15cf23d04036df17dd0892a388d Author: Florian Schroedl Date: Wed Dec 4 17:36:58 2024 +0100 ♻ Cleanup commit 8b569005e1de544d422d80fffceefd345b09e8bf Author: Florian Schroedl Date: Wed Dec 4 17:16:35 2024 +0100 ✨ Display active state of children checkmark next to set groups in themes modal commit 07e3f581d34eba3657cbfcc5a72c7e59810dd067 Author: Florian Schroedl Date: Wed Dec 4 16:58:43 2024 +0100 ✨ Display active state of children checkmark next to set groups commit 9318c10172293ff7b0465ed451a3fc5dfae20243 Author: Florian Schroedl Date: Wed Dec 4 16:21:09 2024 +0100 ✨ Add function to compute active state of nested sets commit c6f643b7d5929d70b8f8ced888d8d30334f3cd7d Merge: bb337361b b9ada1f52 Author: Eva Marco Date: Wed Dec 4 15:53:07 2024 +0100 Merge pull request #377 from tokens-studio/florian/fix-color-token-bug Fix color token bug commit b9ada1f520ea280749e1334250bc065ee5a34ecd Author: Florian Schroedl Date: Tue Dec 3 17:58:30 2024 +0100 🐛 Fix color token only applying fill commit 4a06cc04d82d1f826b59d8bf2f39168e219f3f7d Author: Florian Schroedl Date: Tue Dec 3 17:42:40 2024 +0100 ✨ Add test for applying colors commit bb337361b80d621be365d21c4cacc34d8847d9db Merge: 1a2fb4e29 ab0cd29af Author: Florian Schrödl Date: Tue Dec 3 17:11:02 2024 +0100 Merge pull request #371 from tokens-studio/rebase-ui-updates Sets UI Updates commit ab0cd29af95262953ed760753096ed98aaad7af0 Author: Florian Schroedl Date: Tue Dec 3 17:08:29 2024 +0100 🚧 Add todo commit b875804bce66434d324f8716e574ff19df6f59c0 Author: Florian Schroedl Date: Tue Dec 3 17:07:46 2024 +0100 ♻ Use use-fn commit 656afa8a35f9a9484615080d6dce2407ad920da2 Author: Florian Schroedl Date: Tue Dec 3 15:48:54 2024 +0100 ♻ PR Feedback commit 1a2fb4e2996f2e860386ac1b00e41486756ba0d6 Merge: f0735417f 1a1a535e4 Author: Florian Schrödl Date: Tue Dec 3 12:47:20 2024 +0100 Merge pull request #372 from tokens-studio/andrei/fix-token-context-menu-order ✨ Reorder token context menu commit 1a1a535e4755705a1a252c86e62299548284169c Author: Andrey Fedorov Date: Tue Dec 3 11:19:49 2024 +0100 ✨ Reorder token context menu commit 53229c03d637ef8c8f40b452ac93d11ea43d8e5e Author: Florian Schroedl Date: Tue Dec 3 11:13:51 2024 +0100 ✨ Add context menu item for set groups commit d34c88b6e46111dac05cd8eda8ccb6dfb6fc2812 Author: Florian Schroedl Date: Tue Dec 3 10:01:18 2024 +0100 🐛 Fix selecting a set in the sidebar toggling the active state commit 1f6512cff012bbb1a55e6d4695f5af82106f532a Author: Florian Schroedl Date: Thu Nov 28 10:16:30 2024 +0100 ♻ Remove unused ref commit c9414824a59e85ea51563d2d73b2b476aa6714d0 Author: Florian Schroedl Date: Thu Nov 28 09:46:21 2024 +0100 ♻ Remove unused token files commit 384616c9a80bd37781fa382fd9de067c60a0b8b3 Author: Florian Schroedl Date: Thu Nov 28 09:32:11 2024 +0100 ♻ Rename to match ITokenSet glossary commit 42ee08445b56f9da70b0c622fa1927961fdd719a Author: Florian Schroedl Date: Thu Nov 28 09:24:16 2024 +0100 💄 Make sets section not collapsable anymore commit 27d0f0a7bc0ed972e87525cec39b40dbe7ad58d5 Author: Florian Schroedl Date: Thu Nov 28 09:16:38 2024 +0100 🐛 Fix collapse button triggering rename commit a0b2b4c55fdfc3d702bac750659190e826e24a5a Author: Florian Schroedl Date: Thu Nov 28 09:11:53 2024 +0100 💄 Remove folder icon commit 9c7e15f43f9fb6e8601dd72237e896f173c5450c Author: Florian Schroedl Date: Thu Nov 28 09:09:56 2024 +0100 💄 Disable group selection commit f0735417f424f3ffa22b6a82c07ffd6b335fa57d Author: Eva Marco Date: Mon Nov 25 14:11:49 2024 +0100 :recycle: Update download button icon commit c8146cf0fea569b2be1fe83efc2b53372d7b37d4 Author: Andrés Moya Date: Mon Nov 25 16:50:08 2024 +0100 :bug: Fix edit theme form auto submitting when pressing checkbox (II) commit 030f07428566665e18aace2050530881f41be150 Merge: b0252eded 0ea226ede Author: Florian Schrödl Date: Fri Nov 29 12:39:14 2024 +0100 Merge pull request #365 from tokens-studio/sets-naming Rename sets paths/name to match guidelines commit 0ea226edec86beca778f40432746415f6e148a88 Author: Florian Schroedl Date: Thu Nov 28 14:15:47 2024 +0100 Naming commit 997cb59ce354003b9b85d0bbff91c8fd969cc9e9 Author: Florian Schroedl Date: Thu Nov 28 14:13:28 2024 +0100 Naming commit a28ed69113e016de7ebe68b0704511f0ee6b73d5 Author: Florian Schroedl Date: Thu Nov 28 13:59:47 2024 +0100 Fix arg commit 5cbcdb77c90e0c7dba6d5b1e70c51f98f95daeaf Author: Florian Schroedl Date: Wed Nov 27 11:29:04 2024 +0100 Fix token set deletion commit 44105c2be28436b6c5159addd72b843d0c6551f4 Author: Florian Schroedl Date: Wed Nov 27 10:48:11 2024 +0100 Rename selected-token-set-id -> selected-token-set-path commit f2c6109dd957867d477f4fda8169a6485893afc2 Author: Florian Schroedl Date: Wed Nov 27 10:33:48 2024 +0100 Rename commit ffe2abc9927291e3efa70890b235b23c4727a115 Author: Florian Schroedl Date: Wed Nov 27 10:22:23 2024 +0100 Renaming commit 8772cdf42396e8baaf67a0b0cc27517a8cc3aab2 Author: Florian Schroedl Date: Tue Nov 26 10:59:40 2024 +0100 Add cancel test commit 7bce4ab425bf8de07f34e0bc5e74682280e7db39 Author: Florian Schroedl Date: Tue Nov 26 10:56:52 2024 +0100 Add integration tests for creating sets commit b5110c22228a4b51828412101da14f4c1066d65e Author: Florian Schroedl Date: Tue Nov 26 09:21:01 2024 +0100 ♻ Pass elements directly commit 18bb717699d8382dec7dfe9d0e14069313fdafce Author: Florian Schroedl Date: Tue Nov 26 09:04:01 2024 +0100 Adapt naming commit d3b88446e2c85779e43e29328c3775cd9a18934f Author: Florian Schroedl Date: Tue Nov 26 08:34:19 2024 +0100 📚 Add glossary commit b0252eded7c973ee15d3b72aed93452209d88fa9 Merge: db01b6690 ca632c984 Author: Florian Schrödl Date: Tue Nov 26 16:14:57 2024 +0100 Merge pull request #359 from tokens-studio/pr-source-2 Test deploy 2 commit ca632c98495b8fc29dd840941a2479da8bfd8e81 Author: Florian Schroedl Date: Tue Nov 26 15:09:49 2024 +0100 Empty commit db01b669051077051a6daac3e48fd408399d4415 Author: Juanfran Date: Tue Nov 19 13:59:54 2024 +0100 :bug: Fix modal overflow and column gap #9055 commit 97e5232b7d5ff286a20bbadf6d82ad1fab594167 Merge: 76b276073 e4460acfa Author: Florian Schrödl Date: Mon Nov 25 16:51:48 2024 +0100 Merge pull request #352 from tokens-studio/e2e-tests ✨ Adds token creation e2e test commit e4460acfae4cb68c41f885f2c4bea59c79dc3c2d Author: Florian Schroedl Date: Mon Nov 25 16:41:02 2024 +0100 ♻ Extract common token setup logic, fix selector commit 85fa635f6646f1e27baeeabc6a63333a6eef4c6c Author: Florian Schroedl Date: Mon Nov 25 11:10:17 2024 +0100 ✨ Check for auto-created set commit 439ca4b52c75effc3e95052c6a48a7b3fff5b853 Author: Florian Schroedl Date: Tue Nov 12 17:26:11 2024 +0100 ✨ Add token creation test commit 76b276073724d52f10fa6ca6259818ad66863fac Author: Xaviju Date: Fri Nov 22 12:47:53 2024 +0100 :bug: fix token input color swatch commit 2464ae1eefa15bd2200a0553ccaafb92961eee7a Merge: 0294695ac f79ccd52a Author: Florian Schrödl Date: Thu Nov 21 15:55:07 2024 +0100 Merge pull request #350 from tokens-studio/sets-reference-bug Token Resolving Issues commit f79ccd52aa90bef551b601e3237564c768a086a7 Author: Florian Schroedl Date: Thu Nov 21 15:42:20 2024 +0100 🐛 Fix shape color being removed for missing token references commit 584f8be751ab0f4a77a4418bb5abec02aa989847 Author: Florian Schroedl Date: Thu Nov 21 15:39:19 2024 +0100 🐛 Show fallback color for selected inactive set commit e7b07715a4e925e812eeb7d3785d14b47bf3c841 Author: Florian Schroedl Date: Thu Nov 21 15:38:53 2024 +0100 🐛 Fix references between separate sets commit 805432faec2bdcac9690d97f54fa1ce00079f168 Author: Florian Schroedl Date: Thu Nov 21 15:04:33 2024 +0100 ⬆ Upgrade style-dictionary@4.0.0-prerelease.36 commit 0294695acf25932476194fbcc6e162b9fa43e17e Author: Xaviju Date: Thu Nov 21 13:52:57 2024 +0100 :lipstick: add removed labeled input CSS and improve component slot commit 0a70f3ccfc227fad1f24cb1d185a378240681a00 Author: Andrés Moya Date: Thu Nov 21 11:47:11 2024 +0100 :wrench: Pass tests in the CI commit ddbe53a0eed89c3b2c2884e5222388f4256c0dde Author: Andrés Moya Date: Thu Nov 21 11:25:04 2024 +0100 :lipstick: Fix linter errors commit bf1efdc4b609e93103445fae80f6027e43fe61e2 Merge: faee45de4 7b57509d2 Author: Andrés Moya Date: Thu Nov 21 09:08:27 2024 +0100 Merge remote-tracking branch 'origin/develop' into token-studio-develop commit faee45de47683289a42d0b80aec9aa826c9c49d8 Merge: 133759de9 f1bda7b1f Author: Florian Schrödl Date: Wed Nov 20 16:26:21 2024 +0100 Merge pull request #336 from tokens-studio/develop-merge Develop Sync commit f1bda7b1f1acfd3c32412d7fe1a762ce85985ceb Author: Florian Schroedl Date: Wed Nov 20 16:12:21 2024 +0100 🐛 Fix dropdown menu position out of bounds commit 75a044e453a02c4791b16717867a4ba479f6a2df Author: Florian Schroedl Date: Wed Nov 20 16:03:54 2024 +0100 🐛 Fix token deletion commit 9819239d5877dd3081dee31d2301a4db8b5ae07e Author: Florian Schroedl Date: Wed Nov 20 15:53:46 2024 +0100 🐛 Fix new set not working with no sets commit 228080043ffa0cf03dfed4017e55db1fd01b8d3f Merge: 133759de9 59fdf64c6 Author: Florian Schroedl Date: Wed Nov 20 14:51:29 2024 +0100 Merge remote-tracking branch 'penpot/develop' into token-studio-develop commit 133759de97778bd534cf753cf646444838d5a629 Author: Florian Schroedl Date: Wed Nov 20 14:30:56 2024 +0100 🐛 Fix set creation commit 3745475252a84696d22f47545a007143ab342425 Merge: 1d2c7dd20 58278867c Author: Florian Schrödl Date: Wed Nov 20 14:00:28 2024 +0100 Merge pull request #327 from tokens-studio/named-set-groups-3 Sets & Sets Group UI commit 58278867cc94bdc27f75eb580765d4c626c65656 Author: Florian Schroedl Date: Wed Nov 20 13:59:09 2024 +0100 🐛 Fix sets tree not working in themes modal commit 3afdc72a4e703279a23debe595445c1fece04037 Author: Florian Schroedl Date: Wed Nov 20 13:46:01 2024 +0100 ⏪ Restore new sets input commit a19d85fb10a36b17f19deb96d0434430b93902a1 Author: Florian Schroedl Date: Tue Nov 19 16:43:37 2024 +0100 ✨ Render sets and set groups tree commit 1d2c7dd20e42a6535b093b70c11656b311c33001 Merge: 16a90f5e1 a77dd138b Author: Eva Marco Date: Tue Nov 19 08:43:17 2024 +0100 Merge pull request #335 from tokens-studio/9310-color-picker Color picker full inline size commit a77dd138b8289caa715d98b7a7ee2fb15b1272e5 Author: Xaviju Date: Mon Nov 18 15:11:05 2024 +0100 :lipstick: allow colorpicker to fill inline space commit 16a90f5e170d9e5113c1be028c7cc9dd9d4ffb3d Author: Xaviju Date: Mon Oct 28 14:54:20 2024 +0100 :sparkles: Refactor create token modal commit 5e0bb5025bbf771a1a9aa774db4014920a0d0dfc Author: Andrés Moya Date: Wed Nov 13 14:22:57 2024 +0100 :lipstick: Change naming to conform with Penpot DS commit bba504a16b6dae72a437fa1356375ad7ea9bb142 Author: Andrés Moya Date: Wed Nov 13 13:34:09 2024 +0100 :bug: Fix edit theme form auto submitting when pressing checkbox commit 2a8ea8db625bd37299159590117a50389d101f24 Author: Andrés Moya Date: Tue Nov 12 15:45:37 2024 +0100 :bug: Fix edit button not centered commit 43b90e764d696e19f4a5ab96ce34367e1cc0201f Author: Andrés Moya Date: Tue Nov 12 14:25:56 2024 +0100 :bug: Fix font size of token edit modal commit 16952a7087cb006a4d721a94a763dbab1a9e5db6 Author: Andrés Moya Date: Tue Nov 12 14:09:38 2024 +0100 :bug: Fix spacing of theme edit modal commit ac9735ef03bf7f2fd40747ac8417b004c5fbf061 Author: Andrés Moya Date: Tue Nov 12 14:03:18 2024 +0100 :bug: Fix new theme modal not opening commit 951543ae0a28e73402bb4ea7359552c03084b533 Author: Andrés Moya Date: Wed Oct 30 00:57:11 2024 +0100 :recycle: Refactor tokens exports toolbar commit b3c5f8f69524bc75d6d8640e642c8341c867a2b1 Author: Andrés Moya Date: Thu Nov 7 17:52:14 2024 +0100 :bug: Hide empty message when creating set commit cfaf9b88907a3b017f784019fa8dd7bc192afb64 Merge: 83e34f5ff 332ecd3f4 Author: Florian Schrödl Date: Thu Nov 14 16:14:30 2024 +0100 Merge pull request #332 from tokens-studio/fix-unit-tests-2 ♻ Re-enable token tests commit 83e34f5fff3b110bc0df985f98fbad03b8aeba93 Merge: b4440aad0 76b763b64 Author: Florian Schrödl Date: Wed Nov 13 10:27:27 2024 +0100 Merge pull request #323 from tokens-studio/named-set-groups ♻ Remove TokenSetGroup [*] commit 76b763b6487b1b7723591a6a8c17ebe9973367ad Merge: 3ff084e77 7044c17d8 Author: Florian Schrödl Date: Wed Nov 13 10:27:19 2024 +0100 Merge pull request #324 from tokens-studio/named-set-groups-2 Allow sets and set groups at the same level commit 7044c17d896f5589a6865378dee21ab34acc3802 Author: Florian Schroedl Date: Tue Nov 5 15:48:37 2024 +0100 ♻ Allow token set grouping - Remove slash to dash conversion commit 3c5c9a8e14d0f86239325b217ecc9c058bfeaecf Author: Florian Schroedl Date: Tue Nov 5 15:29:31 2024 +0100 ♻ Add a prefix to sets and set groups commit 3ff084e77ac80bf0a86bbe7b3616bc417b574460 Author: Florian Schroedl Date: Tue Nov 12 14:03:04 2024 +0100 ♻ Update only TokensLib to 1.1 commit 332ecd3f4b2bf7baad0bea73e14c88dd4947c7c2 Author: Florian Schroedl Date: Tue Nov 12 13:44:48 2024 +0100 ♻ Re-enable token tests commit 3869bcf7541910d9e9d7b99471a6dd8b18af5f3f Author: Florian Schroedl Date: Tue Nov 5 13:13:31 2024 +0100 ♻ Remove TokenSetGroup [*] [*] We do not need meta data on set groups, this was only necessary for defining order in TokensStudio and is not relevant for token implementations. commit b4440aad04fed96ad8eaff1cfa7d343e8d71a7c7 Author: Andrés Moya Date: Fri Nov 8 16:08:07 2024 +0100 :wrench: Fix wrong code in merge commit 5fee74cea85bbacaad34dc34128f886b32fa94fa Merge: a34207634 4f845b5c4 Author: Andrés Moya Date: Fri Nov 8 12:38:59 2024 +0100 Merge remote-tracking branch 'origin/develop' into token-studio-develop commit 4f845b5c4d0af93bbdb71179cf3222d55267d6b3 Merge: fb3f74e74 960f095c1 Author: Andrés Moya Date: Fri Nov 8 12:38:34 2024 +0100 Merge remote-tracking branch 'upstream/develop' into develop commit a34207634b241660a4ef25a10fa9dec9494dad69 Merge: a757556e9 2c4eb96ab Author: Florian Schrödl Date: Fri Nov 8 12:12:31 2024 +0100 Merge pull request #328 from tokens-studio/fix-merge-issues [WIP] Restore style-dictionary prerelease commit 2c4eb96ab1973751972bcb9b92a17f55a327b09a Author: Florian Schroedl Date: Fri Nov 8 12:03:58 2024 +0100 Remove comment block commit 424b93099069ca0ba33bbba05ecdd69bf720a8a4 Author: Florian Schroedl Date: Fri Nov 8 11:59:08 2024 +0100 Remove patch file commit cfd291db5e26ff5f450ad24005d4a0ccc51cbb18 Author: Florian Schroedl Date: Fri Nov 8 11:46:42 2024 +0100 Restore default commit c76569e4b7f2dd318a3d553536438ebad6ea002a Author: Florian Schroedl Date: Fri Nov 8 11:40:31 2024 +0100 Downgrade commit 456da5a46eacb3f7e760e09b136ca5de57406489 Author: Florian Schroedl Date: Fri Nov 8 10:16:29 2024 +0100 🐛 Fix name on fnc crashing the process commit 072cec7a22e92f6d3e9b15add9c22995b2bf35a4 Author: Florian Schroedl Date: Fri Nov 8 09:58:42 2024 +0100 Add testing block commit a757556e9cf4cd02d746986c486a120b07c36825 Author: Andrés Moya Date: Thu Nov 7 18:32:09 2024 +0100 Revert ":bug: Fix import of tinycolor2" This reverts commit 8e4574888d91c8771a26216409d6739698d3d6ff. commit 8e4574888d91c8771a26216409d6739698d3d6ff Author: Andrés Moya Date: Thu Nov 7 18:17:24 2024 +0100 :bug: Fix import of tinycolor2 commit 78a1a615d9cede45f8518c81065ee23753089d54 Merge: a910f06b2 fb3f74e74 Author: Andrés Moya Date: Thu Nov 7 14:07:58 2024 +0100 Merge remote-tracking branch 'origin/develop' into token-studio-develop commit fb3f74e74f3fb275275df801bcc7b0e35261de67 Merge: 20590a5d1 96f8832bc Author: Andrés Moya Date: Thu Nov 7 14:06:45 2024 +0100 Merge remote-tracking branch 'upstream/develop' into develop commit 20590a5d18447e2ccf3d0382b411ca830ec17e1c Author: Andrés Moya Date: Thu Nov 7 14:02:55 2024 +0100 :wrench: fix commit e9c32841a96c1585dda1f680a6347c44f1f18e4c Merge: 040a94f71 33ff74e53 Author: Andrés Moya Date: Thu Nov 7 13:49:11 2024 +0100 Merge remote-tracking branch 'upstream/develop' into develop commit a910f06b2f2a897c179db914ca5dedf62daa9a66 Merge: b3b8121d6 3d99c2a5e Author: Florian Schrödl Date: Wed Nov 6 16:26:19 2024 +0100 Merge pull request #326 from tokens-studio/stroke-context-menu [WIP] ✨ Allow setting stroke-color via context-menu commit 3d99c2a5eb544edf3de1003d238fa70db2089287 Author: Florian Schroedl Date: Wed Nov 6 15:43:20 2024 +0100 ✨ Allow setting stroke-color via context-menu commit 040a94f7198f3fdac6f422190a5d762be483e2ec Author: Andrés Moya Date: Tue Nov 5 13:16:56 2024 +0100 :wrench: Disable tokens in dev env by default commit b3b8121d609cf5bdd5c8e4af7fa7521976b64d1d Merge: 32865c41c a33e0a386 Author: Florian Schrödl Date: Mon Nov 4 13:45:44 2024 +0100 Merge pull request #320 from tokens-studio/fix-dot-rename 🐛 Fix renaming token to other namespace not working commit a33e0a386e06b2fe1565b626b48f2e17077a25ec Author: Florian Schroedl Date: Mon Nov 4 13:43:38 2024 +0100 ♻️Ensure collection return commit 32865c41c9c066eab6445dd4a408c5325684d910 Author: Florian Schroedl Date: Wed Oct 30 08:49:30 2024 +0100 ♻ Remove zip.js compability warning when starting shadow-cljs commit 315431fd49c8323214d4fb2ec8962164392ae318 Author: Andrés Moya Date: Mon Nov 4 13:02:32 2024 +0100 :wrench: Update dependencies commit b47c5f9e60460eccca4326547f1bc890dbe3bcd9 Author: Andrés Moya Date: Thu Oct 31 15:18:39 2024 +0100 :bug: Fix sidebar tabs when there are no design tokens commit a1fd7a912e3b533a8722593b4b71e159df5865d4 Author: Andrés Moya Date: Wed Oct 30 10:52:08 2024 +0100 :wrench: Use bun only for dev env (is needed to run frontend tests) commit 60761eec07942a4e057d177331de02782edf12f9 Author: Florian Schroedl Date: Tue Oct 29 17:06:32 2024 +0100 🐛 Fix renaming token to other namespace not working commit 62b859b84e182c59b87a8972ba68028236d10e0d Merge: bc3ab8981 4f7622cb9 Author: Florian Schrödl Date: Tue Oct 29 16:27:25 2024 +0100 Merge pull request #318 from tokens-studio/fix-delete-set 🐛 When deleting set remove it from theme commit 4f7622cb93f7dceb76b58273a6ecf53b11ded690 Author: Florian Schroedl Date: Tue Oct 29 14:19:42 2024 +0100 🐛 When deleting set remove it from theme commit bc3ab8981e87040d15867fd83d68dc808685a07e Author: Eva Marco Date: Fri Oct 25 14:54:00 2024 +0200 :recycle: Review sets code and add DS components commit bef648a63f41c4a438e48e4e925575f55f3b4446 Merge: cd7763ca0 0923dcc43 Author: Florian Schrödl Date: Mon Oct 28 09:06:34 2024 +0100 Merge pull request #312 from tokens-studio/import-sd-2 ✨ Import: Verify data with StyleDictionary commit 0923dcc43f5c9c4272481c488cd3241e70fca29b Author: Florian Schroedl Date: Fri Oct 25 14:40:14 2024 +0200 ♻ Make `process-sd-tokens` more readable commit cd7763ca08b5e36c07cca5952492046747fd6844 Merge: a1c401594 0ff5df4b8 Author: Andrés Moya Date: Thu Oct 24 14:50:56 2024 +0200 Merge pull request #313 from tokens-studio/eva-review-themes ♻️ Review themes section commit 0ff5df4b8d64965473a4b028b1eb899c3612f1f5 Author: Eva Marco Date: Wed Oct 23 16:28:30 2024 +0200 :recycle: Review themes section commit f5596b2b3fa2b99019d64c2f442a601ae8820804 Author: Florian Schroedl Date: Thu Oct 24 10:13:03 2024 +0200 🐛 Temporary fix for import on sets with groups (/ delimiter) commit a1c401594c59476a55b3eb1cabd30ed030dd2627 Merge: 03ea5414b 52d8bed0f Author: Florian Schrödl Date: Thu Oct 24 09:42:25 2024 +0200 Merge pull request #314 from tokens-studio/fix/deployment Fix/deployment commit 52d8bed0fc79820ebbab1d63c11f4f737dbd621a Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Oct 24 09:29:38 2024 +0200 Remove all gimlet and custom workflow code commit 66dce0e795826b78e705c128945588de9b87820d Author: Florian Schroedl Date: Tue Oct 22 10:14:47 2024 +0200 ✨ Detect reference errors when importing tokens commit d3ded00bc642ec41bf67ee7d333a6ddadf21fecb Author: Florian Schroedl Date: Wed Oct 23 14:13:49 2024 +0200 🐛 Fix text-editor missing from token tests commit bf3880a21c7bef9d96eea1555c4c39b1ab1d7af9 Author: Florian Schroedl Date: Wed Oct 23 10:05:24 2024 +0200 🐛 Remove box shadow from supported tokens commit 951f558d1f5ca800def988ca6790d754d782c998 Merge: fa8037c4b 03ea5414b Author: Florian Schroedl Date: Wed Oct 23 12:05:58 2024 +0200 Merge branch 'develop' into token-studio-develop commit 7debdefa22b2aed5afba3a1e7a04bca741b4a273 Author: Florian Schroedl Date: Mon Oct 21 16:03:19 2024 +0200 🐛 Fix outdated notifications map commit 03ea5414bebb0e2c587934922028bc6660751184 Author: Eva Marco Date: Mon Oct 21 17:14:17 2024 +0200 :recycle: Review create and edit modal commit 31b5f5cefa957921524ada7857e2fdd2ee09545d Author: Eva Marco Date: Mon Oct 21 16:36:47 2024 +0200 :recycle: Format code commit 96af0f065df38a1e97cf1d4c3d2e0d069d4d8664 Merge: 2bdbd81a1 77ba6c135 Author: Florian Schrödl Date: Mon Oct 21 10:10:55 2024 +0200 Merge pull request #310 from tokens-studio/fix-set-rename 🐛 Keep selection when renaming set commit 77ba6c135ec32269581a87236e9e13dee3a3bbaa Author: Florian Schroedl Date: Mon Oct 21 10:08:03 2024 +0200 🐛 Keep selection when renaming set commit fa8037c4b581372178fa62819548bd34d182b521 Author: Florian Schroedl Date: Thu Oct 17 17:40:25 2024 +0200 Deploy commit 2bdbd81a19841d84c959c4f755421adf5f3d71ab Merge: aaac7fb04 9fe4919a2 Author: Florian Schrödl Date: Thu Oct 17 17:11:05 2024 +0200 Merge pull request #308 from tokens-studio/merge-develop-2 Sync with upstream develop commit 9fe4919a2b4ab5b18b021a77b9a7ca79920ce7d3 Author: Florian Schroedl Date: Thu Oct 17 17:04:19 2024 +0200 Migrate msg -> ntf commit 6af6dd12888b865de64a89b6034d746d640c07f3 Merge: aaac7fb04 b4c2f2eca Author: Florian Schroedl Date: Thu Oct 17 17:03:23 2024 +0200 Merge branch 'develop' into token-studio-develop commit aaac7fb041250b27bb3fc88c5b50488043461d27 Merge: 41dc6083c c6ed081a0 Author: Florian Schrödl Date: Thu Oct 17 16:41:54 2024 +0200 Merge pull request #305 from tokens-studio/dtcg-import DTCG Tokens Import / Export commit c6ed081a0b3692d08ec8661b378ec8be356c8f3c Author: Florian Schroedl Date: Thu Oct 10 13:08:35 2024 +0200 ✨ Implement token import / export commit 41dc6083cf604aa30ec266661ca1488e2b3763db Merge: bbf5fce0c 85fee87bc Author: Florian Schrödl Date: Thu Oct 10 12:41:38 2024 +0200 Merge pull request #298 from tokens-studio/dnd Sets Drag & Drop commit 85fee87bc496f74ee506b3a84d51fcff4ced03b4 Author: Florian Schroedl Date: Tue Oct 8 10:24:07 2024 +0200 🎉 Token Sets dnd re-ordering commit a85a7d2b2f91f522e9b3d842cfb02533df41f366 Author: Florian Schroedl Date: Tue Oct 8 17:09:58 2024 +0200 🐛 Fix logic in oassoc-in-before wher top items couldn't be move to bottom commit bbf5fce0c9a47f493c14c13fd8e2354e0a51216b Merge: bc4969c25 07beef572 Author: Florian Schrödl Date: Wed Oct 9 13:21:38 2024 +0200 Merge pull request #297 from tokens-studio/feature-flag :sparkles: Add feature flag for design tokens commit 07beef5727767b7cc553c967244c74f7cb3971fe Author: Florian Schroedl Date: Wed Oct 9 11:00:51 2024 +0200 Remove $PENPOT_FLAGS from frontend deployment commit 11c8fa468fc3306b9f64bddc4e941c2f6315d814 Author: Florian Schroedl Date: Wed Oct 9 10:30:59 2024 +0200 Manually override ff flags commit b0ec9034dc721e9ff325f362c199f0686b84f64b Author: Florian Schroedl Date: Wed Oct 9 10:09:45 2024 +0200 Enable FF for gimlet commit 18e0948b0cd69d41a348c31834ec8d2f4b2dd893 Author: Andrés Moya Date: Mon Oct 7 14:16:08 2024 +0200 :sparkles: Add feature flag for design tokens commit bc4969c25d137866bed09de071f44454549e098a Merge: d58932c2e 2baa1aa73 Author: Florian Schrödl Date: Thu Oct 3 15:44:02 2024 +0200 Merge pull request #296 from tokens-studio/fix-reference-color-preview Fix reference color preview commit 2baa1aa734a528d2a61bfd45328fb935609a4a3a Author: Florian Schroedl Date: Thu Oct 3 15:30:39 2024 +0200 Show resolved color commit b3e73b9abc227083d7280898681af772858690e9 Author: Florian Schroedl Date: Thu Oct 3 15:18:41 2024 +0200 Move over helper commit 5de1f450c185d9bfcc0fcc1cf9b75b2cd5f993a7 Author: Florian Schroedl Date: Thu Oct 3 15:14:38 2024 +0200 Move over token value reference check function commit d58932c2e555b2899cbbb5a8a64e3954601de36d Merge: 6f086326f 69cc9d02b Author: Florian Schrödl Date: Thu Oct 3 13:26:27 2024 +0200 Merge pull request #290 from tokens-studio/refactor-themes-sets Refactor themes sets commit 69cc9d02ba126bdc4119775dc153069d9e28a5b7 Author: Florian Schroedl Date: Wed Oct 2 17:23:04 2024 +0200 Cleanup: item->token commit d097b5b179fd42d8e843e1109e53a8f0099d306f Author: Florian Schroedl Date: Wed Oct 2 17:10:26 2024 +0200 Cleanup commit 921f4a666073d62348321a4f7d2a61659ea7fbd6 Author: Florian Schroedl Date: Wed Oct 2 17:10:07 2024 +0200 Restore all logic tests commit 1097c1f28254a2e0a7d0b7173fe9f625cb973f01 Author: Florian Schroedl Date: Wed Oct 2 17:02:10 2024 +0200 Restore apply overwrite commit f9a49f82f82df884172e5617c8a40abe61b4417b Author: Florian Schroedl Date: Wed Oct 2 17:00:31 2024 +0200 Restore apply-multiple commit f2900c6519090aea32ce99eaa9e1b047a44ddbb8 Author: Florian Schroedl Date: Wed Oct 2 16:57:53 2024 +0200 Cleanup: Sort commit 1df40ea07a918ebd0a03935df79a2da0737ce216 Author: Florian Schroedl Date: Wed Oct 2 16:57:20 2024 +0200 Restore apply-tokens test commit eceffda095b5016727c81cddb1db61936c94978b Author: Florian Schroedl Date: Wed Oct 2 16:47:17 2024 +0200 Added todo commit e55f323d60c2aae48e6d9cb39b41e10a3c48b64a Author: Florian Schroedl Date: Wed Oct 2 15:47:59 2024 +0200 Fix tests commit 2634388d096556b4c0bebc6e48eefa2ed4a78b30 Author: Florian Schroedl Date: Wed Oct 2 14:37:24 2024 +0200 Remove logging commit fa6b8cb6deb056de003d527bee7af7b9fb219380 Author: Florian Schroedl Date: Wed Oct 2 14:31:56 2024 +0200 Use d/nilf commit 2b6075d1a208c8bab4cb15e85b287d50c741b646 Author: Florian Schroedl Date: Wed Oct 2 14:21:18 2024 +0200 Cleanup commit 306a5e5f8513811ccc6b8d988493006a10bd16e4 Author: Florian Schroedl Date: Wed Oct 2 14:20:27 2024 +0200 Sets don't have a specific order inside themes commit 5170d328bdd0b06d03b5503bd424696ca874645c Author: Florian Schroedl Date: Wed Oct 2 14:19:02 2024 +0200 Fix docstring commit 4a818d55c8656594455cd754f1a8cc55ed8d3203 Author: Florian Schroedl Date: Wed Oct 2 14:18:49 2024 +0200 Rename, fix docstring commit bbdc9e95f7b9bc8741be3e50004d038440c7d735 Author: Florian Schroedl Date: Wed Oct 2 14:17:20 2024 +0200 Add todo commit b12d5938e0cbad010d13467b563ae14b17ff37d8 Author: Florian Schroedl Date: Wed Oct 2 14:10:41 2024 +0200 Replace generic arg name commit 041e04dcb1e09a658450cb651c877d81684e748f Author: Florian Schroedl Date: Wed Oct 2 14:09:51 2024 +0200 Remove unneeded -> commit a235327c3e609d43885eb80cd33744868a722325 Author: Florian Schroedl Date: Wed Oct 2 11:33:14 2024 +0200 Cleanup commit 0ffcda404b7fc7e41a36fc0e847584be12b53f61 Author: Florian Schroedl Date: Wed Oct 2 11:09:52 2024 +0200 Cleanup commit 93cc8214fa7fa23fb5bc089977c701db1e761a4d Author: Florian Schroedl Date: Wed Oct 2 11:05:39 2024 +0200 Fix border-radius and sizing panels commit 845de5d885d9a4349efd90c0f5c29cf6b0e09c1b Author: Florian Schroedl Date: Wed Oct 2 10:52:48 2024 +0200 Fix export commit fdca6e4edf89054ff438c4353ef3c81d82725179 Author: Florian Schroedl Date: Wed Oct 2 10:46:55 2024 +0200 Fix measures options commit 028809f1d52994717c66b329df5d8fdbe4c8b781 Author: Florian Schroedl Date: Wed Oct 2 10:22:09 2024 +0200 Cleanup commit 053d0fc923d0f82008c552df62e2d0d50950854c Author: Florian Schroedl Date: Wed Oct 2 10:15:35 2024 +0200 Cleanup function commit 0b081d24e0184d8d57d7152f2b73336a079d4f4c Author: Florian Schroedl Date: Wed Oct 2 10:03:34 2024 +0200 Only show warning when string has / commit 669594e3c164081c72e769796ec62feca2a29e1f Author: Florian Schroedl Date: Wed Oct 2 09:42:56 2024 +0200 Cleanup commit 57a133e09de7f8ed3449af6d1f3f7f19fbf69c7c Author: Florian Schroedl Date: Wed Oct 2 09:42:49 2024 +0200 Add ordered tokens test commit 43e5367988fa0394767ba75a98470b47467891c0 Author: Florian Schroedl Date: Wed Oct 2 09:42:42 2024 +0200 Fix testing from cljs commit fa3e2c90e67b3d56ad5291856227452d3fc16b48 Author: Florian Schroedl Date: Tue Oct 1 15:45:14 2024 +0200 Fix renaming via context menu commit 7418d1fa2cd06a862542b5aac7e5606592793aaa Author: Florian Schroedl Date: Tue Oct 1 15:42:09 2024 +0200 Dont support token set grouping for now commit 3681678dc425ff741a69e733120f65c66ba2f120 Author: Florian Schroedl Date: Tue Oct 1 14:40:05 2024 +0200 Migrate token tests to tokens-lib commit bca4ea381997100a7576b04a74f76f18a62685f4 Merge: 9268b18e5 6f086326f Author: Florian Schroedl Date: Tue Oct 1 12:58:26 2024 +0200 Merge remote-tracking branch 'origin/token-studio-develop' into refactor-themes-sets commit 9268b18e56c64e2a87ac83b83dbbe7c94faffc3f Author: Florian Schroedl Date: Tue Oct 1 12:53:01 2024 +0200 Fix edit button commit f1f2767e2a872e2adf2ce143005a1cb9c8f979f4 Author: Florian Schroedl Date: Tue Oct 1 12:49:03 2024 +0200 Activating initial sets by adding them to the token theme commit 5825fa656bec830801d95f3d7563f0cb7f1f8d9d Author: Florian Schroedl Date: Tue Oct 1 09:56:03 2024 +0200 Fix tests commit 993df2362468bd13ee8916f98be06e785a5d973e Author: Florian Schroedl Date: Tue Oct 1 09:55:58 2024 +0200 Remove unneeded tests commit 442732117bf8e135001a2ba3a576f41d4aff9f9d Author: Florian Schroedl Date: Tue Oct 1 09:55:23 2024 +0200 Disable logic tests for now (nee new setup) commit 0d870610e189c2a4334ecedf02c7219c8e5c8770 Author: Florian Schroedl Date: Tue Oct 1 09:14:54 2024 +0200 Fix infer warnings in tokens test commit 231baac31dc44f8c7438d4711fc63a8d383385d0 Author: Florian Schroedl Date: Mon Sep 30 16:41:51 2024 +0200 Fix renaming token creating new token commit 4b39b6970a17421828b1d1d0861f79cb57e2c8d0 Author: Florian Schroedl Date: Mon Sep 30 16:26:26 2024 +0200 Fix theme sets not being in order of the root order commit c5173d2df8be6ea90c6680c8b655851f30879d70 Author: Florian Schroedl Date: Mon Sep 30 15:33:17 2024 +0200 Remove hidden token theme when activating a theme commit 0ea0834b1aaec2252c2d77f30f2117f4c083bf0f Author: Florian Schroedl Date: Mon Sep 30 15:21:15 2024 +0200 Cleanup commit bfa90d0347f3f5ff38e82585ca0a2d14c8f2becd Author: Florian Schroedl Date: Mon Sep 30 15:18:26 2024 +0200 Fix duplicate token event commit b0d46e17674ce86578918cbefb49f3e4a5d24cec Author: Florian Schroedl Date: Mon Sep 30 15:15:05 2024 +0200 Cleanup commit 3182ff1e15294cca5e7f900b94c28054b31ab8e0 Author: Florian Schroedl Date: Mon Sep 30 15:08:18 2024 +0200 Cleanup commit dc0a1c1555db67de73f625c6a1520d0630b0e168 Author: Florian Schroedl Date: Mon Sep 30 15:07:22 2024 +0200 Cleanup commit 18d120bbaa40735355fad82efdbb3c2e2554bbef Author: Florian Schroedl Date: Mon Sep 30 15:04:12 2024 +0200 Fix token creation without set commit c75ab61732e6a888d08511fd8703367eb12f87f2 Author: Florian Schroedl Date: Mon Sep 30 14:44:42 2024 +0200 Fix renamed theme staying in active-themes commit df8f67b5d38e466515083a21d448b6fc265139d0 Author: Florian Schroedl Date: Mon Sep 30 13:52:50 2024 +0200 Update workspace tokens commit 1194eb7c61a67de6137e2442da82dd9a6e490d4c Author: Florian Schroedl Date: Mon Sep 30 09:39:11 2024 +0200 Remove unused functions commit a49992a74e915ae9d0a0796ef458a281f0bde498 Author: Florian Schroedl Date: Mon Sep 30 09:38:01 2024 +0200 Fix token updating commit 5d61ddb3856f1367a104cc98edd29709a74d19c5 Author: Florian Schroedl Date: Mon Sep 30 09:33:35 2024 +0200 Fix property applying commit a59e391b387578e66153e5d5341d02176e292869 Author: Florian Schroedl Date: Mon Sep 30 09:19:06 2024 +0200 Fix token deletion menu commit cfec4ae958a72d1a8ee037435e7bd9d898ad0a6d Author: Florian Schroedl Date: Mon Sep 30 09:08:14 2024 +0200 Cleanup commit 99a3ed98c917ce6568abbb48342dd6f61f0c95d0 Author: Florian Schroedl Date: Mon Sep 30 08:46:31 2024 +0200 Only load context menu when open commit 8c58ed80ac801ee6113145aab8d4301be2783c0e Author: Florian Schroedl Date: Mon Sep 30 08:31:18 2024 +0200 Fix id commit 066ee9c489c3f15e790a73a5d31786f8ebfe437a Author: Florian Schroedl Date: Mon Sep 30 08:23:22 2024 +0200 Tokens in sidebar commit cce4014fbedd2e5be3a26089cffdd9f7efd9e618 Author: Florian Schroedl Date: Fri Sep 27 15:36:07 2024 +0200 Fix token create commit b7cedf219bca70c1ce40bb86faa236e237263bef Author: Florian Schroedl Date: Fri Sep 27 11:21:30 2024 +0200 Cleanup commit 93ed1ded1791d1d03164d1eef09931adafdebd54 Author: Florian Schroedl Date: Fri Sep 27 11:14:34 2024 +0200 Token resolving on add fixed commit 1d50bacfbc412ceca036820ade12fbd952a5c75e Author: Florian Schroedl Date: Thu Sep 26 17:21:02 2024 +0200 Fix set renaming not being updated in themes commit 7c4cbe52652472798112d5ee9f802f69c4adccb2 Author: Florian Schroedl Date: Thu Sep 26 16:40:38 2024 +0200 Cleanup commit 2f13814285294ebc86732749e2f92ade9a518875 Author: Florian Schroedl Date: Thu Sep 26 16:37:30 2024 +0200 Cleanup commit 9f2b96332c36e37bed109fae80323189ea0fa33e Author: Florian Schroedl Date: Thu Sep 26 16:16:44 2024 +0200 Fix up active themes tokens method commit 577fa2bc81ec94ac61f5407990eb6ad1c5270a33 Author: Florian Schroedl Date: Thu Sep 26 15:38:36 2024 +0200 Cleanup commit c8494c9931451eaff92b5001dfb87f9e7976a788 Author: Florian Schroedl Date: Thu Sep 26 15:32:46 2024 +0200 Remove unused commit 3843253a5da59c18d49c26a7220ef66a89195cc7 Author: Florian Schroedl Date: Thu Sep 26 15:27:16 2024 +0200 Dont render starting slash commit 5f6a76dfce9cbbf6e974f5734aafdefc3db80eec Author: Florian Schroedl Date: Thu Sep 26 15:24:02 2024 +0200 Use currently active sets as sets for temporary theme commit 29a2478bb5da3b6c14d96c0de7adddef8daa47a4 Author: Florian Schroedl Date: Thu Sep 26 15:15:50 2024 +0200 Fix theme group drop-down not updating group value commit b3ff480e81846d388218cf18c184596c26f09a33 Author: Florian Schroedl Date: Thu Sep 26 15:08:54 2024 +0200 Hide temporary theme commit 2104fc04df5ce9a73d66a793511e420ac79a1194 Author: Florian Schroedl Date: Thu Sep 26 14:28:27 2024 +0200 Fix theme select commit 9c97b31d286d702976282b4d00117274b645c328 Author: Florian Schroedl Date: Thu Sep 26 13:21:53 2024 +0200 Fix theme creation/editing commit 895f92e7c215e9004f435020e837cc357835780d Author: Florian Schroedl Date: Thu Sep 26 12:03:03 2024 +0200 Hide temporary token theme from user commit e216d84484b15b38955c7ed5a62028ecb35018ad Author: Florian Schroedl Date: Thu Sep 26 11:28:14 2024 +0200 Set toggling without a theme commit 6f086326f5c890e83585529fe4be8a7be14a0a08 Merge: 2f4a012be c755b764a Author: Florian Schrödl Date: Wed Sep 25 16:22:20 2024 +0200 Merge pull request #289 from tokens-studio/revert-288-active-themes Revert "Adds `active-themes` to `TokensLib`" commit c755b764a2cd597b02f6b4d5dd33c252ee828b79 Author: Florian Schrödl Date: Wed Sep 25 16:21:53 2024 +0200 Revert "Adds `active-themes` to `TokensLib`" commit 0b2b8a71fb32595aafb1f300586e70151e21dc13 Author: Florian Schroedl Date: Wed Sep 25 15:08:52 2024 +0200 Token deletion commit 9c1a509fa4f37b38376fefe71aa88e0ab4beaab9 Author: Florian Schroedl Date: Wed Sep 25 14:59:20 2024 +0200 Set renaming commit d2ed6b550139c0f6108cabd9ec0f141a64f663bc Author: Florian Schroedl Date: Wed Sep 25 14:45:31 2024 +0200 Add set commit 2f4a012beb0277d364c5f46f599bf0c700003be7 Merge: fb38e4378 6d75993fd Author: Florian Schrödl Date: Wed Sep 25 13:48:41 2024 +0200 Merge pull request #288 from tokens-studio/active-themes Adds `active-themes` to `TokensLib` commit 99e551925aa6cc3d12c8fcce9cc7a6564dabbb6b Author: Florian Schroedl Date: Wed Sep 25 11:08:54 2024 +0200 Updates commit 4d4c4355ad598a40d2e0d3d3aead1ec4767371be Author: Florian Schroedl Date: Wed Sep 25 08:33:34 2024 +0200 Selection by name commit ec96e7918d98d57f41e039ae2df9430b1f95e558 Author: Florian Schroedl Date: Wed Sep 25 08:16:29 2024 +0200 Token theme deletion commit 844819a50cd0c811209b4b97cd1c0e326eafd28f Author: Florian Schroedl Date: Tue Sep 24 15:25:29 2024 +0200 Activate themes via lib commit 4c327f38ef493e82bb94f6fed910520c6500ea51 Author: Florian Schroedl Date: Mon Sep 23 15:18:46 2024 +0200 Replace sets commit f5c122b0db2fd954402402a7ed0962f1bf781582 Author: Florian Schroedl Date: Fri Sep 20 14:42:48 2024 +0200 Remove legacy commit c6770f43c77b717bd9f791139c2ea1ffa5bffd8c Author: Florian Schroedl Date: Fri Sep 20 14:38:53 2024 +0200 Move out of legacy commit 43e5e780533c959e09c2ec22139a5d3a1d06786e Author: Florian Schroedl Date: Fri Sep 20 14:35:47 2024 +0200 Cleanup commit f5249196f994241dd3ec47c3e868ad44532bba1b Author: Florian Schroedl Date: Fri Sep 20 14:27:19 2024 +0200 Sets sidebar commit 501256f16bb28a13f1124bcb93fbd07d28f2ba8d Author: Florian Schroedl Date: Fri Sep 20 09:34:54 2024 +0200 Disable namespace loading info in console from shadow-cljs commit 9b2993a344335ed1cdd522c37d2447540f88bd5b Author: Florian Schroedl Date: Thu Sep 19 16:22:47 2024 +0200 Fix theme select commit 191d95798460844e73458c537d3bcd90a01272e3 Author: Florian Schroedl Date: Thu Sep 19 16:06:53 2024 +0200 Use theme listing commit 743f61f2cd4ed5bf29a8846370e268b26a7cf3b8 Author: Florian Schroedl Date: Thu Sep 19 15:44:56 2024 +0200 Adding themes commit 7758e48c48b41f5367f80c3230fdd9a8d8ee8274 Author: Florian Schroedl Date: Thu Sep 19 10:52:15 2024 +0200 Add legacy macro commit 80e89037549266f5d29f7cfc09bf7f59da701eec Author: Florian Schroedl Date: Thu Sep 19 10:26:17 2024 +0200 Refactor: Use tokens-lib for getting tokens theme commit 6d75993fd70605d1403410948b01cf7903cc9354 Author: Florian Schroedl Date: Tue Sep 24 14:24:35 2024 +0200 Move theme-path impl to ITokenTheme commit 49579d75c6b8ba03556b9208e207c8a63de36529 Author: Florian Schroedl Date: Tue Sep 24 13:42:56 2024 +0200 Simplify as this commit d7d974242ee88aa9e0b90a4d1f35421afee65a3a Author: Florian Schroedl Date: Tue Sep 24 11:18:12 2024 +0200 Add active-themes to data serialization tests commit f2569a1c4a271190e2e5335e55cfe88c9cd7f999 Author: Florian Schroedl Date: Tue Sep 24 11:13:41 2024 +0200 Cleanup commit 44e4e852017c5cbfd844bf246a30cbf3cde58a66 Author: Florian Schroedl Date: Tue Sep 24 11:10:07 2024 +0200 Add schema validation commit 5e39f33bff37ee7e4cc572095ace1e4f744d7d33 Author: Florian Schroedl Date: Tue Sep 24 11:06:12 2024 +0200 Rename with theme prefix commit 416297d298ad73fc67e396613074734a195c8cd7 Author: Florian Schroedl Date: Mon Sep 23 17:37:16 2024 +0200 Implement active-themes commit fb38e4378ae728efd0ed54781b776be7ffd7e984 Merge: 1a9d703bb 5b7b343f6 Author: Florian Schrödl Date: Wed Sep 18 18:10:42 2024 +0200 Merge pull request #273 from tokens-studio/color-token Color token commit 5b7b343f62d0c12f12f10a4db9238a4e1fa7482a Author: Florian Schroedl Date: Wed Sep 18 17:25:55 2024 +0200 Cleanup commit f5b62a5fc1b14556bc8c81b29a68ab430db0371b Author: Florian Schroedl Date: Wed Sep 18 17:23:42 2024 +0200 Style the form to fit the color ramp exactly commit 8804d1432efee8a0934d3d1323690384141fb0b2 Author: Florian Schroedl Date: Wed Sep 18 17:15:45 2024 +0200 Update the input field value when chosing color from color ramp commit 6084c495821c57e4de62eef652bfa9afcde806eb Author: Florian Schroedl Date: Wed Sep 18 17:03:18 2024 +0200 Share color picker effect to set hue slider css variables commit 2a3fc9e7bdd566ab043f7cb92e6d2abbac2ef1bb Author: Florian Schroedl Date: Wed Sep 18 17:03:08 2024 +0200 Pointer commit 061cd08e66886ba17510fa667566f3ac6ab53832 Author: Florian Schroedl Date: Wed Sep 18 11:43:35 2024 +0200 Remove unused functions commit 48a8b1bc553920420617f453451bce15742790eb Author: Florian Schroedl Date: Wed Sep 18 11:30:32 2024 +0200 Fix color updating commit c007170603fca7221e78d5def0c64065925645da Author: Florian Schroedl Date: Wed Sep 18 11:28:31 2024 +0200 Cleanup commit b68e7af84454b7b86bef8c03ebc33c2dcc5bb70b Author: Florian Schroedl Date: Wed Sep 18 11:27:30 2024 +0200 Use tinycolor to convert hex color commit e0e7b98ed79b83d51c551e9cceef955c1fc8eb50 Author: Florian Schroedl Date: Wed Sep 18 11:21:43 2024 +0200 Docstring commit 3bd2278dec0064cac9df6a3d47a2ca81bbe3d23b Author: Florian Schroedl Date: Wed Sep 18 11:15:11 2024 +0200 Use penpot logging system instead of custom debug flag commit 77141887a8a742848301d59cb9c7b6371dc39444 Author: Florian Schroedl Date: Wed Sep 18 10:57:05 2024 +0200 Pass in value with error commit 3a21643158bbc83ac7542c75e6c2281f1a745bfc Author: Florian Schroedl Date: Wed Sep 18 10:38:16 2024 +0200 Add shared error handling commit 308fff05c3d93a3a38e5eec2b3a0f6539cd12c95 Author: Florian Schroedl Date: Wed Sep 18 10:19:59 2024 +0200 Dont show name error when editing new token and not touching name field commit 49ff0df7f6e8e3c41bf92c2a392d21f81c2b945d Author: Florian Schroedl Date: Tue Sep 17 16:35:08 2024 +0200 Add tinycolor bindings commit 3c4e0e244785d1374d2925f3559712af61e986c1 Author: Florian Schroedl Date: Mon Sep 16 16:57:01 2024 +0200 Add color ramp commit ac51309f81bb245c8bf919eb16270e13b33298b8 Author: Florian Schroedl Date: Mon Sep 16 15:59:04 2024 +0200 Add placeholder color swatch commit 2b886c54e02054f6d917e1e767f7c1efc34194ec Author: Florian Schroedl Date: Thu Aug 29 12:52:18 2024 +0200 Color ramp wip commit 0b29767c9581d0296fd1f8a7b553a27f01d25ca8 Author: Florian Schroedl Date: Fri Aug 30 11:51:21 2024 +0200 Add color token commit 1a9d703bb1c8cd293b7115986c1049ee06c65019 Merge: 0697e6988 f0a9444ab Author: Andrés Moya Date: Wed Sep 18 11:00:06 2024 +0200 Merge pull request #284 from tokens-studio/refactor-theme-groups tokens-lib refactor: Get collection of theme groups commit f0a9444ab602be1c213661c4fa8d5cd77b63f7a1 Author: Florian Schroedl Date: Tue Sep 17 10:48:23 2024 +0200 tokens-lib refactor: Get collection of theme groups commit 0697e6988866fbd41009e6257e04aca70253759d Merge: 1d7536687 0e15da5ed Author: Florian Schrödl Date: Tue Sep 17 09:44:00 2024 +0200 Merge pull request #283 from tokens-studio/refactor-types-2 Refactor types 2 commit 0e15da5edea0362fe8c8ea10cea37c30a77eb8d0 Author: Andrés Moya Date: Tue Sep 17 00:51:33 2024 +0200 :wrench: Make tokens again a flat ordered map commit 5f703d6a79e7281426a3124129021fb6c6d84392 Author: Andrés Moya Date: Mon Sep 16 17:47:05 2024 +0200 :wrench: Make themes a two-level only tree commit 3a4ec32f8e3851b3385d098d619b97f484835a22 Author: Andrés Moya Date: Thu Sep 12 10:04:03 2024 +0200 :wrench: add groups handling v2 commit e2ff6f7ba65e8c9c2d0fb3dcbe2c406b8de6bb48 Author: Andrés Moya Date: Thu Sep 5 17:51:02 2024 +0200 :wrench: Add first draft of token set groups attributes commit fa8f8ac54b66944f7027a0c4b758e940877ce3c2 Author: Andrés Moya Date: Thu Sep 5 16:49:29 2024 +0200 :wrench: add groups handling commit 316d333c9647ec56629d787d24edfff1ead82e23 Author: Andrés Moya Date: Wed Sep 4 02:00:31 2024 +0200 :wrench: Add token themes in tokens-lib custom type commit 1d7536687aff0da247dcafe53100811d3a792596 Merge: 6cba685e8 27073e22e Author: Florian Schrödl Date: Thu Sep 12 17:27:39 2024 +0200 Merge pull request #282 from tokens-studio/enable-ff Enable sets/themes for all commit 6cba685e87ca4c0fe9feb0a29b98dd8bdda5e31e Merge: 6f37a43be a1e4d6b3b Author: Florian Schrödl Date: Thu Sep 12 13:17:26 2024 +0200 Merge pull request #281 from tokens-studio/token-refactor-common Fixes missing name attribute commit 27073e22e3f3cb617630c588bf449d37c91e7edc Author: Florian Schroedl Date: Thu Sep 12 13:16:35 2024 +0200 Enable sets/themes for all commit a1e4d6b3b3759fa3e8dd80992fde82c33d0e368c Author: Florian Schroedl Date: Thu Sep 12 10:36:05 2024 +0200 Fix context menu missing name param commit 309476fdfdee58675ff6bcc35e8c1a62cfc5e99c Author: Florian Schroedl Date: Thu Sep 12 10:23:45 2024 +0200 Cleanup commit 6f37a43be1a349ad3c8259753c8601a2a3518982 Merge: 361b02a76 0dca04733 Author: Florian Schrödl Date: Wed Sep 11 15:35:45 2024 +0200 Merge pull request #262 from tokens-studio/refactor-types-1 :wrench: Add tokens-lib custom type commit 361b02a76ab3606a324abbd53bce871996de631c Merge: 1568a7afb 0cd7d4dd7 Author: Florian Schrödl Date: Wed Sep 11 15:11:22 2024 +0200 Merge pull request #279 from tokens-studio/fix-inspect-tokens-tab Disable tokens tab in inspect mode commit 1568a7afb51a99c6aeaefa652c7faef87deccb03 Merge: f5ab6e65f 20e2c4edb Author: Florian Schrödl Date: Wed Sep 11 15:11:02 2024 +0200 Merge pull request #278 from tokens-studio/fix-set-token-name Allow giving name of tokens in other sets commit 0cd7d4dd7ada5d8dc947b287a836309c7037fff9 Author: Florian Schroedl Date: Wed Sep 11 11:09:06 2024 +0200 Disable tokens tab in inspect mode commit f5ab6e65fc2e0a43ab4e3b35e1840831ec8e153f Merge: 012e79603 56374171d Author: Florian Schrödl Date: Wed Sep 11 11:02:55 2024 +0200 Merge pull request #277 from tokens-studio/group-select-themes Themes & Sets: Add groups select to modal commit 20e2c4edb13594ae228585917312aeb9a93d493e Author: Florian Schroedl Date: Wed Sep 11 10:17:46 2024 +0200 Allow giving name of tokens in other sets commit 012e79603ffab04eaa36be15021af180474b7710 Merge: 27409f43d 9876c2e4f Author: Florian Schrödl Date: Wed Sep 11 09:09:51 2024 +0200 Merge pull request #276 from tokens-studio/token-sets-context-menu Token Sets & Themes: Sets context menu commit 56374171d6ac79488753e59d4a488d1b5acc0112 Author: Florian Schroedl Date: Tue Sep 10 15:44:11 2024 +0200 Fix theme groups not showing up in create state commit 281b801112ecb43029cd74dbd039328ea4bc08cc Author: Florian Schroedl Date: Tue Sep 10 15:42:44 2024 +0200 Show dropdown only when groups exist commit 21f42021d85b332bb7bb027409cbd0536cfa9e49 Author: Florian Schroedl Date: Tue Sep 10 15:37:01 2024 +0200 Add groups select commit df16d0c222d6a90f2f73af6e9a53d2632283d852 Author: Florian Schroedl Date: Tue Sep 10 15:16:52 2024 +0200 Add abstract dropdown component commit d54c5476d8a1405b0de0677940ef24dc5f117c28 Author: Florian Schroedl Date: Tue Sep 10 14:33:45 2024 +0200 Add dropdown button commit 9876c2e4fca483587198434deff83fd40c425773 Author: Florian Schroedl Date: Tue Sep 10 12:51:07 2024 +0200 Add context menu commit 0dca0473397c28349ac653e1bc5ef98cbd20b05c Author: Andrés Moya Date: Tue Sep 3 14:20:55 2024 +0200 fix token update commit d147d844fbe9b26f941f4845c50330f9cd0c71ce Author: Andrés Moya Date: Fri Aug 16 12:11:18 2024 +0200 :wrench: Add tokens-lib custom type commit 27409f43d2de6a63b1a90de49d4d4cbad2773a24 Merge: 734acd27b ae5aaf833 Author: Florian Schrödl Date: Fri Aug 30 11:15:31 2024 +0200 Merge pull request #264 from tokens-studio/token-sets-themes-ui Token sets themes UI commit ae5aaf83327aeb6ce06d9b869a66bc13ba65fafe Author: Florian Schroedl Date: Thu Aug 29 16:02:22 2024 +0200 Cleanup commit 54b754c38c475ca2fe2ead19df56bb2f8e4641c0 Author: Florian Schroedl Date: Thu Aug 29 16:01:31 2024 +0200 Cleanup commit ca611c66684f7c7a084652107f32aa25cf043406 Author: Florian Schroedl Date: Thu Aug 29 15:59:58 2024 +0200 Cleanup commit 6bae2efe9dc703cc070dabc8757c097a69fc0f92 Author: Florian Schroedl Date: Thu Aug 29 14:26:11 2024 +0200 Validate against names in all token sets commit 734acd27b98fe7f47567b5eb75fcfc5c5cc8a800 Merge: 93ce6b6eb 1ed6d92d8 Author: Florian Schrödl Date: Tue Aug 27 17:09:47 2024 +0200 Merge pull request #263 from tokens-studio/token-sets-themes Token sets themes commit e363b58774620c5170486ea887f154b78d391894 Author: Florian Schroedl Date: Tue Aug 27 15:22:02 2024 +0200 HACK: Fix empty sets showing up in listing commit b24b178e29b42232ed29d6cfd96be083ca778d84 Author: Florian Schroedl Date: Tue Aug 27 15:00:15 2024 +0200 Make resizable commit d6823e8583100f744a0ac660818f608395e7e526 Author: Florian Schroedl Date: Tue Aug 27 14:49:11 2024 +0200 Always switch to temporary theme when toggling sets in sidebar commit 3bb99e8f7cffb3f2a8bb5fca755ac0a5aca8d245 Author: Florian Schroedl Date: Tue Aug 27 14:37:24 2024 +0200 Remove default theme name, disable empty themen name submit commit 3b7432a859796d0a5421df3801e5eeca021567ef Author: Florian Schroedl Date: Tue Aug 27 14:32:26 2024 +0200 Use non editable context in form commit 4dd3367bdda6ff509a25e01c0297bdc4c26503fd Author: Florian Schroedl Date: Tue Aug 27 14:26:06 2024 +0200 Allow creating token sets commit d4910ce2fc56d5dd5c4f730c8b20ff9a2ddcc221 Author: Florian Schroedl Date: Tue Aug 27 14:25:52 2024 +0200 Auto select new token sets commit 4f96550bca264fa4a06441d3993407a079db4340 Author: Florian Schroedl Date: Tue Aug 27 14:13:29 2024 +0200 Use context commit db22beb857bdf1b3edced74828815bea6ec52d2f Author: Florian Schroedl Date: Tue Aug 27 10:20:38 2024 +0200 Fix iterating over unordered sets commit 965016b63f405dd82bd79a2ae9f1cbf906e4fcd6 Author: Florian Schroedl Date: Tue Aug 27 10:04:12 2024 +0200 Allow token renaming commit 293250a30d86a67415d2d3b133cd296a1edc3aff Author: Florian Schroedl Date: Mon Aug 26 16:35:49 2024 +0200 Rename commit 1d599cbf7d78d5706f4d97a7ef742fa9bc5e0154 Author: Florian Schroedl Date: Mon Aug 26 16:33:07 2024 +0200 Always render ungroupd themes first commit 0d2d1a8b8a6609a8965c360e05b6d6f6ac93e86f Author: Florian Schroedl Date: Mon Aug 26 16:23:23 2024 +0200 Link up actions commit cb46e111622abfb09cf805d85dbb5f0223d5168c Author: Florian Schroedl Date: Mon Aug 26 16:14:27 2024 +0200 Add edit button commit c807baaf7a8ac757bd9cbca3052bb1866842a31c Author: Florian Schroedl Date: Mon Aug 26 15:54:44 2024 +0200 Add custom select with grouped options commit f25db592a07f974482bae7bc7a01c4b42b7ee58c Author: Florian Schroedl Date: Mon Aug 26 15:07:58 2024 +0200 Clone over select commit 2e23543c112caae6366e3a042b58feb8e8f5cc46 Author: Florian Schroedl Date: Mon Aug 26 15:04:45 2024 +0200 Show create text when no theme is available commit 4060b6d40f26f4848e5ee893b252f2f0f162fd7f Author: Florian Schroedl Date: Mon Aug 26 15:02:38 2024 +0200 Style empty state, jump to create theme dialog when no themes exist commit 7cd9c60fb6cec0fa415b6724a493d8fc35bfac3d Author: Florian Schroedl Date: Mon Aug 26 14:36:00 2024 +0200 Disable user-selection commit 5939db771ede2e57163cc8d0b3557e7bea915320 Author: Florian Schroedl Date: Mon Aug 26 14:34:41 2024 +0200 Link up delete button & fix create theme ui jumping commit 1405720e0b4905bd946d57316835e40cd39b5442 Author: Florian Schroedl Date: Mon Aug 26 14:32:21 2024 +0200 Cleanup commit b5e08c5b8b3fa6f8c89b0ff2adbdefbb86e3a15a Author: Florian Schroedl Date: Mon Aug 26 14:32:01 2024 +0200 Add theme creation form commit f37cf8be5e0503d3e14f2c3959d48455f98f1e76 Author: Florian Schroedl Date: Mon Aug 26 14:31:34 2024 +0200 Add defaults for theme form commit 84b5be5547884e9243e78f5b319de7f820beca23 Author: Florian Schroedl Date: Mon Aug 26 14:17:37 2024 +0200 Fix button being chosen as main button for form submit commit 7aff690e7be492f402b0f897bac0a1a7c340e02c Author: Florian Schroedl Date: Mon Aug 26 14:17:30 2024 +0200 Wire up theme updating commit 70b570f112101157d76bc5cc101b6bb94c128122 Author: Florian Schroedl Date: Mon Aug 26 13:49:57 2024 +0200 Show only on create commit 36f92aa241efa3bfb0e3e7d700aad615151e5bbb Author: Florian Schroedl Date: Mon Aug 26 13:47:44 2024 +0200 Allow group and name updating commit a0dd3f63bf543058d1d83982d29e61147de1af36 Author: Florian Schroedl Date: Mon Aug 26 13:41:02 2024 +0200 Allow controlling state of theme editing commit fe702988f9324a9e4c83a2d70d0ffbdb6a5e1c2b Author: Florian Schroedl Date: Mon Aug 26 13:40:49 2024 +0200 Cleanup commit 12e915dec89ce6e24fd4bf636c10c6d7fa8d1cd1 Author: Florian Schroedl Date: Fri Aug 23 17:48:43 2024 +0200 Style edit button commit a52e20f49db6313ccfdcd048658c184d8684196e Author: Florian Schroedl Date: Fri Aug 23 17:22:05 2024 +0200 Cleanup commit 967fab416a2506d44d30c76454ecf1bca2ac9444 Author: Florian Schroedl Date: Fri Aug 23 17:20:20 2024 +0200 Add back button commit 3ce2531b427715c253371325adc382f9f33dff7c Author: Florian Schroedl Date: Fri Aug 23 17:11:38 2024 +0200 Design commit db1250a3158a9f9253f6d8b8a12b43e5ffbd80a6 Author: Florian Schroedl Date: Fri Aug 23 17:07:47 2024 +0200 Add footer buttons commit 6f7b69c7ee5fff6eb591f4d2dbd02d7a5950426a Author: Florian Schroedl Date: Fri Aug 23 16:58:49 2024 +0200 Allow toggling individual set themes commit 7e7203eb7cd1e494fd5c497ba5d439597b0868f4 Author: Florian Schroedl Date: Fri Aug 23 16:44:11 2024 +0200 Allow passing custom functions commit 8a20e3a698f29a66e4b189b03e86cbfe10477a47 Author: Florian Schroedl Date: Fri Aug 23 16:34:33 2024 +0200 Allow tokens sets component to be controlled commit 1c0233098d479fdc71a46a5567ac3106cb518990 Author: Florian Schroedl Date: Fri Aug 23 16:28:06 2024 +0200 Add sets list for theme commit c7fa0f2cf8702c21f0703f940a6aeaf53bcb94a6 Author: Florian Schroedl Date: Fri Aug 23 16:27:42 2024 +0200 Cleanup commit cac421f862a48a939bbfbe591c16613183ff41f6 Author: Florian Schroedl Date: Fri Aug 23 15:41:32 2024 +0200 Design commit 7970440ffca53db6ccf0dc4d0006a7622cca9a1a Author: Florian Schroedl Date: Fri Aug 23 15:30:17 2024 +0200 Toggle theme via ui commit cc7de14539455047a3308d9f79a56e279d9ea2fa Author: Florian Schroedl Date: Fri Aug 23 15:08:53 2024 +0200 Add basic toggle switch commit d23c5cbbbe182b0decd7cf03e5881946fd759114 Author: Florian Schroedl Date: Fri Aug 23 14:53:22 2024 +0200 Move the temporary ui to modal commit b62722bdbb7527ee7fc78ffa84a0c066bb8a0911 Author: Florian Schroedl Date: Fri Aug 23 14:11:13 2024 +0200 Add themes modal dialog commit 1ed6d92d87d1042220a55ca1c5cc3ca21d98f701 Author: Florian Schroedl Date: Fri Aug 23 13:36:46 2024 +0200 Remove margin commit b48bfde5c8a6894ef9e279cea76a5b672be717bd Author: Florian Schroedl Date: Fri Aug 23 11:43:19 2024 +0200 Automatically open when creating set commit 1cc1d94a27ae05b70e5770e7dd5e4aaa1ef74868 Author: Florian Schroedl Date: Fri Aug 23 11:42:14 2024 +0200 Automatically open when adding token commit 40846b87c26a8555feb530db68d43bd59cc88cbb Author: Florian Schroedl Date: Fri Aug 23 11:39:13 2024 +0200 Add tokens header commit acc3606cbb818c7c20732391ef93828b890f81f0 Author: Florian Schroedl Date: Fri Aug 23 11:36:54 2024 +0200 Align Eye commit 97f119f3da0e1c11e697203b39d0063d29055cbb Author: Florian Schroedl Date: Fri Aug 23 11:32:54 2024 +0200 Add delete set action button commit 88c899c5c6951b3d9cb0f1cdbbcc4cb564f10364 Author: Florian Schroedl Date: Fri Aug 23 10:17:52 2024 +0200 Wrap themes ui in header commit a9a5f69c935e423ad046e236aa30aadcd2911d54 Author: Florian Schroedl Date: Fri Aug 23 10:15:37 2024 +0200 Cleanup commit bac16aadd80f5583d6291164a62203466c71694e Author: Florian Schroedl Date: Fri Aug 23 10:14:45 2024 +0200 Migrate to official UI commit b1cf641587189085417a78f5c9df269ef2357586 Author: Florian Schroedl Date: Thu Aug 22 14:56:41 2024 +0200 Fix cancelling set prompt breaking user state commit e4f01d1d5ed3a9efbc772cccee7e19dcb64b1952 Author: Florian Schroedl Date: Thu Aug 22 11:59:06 2024 +0200 Fix logic commit 157cc5a994a5ed3d0c03a1bfe358d9bcea890226 Author: Florian Schroedl Date: Thu Aug 22 11:21:53 2024 +0200 Automatically show themes and sets on dev and PR previews commit 37a3fbcec26adee76ca0db2c67969f3a7b261b91 Author: Florian Schroedl Date: Thu Aug 22 11:02:01 2024 +0200 Fix not possible naming token to same token name in other set commit 8343a9f3b52024adac19930e9937fa994beacca2 Author: Florian Schroedl Date: Thu Aug 22 10:59:40 2024 +0200 Fix description commit 4b47fa5d7a087662c7ddc10536a15109736e2a2d Author: Florian Schroedl Date: Thu Aug 22 10:58:31 2024 +0200 Fix names clash commit 7a2a521075f5184a3605c0253b840189333abd8f Author: Florian Schroedl Date: Thu Aug 22 10:54:41 2024 +0200 Allow passing config commit 6c802bc132c29462704240a97864d2f0690d4160 Author: Florian Schroedl Date: Thu Aug 22 09:37:47 2024 +0200 Rename commit c130dc39c394edd973f689ae0f4eb6a46e2c3eeb Author: Florian Schroedl Date: Wed Aug 21 19:11:53 2024 +0200 Resolve tokens from other active sets commit 8264da3a2a48c05544989332b60e0e11f49082b9 Author: Florian Schroedl Date: Wed Aug 21 15:36:40 2024 +0200 Use active sets tokens for form commit 6c6be35292c4e292935e138438c1aad6601b89d0 Author: Florian Schroedl Date: Wed Aug 21 15:12:13 2024 +0200 Fix token updates not taking order commit 011fc734f63990023bbc47b07025d198f6e952a4 Author: Florian Schroedl Date: Wed Aug 21 14:42:39 2024 +0200 Make passing of names-map explicit commit 7c3716a709c5263bc8fed1116b84d9d09d341f05 Author: Florian Schroedl Date: Wed Aug 21 11:18:52 2024 +0200 Move temporary ui behind flag commit 98207b02bf6d566006442dbcc05e0300b1f3df79 Author: Florian Schroedl Date: Wed Aug 21 11:18:47 2024 +0200 Remove log commit 0df89cf60d992856fc284ce32c404bbe40138d08 Author: Florian Schroedl Date: Wed Aug 21 11:17:12 2024 +0200 Use storage to toggle themes ui commit 2df577cba29be78279fdc8b1d5b5bcb11ed10d08 Merge: 4e81a94d0 93ce6b6eb Author: Florian Schroedl Date: Wed Aug 21 11:04:00 2024 +0200 Merge remote-tracking branch 'origin/token-studio-develop' into token-sets-themes commit 4e81a94d0fbe4d187ae6ab18f431b5e32baea5ea Author: Florian Schroedl Date: Wed Aug 21 11:03:39 2024 +0200 Remove unused functions commit 4f02d8b47d472fc46a2feb085b9df2521d9d5297 Author: Florian Schroedl Date: Wed Aug 21 11:01:23 2024 +0200 Fix multi run test commit 74801e72d315364f0331cb7684f39de4aa43808e Author: Florian Schroedl Date: Wed Aug 21 10:54:22 2024 +0200 Fix simple token creation / scaffolding test commit cfefbadb64ce6c8ee603deed346cd0ec02f3af11 Author: Florian Schroedl Date: Wed Aug 21 10:29:14 2024 +0200 Fix id commit 93ce6b6eb3d6b7e0071ee06e44385794c5af5aed Merge: 9dd681c15 f9704fe7a Author: Akshay Gupta Date: Tue Aug 20 22:14:51 2024 +0530 Merge pull request #256 from tokens-studio/token-sets-ui Token sets UI commit f9704fe7aaa74f082d0466c65dd7a9247bc45197 Author: Florian Schroedl Date: Tue Aug 20 18:40:02 2024 +0200 Fix padding without sets commit 2487f34b721a2a269d23ac910a58f35f009f3aef Author: Akshay Gupta Date: Tue Aug 20 21:34:07 2024 +0530 formatting commit b3e939d12a42f853ad0a8a002965443c1e9cc1e0 Author: Akshay Gupta Date: Tue Aug 20 21:30:59 2024 +0530 add a hardcoded flag to display/hide token sets section commit 247e3a1559dbc63eae83e37268950820c32ff548 Author: Akshay Gupta Date: Tue Aug 20 21:25:22 2024 +0530 fix some styling issues commit 5b1eaf4b8f30ba5f7ff9b6f9c55b7f65bfb692f9 Author: Akshay Gupta Date: Tue Aug 20 20:55:02 2024 +0530 remove unused prop and some optimizations commit 463ab3c866b16df2e3eeeeb4735bbb347c2aa02d Author: Akshay Gupta Date: Tue Aug 20 20:41:25 2024 +0530 change current-set to selected-set commit 5358cd1c52130a0ce13c73c93fb7e6e88a40c406 Author: Florian Schroedl Date: Tue Aug 20 16:14:32 2024 +0200 Fix tests crashing commit 3a2f4df3878b86f899f30bdde95ee5bb0e714efb Author: Akshay Gupta Date: Tue Aug 20 17:08:31 2024 +0530 add source code comment commit 1a3184d327c5b1de3af6146198c9c37643450a4d Merge: 187ab3166 9dd681c15 Author: Akshay Gupta Date: Tue Aug 20 17:02:00 2024 +0530 Merge branch 'token-studio-develop' into token-sets-ui commit 187ab31667432bda53ff914c18fa96b0050d6581 Author: Akshay Gupta Date: Tue Aug 20 17:00:19 2024 +0530 format commit feb5cec84b0710100a41a2e0ca6d2e4a18a20177 Author: Akshay Gupta Date: Tue Aug 20 16:57:53 2024 +0530 ad sets-section wrapper commit f052b75dacb0c256642ef2b9ed8d212fedb9183d Author: Akshay Gupta Date: Tue Aug 20 16:38:18 2024 +0530 formatting commit e62323ac0a254483a5a5285c580d8f9c1503982f Author: Akshay Gupta Date: Tue Aug 20 16:35:33 2024 +0530 add variable commit d4c88d444161421134b5dc47803922d05e972209 Author: Akshay Gupta Date: Tue Aug 20 16:32:36 2024 +0530 remove folder open icon commit 4bad9fa6f889965e9044389ec982109eef2b52fd Author: Akshay Gupta Date: Tue Aug 20 16:30:51 2024 +0530 add chevron icon commit e4f5b6005eb1a8ac5b6705beb7ad3e1579dbcc00 Author: Akshay Gupta Date: Tue Aug 20 16:30:38 2024 +0530 move sets-sidebar component to sidebar tokens commit 98b5791e273115cd7edea8287708512033e8df1d Author: Akshay Gupta Date: Tue Aug 20 15:37:37 2024 +0530 remove set-item-set-selected and remove class commit 6049c328390d14f43572ef93b6d680d453004b02 Author: Florian Schroedl Date: Mon Aug 19 15:46:42 2024 +0200 Compute tokens from each activated set commit 8e02dced2f420936abe6885e557a540989ac43bd Author: Florian Schroedl Date: Mon Aug 19 10:49:46 2024 +0200 Extract to function commit 97436531d080abc70e035d80e56e49acbfb85e95 Author: Florian Schroedl Date: Mon Aug 19 10:46:48 2024 +0200 Showing only active sets commit 8660c372dcef5de1a82a061ee766f49c66db6afd Author: Florian Schroedl Date: Mon Aug 19 09:41:23 2024 +0200 Add theme deletion commit 3413d4b42f8dc3c054545cd90d7ffed9fcf4ca91 Author: Florian Schroedl Date: Mon Aug 19 09:09:09 2024 +0200 Add tests commit 93a23c66ecdae67cb4a38a5f0fa0b7bc765fad9e Author: Florian Schroedl Date: Mon Aug 19 09:01:08 2024 +0200 Docstrings commit e8bbb75008a01bf923b4a35c783ba83ef6fafb30 Author: Florian Schroedl Date: Mon Aug 19 08:49:03 2024 +0200 Implement group theme switching commit 9a745ea8bcec458ed7ea65e47d04cbbb09589fe0 Author: Florian Schroedl Date: Mon Aug 19 08:05:19 2024 +0200 Add active theme toggling commit f0e0e9334e05b65e5fed77ff73b44c3cf7ee79a3 Author: Florian Schroedl Date: Mon Aug 19 07:29:20 2024 +0200 Cleanup commit ae1c30ad562a59a5f23b192b39531d0b60f5293f Author: Florian Schroedl Date: Fri Aug 16 14:22:56 2024 +0200 Allow providing set name commit e502def7553b03fe4c26db71ec77e743ff95aed9 Author: Florian Schroedl Date: Fri Aug 16 14:21:25 2024 +0200 Show themes commit 62712ef8dae6fea768b8e500dd232a4f5850b08c Author: Florian Schroedl Date: Fri Aug 16 13:59:18 2024 +0200 Cleanup styles commit 6a7ced3204785426f9ba7951d0223d61e4722bf0 Author: Florian Schroedl Date: Fri Aug 16 13:36:54 2024 +0200 Add token set visibility toggle commit 636c3b822cca5bf0ebe15c1460452cbaf24a1547 Author: Florian Schroedl Date: Fri Aug 16 12:22:57 2024 +0200 Example styling commit c2a045ad5b9227fc124ec9da5185668bd190684f Author: Florian Schroedl Date: Fri Aug 16 11:44:41 2024 +0200 Add selected sets UI commit 0f95ddef8fd5ec8d51b864b5f3ef02a3e106afa5 Author: Florian Schroedl Date: Fri Aug 16 11:32:36 2024 +0200 Add new sets to active theme commit 3e41e7d2343227f5b67c29feb1c98af6d0224121 Author: Florian Schroedl Date: Fri Aug 16 11:32:20 2024 +0200 Fix workspace-data key missing commit 879ef1123f18e61d80405143c70681b55dde2a67 Author: Florian Schroedl Date: Fri Aug 16 10:32:59 2024 +0200 Create temporary theme when creating set commit 9329513949202ab191212af3a306bd94918158fd Author: Florian Schroedl Date: Fri Aug 16 08:04:41 2024 +0200 Add token set deletion commit ae39586d8c6fd8a98600a3a8d9191815571c9bef Author: Florian Schroedl Date: Fri Aug 16 07:10:15 2024 +0200 Add temporary theme commit 4c1bc81b19b8c3c6f7455728ad9dc95fddd71163 Author: Florian Schroedl Date: Fri Aug 16 07:10:08 2024 +0200 Add name commit 7406af2e796aa341196974aec5fc259215f12375 Author: Florian Schroedl Date: Fri Aug 16 07:09:59 2024 +0200 Add theme creation commit 8482a128de0f25290767614f2a869094ea1aeb87 Author: Florian Schroedl Date: Fri Aug 16 07:09:17 2024 +0200 Fix expeted id instead of set commit 3695ba343824c51470d0fbc714a9741c00bb27a2 Author: Florian Schroedl Date: Fri Aug 16 07:09:07 2024 +0200 Add token theme data scaffold commit 35759792a35fa0587d60b182b812eb6d351e8089 Author: Florian Schroedl Date: Fri Aug 16 06:24:15 2024 +0200 Render grouped themes ui commit f0aaa29d6674e85e400a6242e28bff12c78368c8 Author: Florian Schroedl Date: Fri Aug 16 06:24:03 2024 +0200 Add type functions commit cefa498f4d41c838710d0fa1366e14c5ffee5e52 Author: Florian Schroedl Date: Fri Aug 16 06:23:53 2024 +0200 Add group and selected properties to theme commit f3d4346c0dff3d1586f8d0c3fdf9984610c07e87 Author: Florian Schroedl Date: Thu Aug 15 18:52:42 2024 +0200 Add create token-set event commit 1f0c1dbbe6cc2e39c1c28abed2980475f9ba4b8c Author: Florian Schroedl Date: Thu Aug 15 18:52:31 2024 +0200 Update shapes on token set switch commit 587a2936e68009a598254ac626311b02ad747645 Author: Florian Schroedl Date: Thu Aug 15 18:26:37 2024 +0200 Add simple UI commit 73078d802af127b9444a0d21c195706585a3400b Author: Florian Schroedl Date: Thu Aug 15 18:26:20 2024 +0200 Add refs commit eaf568f1549e6ed5637340910209e40a297a6f6e Author: Florian Schroedl Date: Thu Aug 15 14:26:22 2024 +0200 Get tokens from current or first token set commit ead8a983ab4753b840c8aa796309783d05c3f1d8 Author: Florian Schroedl Date: Thu Aug 15 14:26:12 2024 +0200 Move to token-set namespace commit 9dd681c1568e3f58452b9adf0810bbb637470c9d Merge: b2962b560 43e064a76 Author: Florian Schrödl Date: Thu Aug 15 12:28:19 2024 +0200 Merge pull request #254 from tokens-studio/fix-token-editing Fix token editing commit 43e064a768b3fea692120c13574f3585f08d9e79 Author: Florian Schroedl Date: Thu Aug 15 10:12:45 2024 +0200 Update doc string commit 4bd3b14adbe6c1b98cbbd4fa177c9c8887305851 Author: Florian Schroedl Date: Thu Aug 15 10:07:12 2024 +0200 Add unit to tests commit e4e488a9eee087befc68aaede1060d381b239af3 Author: Florian Schroedl Date: Thu Aug 15 10:03:25 2024 +0200 Adds style-dictionary test commit c6d13af071d82ea401c7d73c5ced00f58d1c0e31 Author: Florian Schroedl Date: Thu Aug 15 09:21:49 2024 +0200 Fix validation not working while editing [*] [*] We've passed the resolved tokens to the validation, but the validation needs the original tokens set. commit 6be2ca8491a4ea402d543360a2fab89fd8e4e922 Author: Florian Schroedl Date: Thu Aug 15 09:21:18 2024 +0200 Fix resolved value not showing up when editing token commit b2962b5603bd53cf074676bb0a772250b0c65378 Merge: c7d4db900 ecf4fb8bd Author: Florian Schrödl Date: Wed Aug 14 19:41:36 2024 +0200 Merge pull request #251 from tokens-studio/fix-spacing-token Fixes design tab spacing token commit ecf4fb8bd055fc0be230f85f4ded8da1a53cda96 Author: Florian Schroedl Date: Wed Aug 14 16:52:46 2024 +0200 Fix popover position commit 1ba2acea7c2e296b95f2bbe7d867c5fc52a5b67d Author: Florian Schroedl Date: Wed Aug 14 16:39:43 2024 +0200 Fix crash for applying spacing layout token commit cf9ef2ae6038734557fe1a3c4ff8d4eb703afae7 Author: Florian Schroedl Date: Wed Aug 14 15:33:24 2024 +0200 Remove unused function commit 74c6228c25459a92c3d4fe8e6508299196aceb59 Author: Akshay Gupta Date: Wed Aug 14 17:15:30 2024 +0530 add dom/stop-propagation commit 188e7d220a5a315388e8faa11fc66b8d439cf201 Author: Florian Schroedl Date: Wed Aug 14 09:25:17 2024 +0200 Fix name commit c7d4db900e735152738baa4c6451f59eb1be69aa Merge: d8621974c 726b0a267 Author: Florian Schrödl Date: Wed Aug 14 09:16:23 2024 +0200 Merge pull request #245 from tokens-studio/use-token-name-ref Use token name ref commit 1135b7e2dbeb0029a3c0c84ab6fa88518c62241a Author: Florian Schroedl Date: Tue Aug 13 18:30:00 2024 +0200 Update token sets commit 71439637aa9f9107577e470e2d13d6c4dab5850d Merge: 21c42626a d8621974c Author: Akshay Gupta Date: Tue Aug 13 21:56:06 2024 +0530 Merge branch 'token-studio-develop' into token-sets-ui commit 21c42626ae634ea98606a49ea80a7ec206083c35 Author: Akshay Gupta Date: Tue Aug 13 21:51:31 2024 +0530 remove comment commit 007cf0fb8aef9604eaf4a140d3fb057c1431cd7d Author: Akshay Gupta Date: Tue Aug 13 21:50:55 2024 +0530 remove comments and unused import commit 46c73fe51f17b231f7e4c72b41897dbc91360559 Author: Akshay Gupta Date: Tue Aug 13 21:44:08 2024 +0530 formatting commit 66170eb889b83ae4250c1a88eaffe92beca76faa Author: Akshay Gupta Date: Tue Aug 13 21:42:08 2024 +0530 make current-set-id the key on div element commit 68c0d93f91d582244004dae361a8d04b2068f5c9 Author: Akshay Gupta Date: Tue Aug 13 21:12:38 2024 +0530 change sets list div to ul commit 7addba71fbb4dbb1879e7c36e2a1dcb6ea09be88 Author: Akshay Gupta Date: Tue Aug 13 21:07:52 2024 +0530 remove debug statements commit 950257a212aa5a41702b90ee170a29d37015679c Author: Akshay Gupta Date: Tue Aug 13 20:42:42 2024 +0530 change eye icon size commit 9aadb8c72fff97b6b04f21248b124328db9924d9 Author: Florian Schroedl Date: Tue Aug 13 16:18:24 2024 +0200 Add test commit fa230a4224355b415f24ec8cb3675c3dab3cfb49 Author: Akshay Gupta Date: Tue Aug 13 19:31:34 2024 +0530 add folder-open icon and use for open groups commit 2f2ed0a42f6b601dde4e9f2edfbf3cc3c235799a Author: Florian Schroedl Date: Tue Aug 13 15:45:38 2024 +0200 Cleanup commit a4865522ccaf7b4bb5772f72c3e9db85008afd18 Author: Florian Schroedl Date: Tue Aug 13 15:25:36 2024 +0200 Select token set on create commit ba31914ca459cf9923890d5db304ff4502314f7e Author: Florian Schroedl Date: Tue Aug 13 14:41:58 2024 +0200 Fix typo commit c2759236213dc4414dc78baa10340f4e4a40ccae Author: Florian Schroedl Date: Tue Aug 13 14:41:49 2024 +0200 Fix indent commit ec01ce7550c5f73c60dbbad2cb5f31d7bb79e75e Author: Florian Schroedl Date: Tue Aug 13 14:41:18 2024 +0200 Ensure vector commit bcd4b6d9ec082cdd6b28ad9a6f21bad3d4642136 Author: Florian Schroedl Date: Tue Aug 13 13:31:43 2024 +0200 Fix schema errors commit 547358d579c5437c9cdb3f0fbaaff1c49ca4b431 Author: Florian Schroedl Date: Tue Aug 13 11:57:06 2024 +0200 Add token set changes commit bcf61f34fe0625e51cacea59cc803774c5d2633b Author: Akshay Gupta Date: Tue Aug 13 14:11:30 2024 +0530 add current set and selected set commit ad9a4e7244f1d96ab3816757cff8a4ef1c3112c5 Author: Akshay Gupta Date: Tue Aug 13 01:17:18 2024 +0530 Add full lenght highlight commit 9ff3a135a84ff50377c9cfb72f7d2cf80198171b Author: Florian Schroedl Date: Mon Aug 12 10:50:47 2024 +0200 Cleanup commit 6c3415b92c8eeded625def6707427df09bf6d98b Author: Florian Schroedl Date: Tue Aug 6 14:56:11 2024 +0200 Differentiate groups and sets commit dbddd7fb68d2acf2d2db8297983bf7370c80c81d Author: Florian Schroedl Date: Tue Aug 6 14:26:30 2024 +0200 Add token themes & sets schema commit 726b0a26713d5200592df78ce6d10907f44afd31 Author: Florian Schroedl Date: Fri Aug 9 18:04:33 2024 +0200 Fix :applied-tokens not being updated commit 51a27c07ec28d4f244a2ee66c95af37e4e217bb8 Author: Florian Schroedl Date: Fri Aug 9 18:03:47 2024 +0200 Use token identifier commit 9ff4567955766a9fcf34ac993c78f65823f3f882 Author: Florian Schroedl Date: Fri Aug 9 18:03:20 2024 +0200 Remove unused function commit 5552295d61fe43ed59f5f0f79ef9b8e2db13fb85 Author: Florian Schroedl Date: Fri Aug 9 17:37:36 2024 +0200 Add docstring commit b93b0b209a24bf5c558b7d599f8d3c62eb5d20d4 Author: Akshay Gupta Date: Thu Aug 8 21:40:35 2024 +0530 Add hover styles and collapse capabilities commit bb3a22a219496d5577f66b9eafbc186159d7421f Author: Akshay Gupta Date: Thu Aug 8 18:46:58 2024 +0530 add hide/show icon commit e992bf0aa6bf4f61ac30b7f8e4d6cd9f99e5f29d Author: Florian Schroedl Date: Thu Aug 8 15:13:04 2024 +0200 Fix sizing test commit 8b8b909fb7255bc2ecee445a5e6dbf94293c16f9 Author: Florian Schroedl Date: Thu Aug 8 15:12:28 2024 +0200 Parse values with unit commit 2d67a92d6485b9f003e05a43e2bd47bc8afd1184 Author: Florian Schroedl Date: Thu Aug 8 11:39:58 2024 +0200 Fix getter commit a073520d0e7ee5d75ccf5904ac5de902c8916eba Author: Florian Schroedl Date: Thu Aug 8 11:22:40 2024 +0200 Restore tests to work with new identifier commit e27e2d357ceb68c18c5122120da3e14e5fa43e5a Author: Florian Schroedl Date: Thu Aug 8 11:09:12 2024 +0200 Add simple applying test commit d98e9826649e91c1e57c473f72d800f2d6642fad Author: Florian Schroedl Date: Thu Aug 8 11:07:32 2024 +0200 Cleanup commit 31674db11df16dd2a496d0e25817ffca6d4b42eb Author: Florian Schroedl Date: Thu Aug 8 11:07:24 2024 +0200 Skip parsing on numbers commit 0684d893e06561e0c1ef754a61595b493a1af662 Author: Florian Schroedl Date: Thu Aug 8 11:06:49 2024 +0200 Return resolved & parsed token names map commit 37f23855e873f30ad1f404254f14d73eec876ca3 Author: Florian Schroedl Date: Thu Aug 8 09:52:51 2024 +0200 Fix re-find only accepting string values throw commit 2e8e33d7019696733faba8c02138ceed86cc4b57 Author: Florian Schroedl Date: Thu Aug 8 09:40:26 2024 +0200 Add token value parsing function commit 980238e27b34d4690ac9c2e149093606d16ea6eb Author: Florian Schroedl Date: Thu Aug 8 09:22:32 2024 +0200 Move find-token-references to token namespace commit b28a45c2d8a0d7e2f6251b3421939d6b32db8287 Author: Akshay Gupta Date: Thu Aug 8 00:14:36 2024 +0530 add more changes working tree display commit fcea98958693dd0f180ec5416130a5fcd0eca92b Author: Akshay Gupta Date: Wed Aug 7 22:39:41 2024 +0530 add more changes commit 1434ddb5d58b1907cc9b94598ff1dc344780adb1 Author: Akshay Gupta Date: Wed Aug 7 20:58:21 2024 +0530 change fotn color commit 252797183c6737399170ea020bc70b216611a9bd Author: Florian Schroedl Date: Wed Aug 7 15:14:32 2024 +0200 Use :name as the token identifier [*] [*] Using uuid as the token identiefier for :applied-tokens is not correct as we want to merge all sets together by their name, to get the final values. commit d8621974c26287d2e1ddb579b0c6cabdaec763c5 Author: Florian Schroedl Date: Wed Aug 7 17:14:05 2024 +0200 Update with upstream commit 192f847d50f41c98aa9d78aa014fc4ae66b5b744 Author: Florian Schroedl Date: Wed Aug 7 17:13:39 2024 +0200 Ignore rxjs errors commit c9673ca828dd18b51fe78b8b0fd33aac276ee186 Merge: d7ee804ca 22f3dba84 Author: Florian Schroedl Date: Wed Aug 7 16:21:08 2024 +0200 Merge remote-tracking branch 'penpot/develop' into token-studio-develop commit d7ee804ca38ea8c285e929803ae9d520be0a6242 Merge: eb9b4be6e edb89bccc Author: Florian Schrödl Date: Wed Aug 7 12:53:02 2024 +0200 Merge pull request #243 from tokens-studio/fix-tests Temporary fix for tests commit edb89bcccbc45d0bc74b8d8b65dfb7b972a776c9 Author: Florian Schroedl Date: Wed Aug 7 12:38:24 2024 +0200 Temporary fix for tests [*] [*] Async tests got broken with the latest upstream. This will still print a bunch of warnings from rxjs but the tests are still running. commit eb9b4be6ea95944672a339018d4d4b114dd90ed8 Merge: e02611da2 4ae467987 Author: Florian Schrödl Date: Wed Aug 7 08:26:08 2024 +0200 Merge pull request #241 from tokens-studio/sync-master Sync penpot master commit 02a19a6b330e6e5df71be5338d16468f3b868547 Author: Akshay Gupta Date: Wed Aug 7 00:57:13 2024 +0530 Next commit commit 22e497398f2e4ae80e951df117503f2e2f32fbbe Author: Akshay Gupta Date: Wed Aug 7 00:08:12 2024 +0530 Initial commit commit 4ae467987afdd58a910f19c16616f5dc3774c5be Author: Florian Schroedl Date: Tue Aug 6 11:25:31 2024 +0200 Update changes commit 3bd0318999cdee25e2197446c48a7e646efeb441 Author: Florian Schroedl Date: Tue Aug 6 11:16:38 2024 +0200 Update lock file commit dd8780db6983bafa0b755cf7bc87c4421e9d25e1 Author: Florian Schroedl Date: Tue Aug 6 11:16:30 2024 +0200 Use register commit 5fbbdd36fd9e64208e2066fa0bfe62cdf5811b84 Merge: e02611da2 36ac81bb4 Author: Florian Schroedl Date: Tue Aug 6 11:06:51 2024 +0200 Merge remote-tracking branch 'penpot/develop' into token-studio-develop commit e02611da20c29c6648ff0ecbee19f29f6b3a4b39 Merge: 57c9d6d3a f7e770192 Author: Florian Schrödl Date: Tue Aug 6 10:31:13 2024 +0200 Merge pull request #238 from tokens-studio/213-opacity-fixes-03 Fixes Opacity commit f7e7701923220160f5724cdc9245b03fe5d26557 Merge: 6cb3afe87 57c9d6d3a Author: Florian Schrödl Date: Tue Aug 6 08:23:39 2024 +0200 Merge branch 'token-studio-develop' into 213-opacity-fixes-03 commit 57c9d6d3a969aab8aa59b4c94d35ff646ef4d353 Merge: 3c7261e75 fe9bb69c7 Author: Florian Schrödl Date: Tue Aug 6 06:38:31 2024 +0200 Merge pull request #239 from tokens-studio/236-stroke-width-fix Fix stroke width applying crash commit fe9bb69c756f3ab5568125c9c77cd66ba473e44e Author: Florian Schroedl Date: Mon Aug 5 11:45:32 2024 +0200 Update CHANGELOG commit c9d1fe44e9f89da1d80035f6491d14f75356d160 Author: Florian Schroedl Date: Mon Aug 5 11:43:46 2024 +0200 Add stroke-width test commit 2a97749d23a55ba731d8200acc061b672bf89e22 Author: Florian Schroedl Date: Mon Aug 5 11:42:36 2024 +0200 Add shape property passing commit 3826afb76b06c0cfff86a66d61f3f0f58e3ca6ee Author: Florian Schroedl Date: Mon Aug 5 11:18:19 2024 +0200 Fix applying stroke commit 6cb3afe87f38bb8e6d25001cf0d5f6203da8bd8f Author: Florian Schroedl Date: Mon Aug 5 11:05:49 2024 +0200 Add opacity tests commit 62a9dd65822cca47a88a4e1328e97f26595db660 Author: Florian Schroedl Date: Mon Aug 5 10:54:46 2024 +0200 Cleanup commit ad468582b3426a8ff17e0919d5863b91c6f651fc Author: Florian Schroedl Date: Mon Aug 5 10:53:59 2024 +0200 Add changelog commit c29024bd62786d7ff20403d0bbc40546c997fc38 Author: Florian Schroedl Date: Mon Aug 5 10:51:35 2024 +0200 Dont update values outside of 0..1 (e.g.: 20) commit 1f88c8288a1361f214978dc328654e5d0128e7f1 Author: Florian Schroedl Date: Mon Jul 29 11:08:15 2024 +0200 Parse double to preserve opacity commit 3c7261e75be615c6e1c523d03f5966f22c80b098 Merge: ab72bdf09 72c5c3ec9 Author: Florian Schrödl Date: Fri Aug 2 08:56:30 2024 +0200 Merge pull request #231 from tokens-studio/update-token-shapes Update token shapes commit 72c5c3ec9aed5c208858e0f0ab6711e1791d0bfa Author: Florian Schroedl Date: Thu Aug 1 15:45:37 2024 +0200 Cleanup commit 13163a457109445633fcaae2d54c5b3fc84aa41a Author: Florian Schroedl Date: Thu Aug 1 15:37:53 2024 +0200 Clean up debugging code commit 0c757f05e359ecf0ddb7953de8d5e47bb8eab000 Author: Florian Schroedl Date: Thu Aug 1 15:37:39 2024 +0200 Apply actions directly commit fc6d64fb5d3592e4d47cb6aa95bb776bbc89881e Author: Florian Schroedl Date: Thu Aug 1 15:32:33 2024 +0200 Fix import commit 518441e582f8600861bd92c1d453066aceffe64b Author: Florian Schroedl Date: Thu Aug 1 12:12:03 2024 +0200 Fix spacing token click will add padding commit fdce370bb6a5f8687afa35c575d8bbfc0ae28355 Author: Florian Schroedl Date: Thu Aug 1 12:05:15 2024 +0200 Disable debug commit 9ebd7436354480393bccecc1547412b149095390 Author: Florian Schroedl Date: Thu Aug 1 11:09:36 2024 +0200 Testing comment commit cc6f34f78ac1ebb3399f293531126b8208f3df10 Author: Florian Schroedl Date: Thu Aug 1 11:07:02 2024 +0200 Fix trying to update shapes for deleted tokens crash commit feb438f88296d13e11c6e369eb32c33b4d2e8192 Author: Florian Schroedl Date: Thu Aug 1 10:41:45 2024 +0200 Safety net commit 68b32448d19d15162028114ec14ca98fd40fb052 Author: Florian Schroedl Date: Thu Aug 1 10:41:03 2024 +0200 Fix exact match of diff adding nil attrs group and crashing the app commit ac27f95091857cc48c87251bb1746cce26734c8e Author: Florian Schroedl Date: Thu Aug 1 09:41:28 2024 +0200 Fix undo deleting the token on update commit 68415b6668be9218883d2ab18d653dbb872c07a8 Author: Florian Schroedl Date: Thu Aug 1 09:14:21 2024 +0200 Update tokens after shape update commit e52623c728203140da8768626603f41f74961c29 Author: Florian Schroedl Date: Thu Aug 1 09:13:58 2024 +0200 Update shapes in one undo step, resolve tokens from state not cache atom commit a1fefe66ae2b23c80e904b06cc1010f23d405e2a Author: Florian Schroedl Date: Wed Jul 31 17:26:50 2024 +0200 Working updates! commit d22234fe2a91b44ea1a5053b45b2016ce98c2c93 Author: Florian Schroedl Date: Wed Jul 31 16:51:55 2024 +0200 Cleanup commit 0166c38486cbc5d01607e57a662ce9c66b89f775 Author: Florian Schroedl Date: Wed Jul 31 16:43:03 2024 +0200 Split logical attribute groups commit 69d93592375c0060d9f4877052f3f4d8012fc295 Author: Florian Schroedl Date: Wed Jul 31 14:36:09 2024 +0200 Collecting update functions by attributes commit 6225f59ea0ceb53fdba46334f7bd9952dd6033cd Author: Florian Schroedl Date: Wed Jul 31 14:04:00 2024 +0200 Cleanup commit ab72bdf09cf191adb7578abaf9a54d97716082ae Merge: dde8ab068 1d4b41750 Author: Florian Schrödl Date: Tue Jul 30 08:02:50 2024 +0200 Merge pull request #224 from tokens-studio/ux-context-menu Ux context menu commit 1d4b4175012e10621bced361333b4a1d82525f8a Author: Florian Schroedl Date: Tue Jul 30 06:57:21 2024 +0200 Fix missing function shorthand commit f69db7ce9e7c88030be181d6de3b0a239aea36a6 Author: Florian Schroedl Date: Mon Jul 29 18:43:47 2024 +0200 Cleanup commit 5e33eab7d0ef048b73b272f05c416f6603819613 Author: Florian Schroedl Date: Mon Jul 29 18:31:11 2024 +0200 Fix position updating commit 9340ba9cc05a381912c6da0d1f853b2ebcb2b094 Author: Florian Schroedl Date: Mon Jul 29 18:30:59 2024 +0200 Allow passing custom on-update-shape function commit ededd23849daaffe36c0f094853b88ca802d3e87 Author: Florian Schroedl Date: Mon Jul 29 17:48:30 2024 +0200 Trigger Build commit b423a9c782419c5e51cca5ee43ad6b4d0dae526d Author: Florian Schroedl Date: Mon Jul 29 17:43:32 2024 +0200 Always update all layout-gap on token pill click commit 70904dbc64dba5f13c8d5a8057a30e0e7894e9cc Author: Florian Schroedl Date: Mon Jul 29 16:38:40 2024 +0200 Trigger Build commit 9ba4776c8edf587b9c2d7fc457eccb89fd25048a Author: Florian Schroedl Date: Mon Jul 29 16:34:26 2024 +0200 Trigger Build commit c92decedeb9ac7e0c45e1cf7549f730d5947dfa7 Author: Florian Schroedl Date: Mon Jul 29 16:21:42 2024 +0200 Trigger Build commit a893a66ec83a7fafaf464f272ba3ebce998456a0 Author: Florian Schroedl Date: Mon Jul 29 16:07:33 2024 +0200 Fix crash on applying col/row gap commit 3f14af9e038ab7f07a5df9494cce6a862bb6c164 Author: Florian Schroedl Date: Mon Jul 29 16:00:46 2024 +0200 Fix highlighting for dimensions token commit 596d662ca831e68167764850b0c06bb99e88c717 Author: Florian Schroedl Date: Mon Jul 29 15:24:17 2024 +0200 Cleanup commit 1eea55ad43bb6686c930f65a346a9612eff3494e Author: Florian Schroedl Date: Mon Jul 29 15:09:35 2024 +0200 Test commit 55ed79d9680014f8baef150aa268478fdf930dd5 Author: Florian Schroedl Date: Mon Jul 29 14:22:37 2024 +0200 Move to sidebar, should not be rendered in root commit 6fc370bb301476013d494d54158411a59892001a Author: Florian Schroedl Date: Mon Jul 29 14:22:07 2024 +0200 Fix token position wrong, component gets rendered on user mount commit 1633f8035e496040b28708dea3089b2ba1e23823 Author: Florian Schroedl Date: Mon Jul 29 13:51:17 2024 +0200 Indent commit 9bec2509c9be64f68804b7cdd59e6ba599a7af56 Author: Florian Schroedl Date: Thu Jul 25 10:11:36 2024 +0200 Better context-menu position, remove hardcoded value commit 1e481412e8706f1ccbab4b39ce5602a1e1c588c8 Author: Florian Schroedl Date: Thu Jul 25 09:12:23 2024 +0200 Remove old token applying events commit cc41a42dfae7b682a1b0db0bfbf251c15a6deb30 Author: Florian Schroedl Date: Thu Jul 25 09:11:03 2024 +0200 Update CHANGELOG commit a3a48838755b3d56b09457f583a8eb303c29df6b Author: Florian Schroedl Date: Thu Jul 25 08:58:26 2024 +0200 Cleanup commit f094654837fd3340884dbed3395a3dbc4d2719fa Author: Florian Schroedl Date: Thu Jul 25 08:56:02 2024 +0200 Fix only shape ids being applied commit f93a5ab109b63340e5b7c42eaf34d5335eb2ec86 Merge: 957ad0dae dde8ab068 Author: Florian Schroedl Date: Thu Jul 25 08:42:17 2024 +0200 Merge remote-tracking branch 'origin/token-studio-develop' into ux-context-menu commit 957ad0dae32d3260923f2913bcfe8f77e8406fd0 Author: Florian Schroedl Date: Wed Jul 24 16:21:48 2024 +0200 Always highlight if one of the attributes is active, but only apply minimal set on pill click commit b9b4abf1e0b9a51db51daa8db203324a7f0e338d Author: Florian Schroedl Date: Wed Jul 24 16:10:41 2024 +0200 Fix edit modal not opening commit cb942996a9f31474190b1d73c9689ea53001663e Author: Florian Schroedl Date: Wed Jul 24 16:05:43 2024 +0200 Fix render-loop after token was deleted commit 37bef1e2ea7e38e4c5d757c66ff2c77535289237 Author: Florian Schroedl Date: Wed Jul 24 16:05:29 2024 +0200 Cleanup commit b392c3ba65cf61a1a617a80e69e8b41472fd8c1c Author: Florian Schroedl Date: Wed Jul 24 15:46:14 2024 +0200 Move token change events to changes ns commit 56e72b5247cc7bfced46628fcebc4ccae215529d Author: Florian Schroedl Date: Wed Jul 24 15:29:40 2024 +0200 Refactor - Separate core into namespaces: changes, token_types commit 03370c267d1e77c9631a9cce4a1b6411e4e391ce Author: Florian Schroedl Date: Wed Jul 24 15:02:10 2024 +0200 Cleanup commit d5a03e154bec2857cfbe1771e79b8ccb8f42e79c Author: Florian Schroedl Date: Wed Jul 24 14:57:33 2024 +0200 Cleanup commit 386a4c94bab1408fc5058a421823b33934519633 Author: Florian Schroedl Date: Wed Jul 24 14:51:59 2024 +0200 Disallow clicking pill when nothing is selected commit 5e911d814c089697c5e5ac2f5906bfcff3c74777 Author: Florian Schroedl Date: Wed Jul 24 14:49:39 2024 +0200 Show attribute actions only when something is selected commit 310033fd755b341c3579bf43bca89f603ffa0db2 Author: Florian Schroedl Date: Wed Jul 24 14:20:08 2024 +0200 Inline attributes commit 46250003d3c2849852e9752001ae2fd398a176eb Author: Florian Schroedl Date: Wed Jul 24 14:17:43 2024 +0200 Reuse all-or-sepearate-actions for border-radius commit 871402bd84218f1b325c61461fb4b87d2213654f Author: Florian Schroedl Date: Wed Jul 24 14:07:42 2024 +0200 Fix overriding of existing radius-4 commit 38499e2f1f8ca7e52adcb73e963e8922b826476e Author: Florian Schroedl Date: Wed Jul 24 14:07:29 2024 +0200 Fix properties commit 893e533afee381720b5a2602c50684dca75ac58e Author: Florian Schroedl Date: Wed Jul 24 14:01:56 2024 +0200 Cleanup commit e6889fc92e48e01c3127bd676c7d8d12d9893d9a Author: Florian Schroedl Date: Wed Jul 24 13:41:32 2024 +0200 Fix typo commit c11c1e0c03ba895a57f28e196fa53dcf5e069e0c Author: Florian Schroedl Date: Wed Jul 24 13:41:08 2024 +0200 Use all-or-sepearate-actions for gap commit 335808bf0333d946b3c08caf8524447588c4110d Author: Florian Schroedl Date: Wed Jul 24 13:41:00 2024 +0200 Remove unneeded actions commit cbd5d42069cd441d61d0b5f3d47e0b4785f106e5 Author: Florian Schroedl Date: Wed Jul 24 13:36:38 2024 +0200 Simplify commit 113fc9891ba7fd14d0861279b91e789465f6a266 Author: Florian Schroedl Date: Wed Jul 24 13:29:26 2024 +0200 Simplify component & css commit fbd2ab833d76856e2e51a7dc1fbbb36caba381ed Author: Florian Schroedl Date: Wed Jul 24 10:59:26 2024 +0200 Inline separator commit 08cc777096ea6e396cea34b04d5666d9f8c78e22 Author: Florian Schroedl Date: Wed Jul 24 10:58:34 2024 +0200 Restructure commit 81c83f9dd49a6c2369251ea120c4ce1019a3fc9e Author: Florian Schroedl Date: Wed Jul 24 10:55:22 2024 +0200 Recurse tree instead of repetition commit f20313e7f84e8c7a52d9758c8c466aeedc89d48a Author: Florian Schroedl Date: Wed Jul 24 09:43:28 2024 +0200 Add dimensions sub-menu commit 1776591fec331f989e7495568fd1066489d9b333 Author: Florian Schroedl Date: Wed Jul 24 09:42:09 2024 +0200 Fix react index warning commit aa75f308585ac93faf475693a954a1b1e5d9b3be Author: Florian Schroedl Date: Wed Jul 24 09:19:31 2024 +0200 Allow type overriding via prop commit 62f7f8a74f2dea749004bfc941cdd82341c536bd Author: Florian Schroedl Date: Tue Jul 23 16:35:07 2024 +0200 Add sizing commit 65dbafafb811bb5d7fd452862287fccf786fa0f8 Author: Florian Schroedl Date: Tue Jul 23 16:02:14 2024 +0200 Add width/height applying commit 214a3236820b5a17b1288795d767b73cf1726182 Author: Florian Schroedl Date: Tue Jul 23 16:01:56 2024 +0200 Add abstract method for a all or seperate actions commit da3f2f820cb34029ddb3d1e86f2ccd700a7321b2 Author: Florian Schroedl Date: Tue Jul 23 15:28:13 2024 +0200 Add generic context menu actions commit cabc3d3f362326a9554793113ff7895a8327c16d Author: Florian Schroedl Date: Tue Jul 23 14:55:14 2024 +0200 Simplify passed prop date commit bad9056d5424d0028f5fd386865ef584d0765381 Author: Florian Schroedl Date: Tue Jul 23 11:35:07 2024 +0200 Update gap commit 4cf8b2c1438e3b03e3144ddd78c6c7f0551135fe Author: Florian Schroedl Date: Tue Jul 23 10:54:23 2024 +0200 Extract gap as extra function commit 39822a3b3140bd4e96493abf31d921aaab8fa0da Author: Florian Schroedl Date: Tue Jul 23 10:49:19 2024 +0200 Add single padding commit 0e858d880df629ab6c9a4ddc437e0cee2fb6b711 Author: Florian Schroedl Date: Tue Jul 23 10:37:51 2024 +0200 Add horizontal/vertical padding toggle commit dde8ab0680a5b10a491315e336110b59a7cfe9d3 Merge: 64da0983f cb051d2e5 Author: Akshay Gupta Date: Tue Jul 23 13:02:21 2024 +0530 Merge pull request #223 from tokens-studio/fic-spacing-crash-on-non-layout Fix app crashing when spacing padding is applied to a shape without a… commit 2411eeb644b195189196233810e70602e57c4698 Author: Florian Schroedl Date: Mon Jul 22 18:23:12 2024 +0200 Add separate gap commit c00023319a8fb190ad4b616734a609cb406ac580 Author: Florian Schroedl Date: Mon Jul 22 18:13:37 2024 +0200 Extract data commit fd2f5537cf0cb0cbf2d953dea63fd0918a435c63 Author: Florian Schroedl Date: Mon Jul 22 18:07:16 2024 +0200 Extract common logic commit 2836ff269359e31cd9ce29bc8ab5a2cdb4877f7a Author: Florian Schroedl Date: Mon Jul 22 17:07:42 2024 +0200 Fix actions commit f731a30f81ccf4fb0781e19fa5c67bbcada29306 Author: Florian Schroedl Date: Mon Jul 22 13:54:36 2024 +0200 Allow removing other attributes with apply-token function commit 91033d6dea263003d4c0cc4e31472cad3d6a8df5 Author: Florian Schroedl Date: Mon Jul 22 11:30:27 2024 +0200 Fix indent commit 64da0983f38343ca46ff36ca731513c820902c27 Merge: 2f17b79be 337e1c9fa Author: Akshay Gupta Date: Fri Jul 19 00:30:15 2024 +0530 Merge pull request #222 from tokens-studio/fix-stroke-width-crash Fix application crashing when stroke width is applied to a shape with… commit cb051d2e5b4a21df2bde8d7d9b02e6a467c94f78 Author: Akshay Gupta Date: Fri Jul 19 00:28:00 2024 +0530 Fix app crashing when spacing padding is applied to a shape without a layout commit 337e1c9fa0ef8319eae4acd718310d371977be96 Author: Akshay Gupta Date: Thu Jul 18 23:13:51 2024 +0530 Fix application crashing when stroke width is applied to a shape without a stroke commit 359ec592fbb913821908eef232f4d8dc5cc75c8a Author: Florian Schroedl Date: Mon Jul 8 15:40:33 2024 +0200 Single attribute context menu commit ae2da534e962aec9277acf1c4acd5271bfd29f07 Author: Florian Schroedl Date: Mon Jul 8 15:40:18 2024 +0200 Move radius updating to core commit 9bf763efb35802e79579152f43977561cacc5d04 Author: Florian Schroedl Date: Mon Jul 8 15:19:48 2024 +0200 Add all action commit 77fe4d556fb995ab8fe764b92131d08d474999a8 Author: Florian Schroedl Date: Mon Jul 8 15:10:51 2024 +0200 Convert border-radius to new UX commit 7b2d11019c5df9bac53877c6bdbaae8780e28132 Author: Florian Schroedl Date: Mon Jul 8 15:10:01 2024 +0200 Only show atrribute actions when shapes are selected commit bf994fcd56fe6d3afb0eb05750746061de7400ef Author: Florian Schroedl Date: Mon Jul 8 14:40:57 2024 +0200 Rename commit 3ad009b515caaa30193f1efddc6e670ce4086f06 Author: Florian Schroedl Date: Mon Jul 8 14:40:35 2024 +0200 Fix lint commit 82b44e65692f6a8328831fa7ab8ae29627bdfc47 Author: Florian Schroedl Date: Mon Jul 8 14:40:07 2024 +0200 Inline concat commit da0389e304fad1da20a8321b7ab3b59f95f4e0f7 Author: Florian Schroedl Date: Mon Jul 8 14:38:19 2024 +0200 Improved logic to run once for all shapes commit 90618ec89a5bccf2867ac63103da64f9966034f0 Author: Florian Schroedl Date: Mon Jul 8 11:41:25 2024 +0200 Add separator between default actions and attribute actions commit 2f17b79befbd196128412bfab7c06cf72854260c Merge: c2777ed6e bc1f27eac Author: Florian Schrödl Date: Mon Jul 8 13:53:10 2024 +0200 Merge pull request #216 from tokens-studio/ux-improvements UX improvements commit db7391e4cb679c56610cb199c724dcaefc9dc688 Author: Florian Schroedl Date: Mon Jul 8 11:40:05 2024 +0200 Separate entries commit e75f9a7c7fe638183c8002ac993eda187c249b67 Author: Florian Schroedl Date: Mon Jul 8 11:06:57 2024 +0200 Add predicate for all test commit 62ecee2cf80a9ba6d111dd85319942f4fab405f9 Author: Florian Schroedl Date: Mon Jul 8 10:24:23 2024 +0200 Add grouping function by type commit 3c67872d3cd3873c6c5110b4919e0eaa6982878b Author: Florian Schroedl Date: Fri Jul 5 14:44:57 2024 +0200 Add future test cases for providing a toggle all/attributes commit 5a358e3d0cfa43efb3772846b0ad8d3b9175f8c3 Author: Florian Schroedl Date: Fri Jul 5 14:13:14 2024 +0200 Extract singular token applied predicate commit bc1f27eac9919fb557b99343641c5aac1c6acc7d Author: Florian Schroedl Date: Fri Jul 5 09:18:36 2024 +0200 Trigger Build commit 0fad53ea6c10b59e48c4c36ed4d8d9e8a27ac62c Author: Florian Schroedl Date: Fri Jul 5 08:55:01 2024 +0200 Convert stroke to event commit c7a46c31b43c8b71d087ed220ae6406ead0e3953 Author: Florian Schroedl Date: Fri Jul 5 08:53:45 2024 +0200 Convert layout spacing to function commit c70bb876b23724758174b1dc453ced1cef88ebed Author: Florian Schroedl Date: Fri Jul 5 08:31:38 2024 +0200 Add changelog commit 4fc7efd3b7149e451dc8cd53542ca8c56b7b3c24 Author: Florian Schroedl Date: Thu Jul 4 16:03:32 2024 +0200 Restore performance measuring lines commit 4a329a6318a73af680df3df02a1fac8eea97c923 Author: Florian Schroedl Date: Thu Jul 4 15:52:58 2024 +0200 Override http server commit 828e3a719f4ca643d09e7501802720336a1f1111 Author: Florian Schroedl Date: Thu Jul 4 15:29:42 2024 +0200 Disable running tests from shadow-cljs directly commit 785961f7c6e789cea44d4d0a4acca29582931fff Author: Florian Schroedl Date: Thu Jul 4 14:31:50 2024 +0200 Cleanup commit 55713275b6e44539dbef654eead3f7b4b2ec6fbb Author: Florian Schroedl Date: Thu Jul 4 14:14:06 2024 +0200 Add test for overriding token commit f20c08f31bc3c8e8f31bf58b025e5557c3f20954 Author: Florian Schroedl Date: Thu Jul 4 14:05:20 2024 +0200 Specify tests commit 893e790787767095bec130081f4012a872ffaa2f Author: Florian Schroedl Date: Thu Jul 4 11:41:00 2024 +0200 Only remove given token commit b73cdd15e0e386bfd7da218520973993faad11d9 Author: Florian Schroedl Date: Thu Jul 4 11:28:15 2024 +0200 Add helper to remove attributes from applied-tokens commit 658e7ebd0a577200c85bf8ba25ab6110aa688c43 Author: Florian Schroedl Date: Thu Jul 4 11:15:06 2024 +0200 Cleanup commit 694baeee0c389964c4a0fab55470b685f984c500 Author: Florian Schroedl Date: Thu Jul 4 11:12:49 2024 +0200 Add sizing test commit 7abfaef1cb237f14a5ffc9d9222039a5485655d5 Author: Florian Schroedl Date: Thu Jul 4 11:08:46 2024 +0200 Test applying rotation commit 322c8ef8ec0a969aeffef932dd87918dbfe0aceb Author: Florian Schroedl Date: Thu Jul 4 11:06:48 2024 +0200 Update opacity commit b43d16008f04b8c2a77f37428aab3d16c105b8fc Author: Florian Schroedl Date: Thu Jul 4 10:51:08 2024 +0200 Extract to helpers commit 1f0f35e7543acc4a12d8b62a4dbf49617f47dcfc Author: Florian Schroedl Date: Thu Jul 4 10:48:27 2024 +0200 Remove unused commit a842cb2d7d415a382785a3c229b7288dfe02d40c Author: Florian Schroedl Date: Thu Jul 4 10:41:57 2024 +0200 Cleanup commit 8f806ef1fe0fed87acd8c2ed7945ba2f6686a334 Author: Florian Schroedl Date: Thu Jul 4 10:41:46 2024 +0200 Test single property updates commit f3261c9b0fff3038d31d73006770bb47fc71a9ea Author: Florian Schroedl Date: Thu Jul 4 10:41:10 2024 +0200 Fix emit! side-effect commit 818aa043ca6454570ba4b19f7f3e39284e00e80d Author: Florian Schroedl Date: Thu Jul 4 10:40:59 2024 +0200 Wrap in undo sequence commit 596480d1771c8653744e1938819d0c7840d58c1a Author: Florian Schroedl Date: Thu Jul 4 10:05:36 2024 +0200 Add test to verify toggle removes token for applied & unapplied commit ab62c5b4efffbc625b047e56ac4c19d86d0e5d93 Author: Florian Schroedl Date: Thu Jul 4 10:00:58 2024 +0200 Add helper to apply token to shape commit 581ced0ab82055fd2abc887e35339a7d4c735e63 Author: Florian Schroedl Date: Thu Jul 4 10:00:44 2024 +0200 Abstract into helper commit e85de19a5e7459c88d61cf9574d420e07d9ba784 Author: Florian Schroedl Date: Thu Jul 4 09:29:48 2024 +0200 Add multiple shapes test commit 8370fd06d4daf9dff467072a574770a3810f1f00 Author: Florian Schroedl Date: Thu Jul 4 09:29:43 2024 +0200 Remove cb commit 3793e98660bc166c9d0dc49bf5335ad0c5dea9b6 Author: Florian Schroedl Date: Thu Jul 4 09:29:16 2024 +0200 Disable complete log commit b12e59a8d79d129563d436a61b95e3ee2ce70e76 Author: Florian Schroedl Date: Thu Jul 4 09:13:02 2024 +0200 Rename event to toggle-token commit 71976ed7e945e01607518288f77d784c16357b5d Author: Florian Schroedl Date: Wed Jul 3 18:24:09 2024 +0200 Add helpers for creating test tokens commit 0730ecef46fc86099f2e9dda6b1fa89895dd58eb Author: Florian Schroedl Date: Wed Jul 3 17:15:23 2024 +0200 Cleanup commit 219d184e6c530fa7f81660e7a333463e78a0a73b Author: Florian Schroedl Date: Wed Jul 3 17:06:08 2024 +0200 Add multiple tokens for tests commit a7e735bd816e09f336b2f503bbda730fee67dca2 Author: Florian Schroedl Date: Wed Jul 3 17:04:47 2024 +0200 Add helper for asnc stores commit ed7aad6c4e28ed1f6ee131a25a9bda0cdf4ddf01 Author: Florian Schroedl Date: Wed Jul 3 16:11:39 2024 +0200 Async token event tests working commit e203646085b33c009abf0adc3e3ea8d61e47a491 Author: Florian Schroedl Date: Wed Jul 3 11:16:16 2024 +0200 Naming commit 1e70a4d714b543b409f1ffb7530286ecf2965b35 Author: Florian Schroedl Date: Wed Jul 3 11:09:50 2024 +0200 Implement using rx observables instead of side-effects commit 97db3c29ca88959e6bd469783dfe242ca95ceafe Author: Florian Schroedl Date: Wed Jul 3 09:50:54 2024 +0200 Trying to convert to rx structure commit 50635ae879cb04ab1fdee708d34f308e2020bde4 Author: Florian Schroedl Date: Tue Jul 2 16:06:41 2024 +0200 Found error in handler logic, need rx streams commit 3e5126251c194a4cf98e9b7f1b0dca69495c65ef Author: Florian Schroedl Date: Tue Jul 2 15:19:31 2024 +0200 Add failing logic test commit 10d92f598c1b14ee0f9e27115a2b59ab39e50813 Author: Florian Schroedl Date: Tue Jul 2 15:03:09 2024 +0200 Add nodemon watcher commit c486ea81f457f2a4c905e68dfb1e111a9b00f83b Author: Florian Schroedl Date: Tue Jul 2 15:03:04 2024 +0200 Cleanup commit f2358b98273cb767f2e0b9b17b381fd3f8e9435a Author: Florian Schroedl Date: Tue Jul 2 08:22:27 2024 +0200 Use toggle function commit c2777ed6e35ed3db20510ed6d0279ea7a951b9fe Merge: 5c5b37826 224b656d5 Author: Florian Schrödl Date: Mon Jul 1 18:43:17 2024 +0200 Merge pull request #211 from tokens-studio/fix-sub-name-space Fix token naming clashes commit 5cef23267c2ce443046c0080325de6ec55536e45 Author: Florian Schroedl Date: Mon Jul 1 14:14:36 2024 +0200 Move to tokens ns, add test commit cf07de3bcfe4ff4e5f583e4287ed622e12c119cf Author: Florian Schroedl Date: Mon Jul 1 14:05:06 2024 +0200 Add tests for token-applied? commit e38a943ce0bc41a090ab20ffecd27aa6e7fee2e2 Author: Florian Schroedl Date: Mon Jul 1 13:51:20 2024 +0200 Move token-applied? to token ns commit 224b656d57344fd863a8c1ad3e86c6a5b235ee3e Author: Florian Schroedl Date: Mon Jul 1 10:40:38 2024 +0200 Add CHANGELOG commit 111be97228e34f4842148c531b6bb092457c4ae2 Author: Florian Schroedl Date: Mon Jul 1 10:31:16 2024 +0200 Remove logs commit ec511cc5896167e2c904e4738e6ae45af1e8db25 Author: Florian Schroedl Date: Mon Jul 1 10:30:03 2024 +0200 Fix setting token to own path commit 9d637cbe5eb29883811054efd703ed98f7e9ce5f Author: Florian Schroedl Date: Mon Jul 1 10:16:52 2024 +0200 Path selector test predicate is enough commit 4a85ef3608dbae86db32eb24bb92709e492cdaed Author: Florian Schroedl Date: Mon Jul 1 10:16:15 2024 +0200 Split path/selector for disallowing creating tokens at path segments commit a98f59469eb3d319ae18c2717f2e0a6469e1dcbd Author: Florian Schroedl Date: Mon Jul 1 09:56:45 2024 +0200 Add - to allowed token-name commit 174d91a519dc0ed1dcda73d06bf119d5567efa7a Author: Florian Schroedl Date: Fri Jun 28 14:39:36 2024 +0200 Add function to check if a token can be placed under a name path commit 48a7c526647903d97eb4a75ba4a80478a4c31536 Author: Florian Schroedl Date: Fri Jun 28 14:17:42 2024 +0200 Separate errors commit 2fa152d364b1ec04819397944203303be17dd933 Author: Florian Schroedl Date: Fri Jun 28 13:51:32 2024 +0200 Move to token namespace commit 504369ec13b18535b2efd5d2213d1ddb032536d3 Author: Florian Schroedl Date: Fri Jun 28 13:43:41 2024 +0200 Move tokens-name-tree to core, add test commit ef5f0192002e45183ca0a8c7d1964d5e8cc29b57 Author: Florian Schroedl Date: Fri Jun 28 13:34:54 2024 +0200 Add helper utility to convert name to path commit 6da855c741585e9a691b6bd61e6bbbce70ba1b82 Merge: 3a500fb8a a4bbef991 Author: Florian Schroedl Date: Fri Jun 28 11:24:55 2024 +0200 Merge branch 'fix-token-reference-issue' into 199-branch-name commit a4bbef991797d6958abee898d27b74399f273cab Author: Akshay Gupta Date: Fri Jun 28 14:43:49 2024 +0530 Fix token reference issue when name has . commit 3a500fb8a79b0d4dba3d13dcca6d38c39c0d8819 Author: Akshay Gupta Date: Wed Jun 26 19:40:06 2024 +0530 Update CHANGELOG.md with PR link commit 00dabaf38c26f78e5d3542d73a565b3dac0be48c Author: Florian Schroedl Date: Wed Jun 26 16:08:21 2024 +0200 Remove comment form commit f24c314d63c85d4d6be0178e6689f817c4ab85c5 Author: Florian Schroedl Date: Wed Jun 26 16:04:50 2024 +0200 Update commit f9530c5a10d8d31e499abad00a7ed74ef624f4d7 Author: Florian Schroedl Date: Wed Jun 26 16:01:41 2024 +0200 Restrict token naming commit 5c5b37826237ce616479862fd7302a304d42ef67 Merge: 3a594d239 4aac3eee7 Author: Florian Schrödl Date: Fri Jun 28 08:19:57 2024 +0200 Merge pull request #204 from tokens-studio/fix-deploy Fix deploy commit 4aac3eee7fce7540f7456e89ef7d1b41466cdb3e Author: Florian Schroedl Date: Fri Jun 28 08:18:43 2024 +0200 Test synchronize commit 325ad66a46586a94e503fb294fa075fd6aaa0fe3 Author: Florian Schroedl Date: Fri Jun 28 08:16:26 2024 +0200 Fix branches not being re-deployed after push commit 3a594d2393c7a7f76fa55fd19ba96f86607127a6 Merge: bd5a0d2d1 b2a983fd0 Author: Florian Schrödl Date: Thu Jun 27 16:31:14 2024 +0200 Merge pull request #203 from tokens-studio/fix-new-document-token Fix creating a token issue on empty document commit b2a983fd05ab76dca473f7f885ba2aecd61a363e Author: Florian Schroedl Date: Thu Jun 27 16:07:47 2024 +0200 Fix creating a token issue on empty document commit bd5a0d2d1b5319f2c23fe6b17ac6fc452a6e8b5d Author: Florian Schroedl Date: Wed Jun 26 15:06:22 2024 +0200 Cleanup commit 19c6c6d3bf49348336512401657681ee4dbd6803 Merge: 7fa31b143 c9a40ee9b Author: Akshay Gupta Date: Wed Jun 26 17:58:01 2024 +0530 Merge pull request #195 from tokens-studio/json-export-changelog Add Json export Changelog commit c9a40ee9b35ffa446c47ce4da7a083963ee25c7f Merge: 350654f96 7fa31b143 Author: Akshay Gupta Date: Wed Jun 26 17:57:49 2024 +0530 Merge branch 'token-studio-develop' into json-export-changelog commit 350654f96875bc182ce3b6a534285c9791754012 Author: Akshay Gupta Date: Wed Jun 26 17:51:23 2024 +0530 Update CHANGELOG.md image commit 7fa31b143e1494e04b2cdc1b5c36a7ce53b8ea82 Merge: 357a0781b bf1c9e2c1 Author: Akshay Gupta Date: Wed Jun 26 17:48:08 2024 +0530 Merge pull request #198 from tokens-studio/json-dtcg-format Make tokens JSON export DTCG compatible commit bf1c9e2c188d8a7d99cd78065f9cedad060d6d83 Merge: 96bfce13b 357a0781b Author: Akshay Gupta Date: Wed Jun 26 17:47:54 2024 +0530 Merge branch 'token-studio-develop' into json-dtcg-format commit 357a0781bb524632e87e64be6999fcfa2cc227a6 Merge: 5ca916f8c 86fd667a1 Author: Florian Schrödl Date: Wed Jun 26 14:11:08 2024 +0200 Merge pull request #194 from tokens-studio/style-dictionar-validation Token Insert/Edit Validation + Value Preview commit 96bfce13bead5f7fccb665af18c072bb799e103a Author: Akshay Gupta Date: Wed Jun 26 17:28:10 2024 +0530 Update CHANGELOG.md image commit d6f1e2efc97e9694c2918f8d8f88a3d261c18ba1 Author: Akshay Gupta Date: Wed Jun 26 12:36:01 2024 +0530 Update CHANGELOG commit 158d5cba31917fda7e80b611e03e628f7a92aaac Author: Akshay Gupta Date: Wed Jun 26 12:32:07 2024 +0530 Make tokens JSON export DTCG compatible commit aabbe2fd948d9595e57d652aa38ea3c852632314 Author: Akshay Gupta Date: Tue Jun 25 22:34:09 2024 +0530 Update CHANGELOG commit 86fd667a1197c80d49e4047a10655274906761af Author: Florian Schroedl Date: Tue Jun 25 17:06:52 2024 +0200 Hide template section in preview document commit 56976e24996aa7207ade26db7786942a664929d8 Author: Florian Schroedl Date: Tue Jun 25 17:04:13 2024 +0200 Update CHANGELOG commit 9f6c587c95947d9e201fd6ffa44b130bd50af9c0 Author: Florian Schroedl Date: Tue Jun 25 16:46:15 2024 +0200 Remove duplicate similar errors commit 9f3e1743a175f77b4597f47722c0d5e3600d97e7 Author: Florian Schroedl Date: Tue Jun 25 16:45:01 2024 +0200 Cleanup commit e1b683f670610afbee718938a350fe3257c812d2 Author: Florian Schroedl Date: Tue Jun 25 16:43:52 2024 +0200 Cleanup commit b4d1ef3fc7bb329637f603580f6c5f282a96923b Author: Florian Schroedl Date: Tue Jun 25 16:40:48 2024 +0200 Cleanup commit b924bbc9c70f93697651e60c1a716280b2bc970b Author: Florian Schroedl Date: Tue Jun 25 16:39:43 2024 +0200 Cleanup commit 656cc009238e7020835a6c27b015af5e925e78cb Author: Florian Schroedl Date: Tue Jun 25 16:38:28 2024 +0200 Add missing deps commit b89dc759be1541ad7226f37eb6f350f5877d7ccd Author: Florian Schroedl Date: Tue Jun 25 16:36:21 2024 +0200 Cleanup commit 135ecf0e3a3688a74efd17c9151edf5867f09718 Author: Florian Schroedl Date: Tue Jun 25 16:33:07 2024 +0200 Cleanup commit af374276e40c8e371cbcbf5d4ded27252f41473f Author: Florian Schroedl Date: Tue Jun 25 16:30:57 2024 +0200 Extract missing reference error check commit 2c42ca5a4b0d3198d6ac7c4723ddf65138b76899 Author: Florian Schroedl Date: Tue Jun 25 14:24:20 2024 +0200 Cleanup commit b905ff7d2c020bcf9875e85bff0eb8385f656c84 Author: Florian Schroedl Date: Tue Jun 25 14:18:07 2024 +0200 Validate forms again on submit commit eb123bf8efe31af1e479f572cef703ffb74d2c6e Author: Florian Schroedl Date: Tue Jun 25 12:15:14 2024 +0200 Extract token validation commit 6e9623153c1eb9408bd2f433c4872c5c6d016567 Author: Florian Schroedl Date: Tue Jun 25 11:55:57 2024 +0200 Remove caching layer for now commit d0f8e9612a9d9c8e004b336030e9b51b57bab669 Author: Florian Schroedl Date: Tue Jun 25 11:52:39 2024 +0200 Validate name before submitting commit 5df0cf545e404923bf1912e30d7d37d24adc936b Author: Florian Schroedl Date: Tue Jun 25 11:33:18 2024 +0200 Remove form-touched work-around commit eac7d9288bf5aa63fd725f0f026b46fc02d525b5 Author: Florian Schroedl Date: Tue Jun 25 11:30:53 2024 +0200 Fix on-submit taking old ref-values when user submits before errors have been validated commit 05f6cfc4b0b4dff49fe9fac0d8353db8b4cd9566 Author: Florian Schroedl Date: Tue Jun 25 11:30:45 2024 +0200 Remove unneeded state commit 33131fa943117a738d2954a213d38c5154341d42 Author: Florian Schroedl Date: Tue Jun 25 11:15:43 2024 +0200 Restore token saving commit ca98747dea38dc198672c4b5eb154ac54a7cfeff Author: Florian Schroedl Date: Tue Jun 25 11:02:21 2024 +0200 Add description with schema commit d2bdc6c6249a6e525440caa7e89f94769a38029c Author: Florian Schroedl Date: Tue Jun 25 10:40:31 2024 +0200 Fix ref logic commit 5ca916f8c47882b81201fdc8a4d225105bfb6a98 Merge: 1ca3f2970 ee057c498 Author: Akshay Gupta Date: Mon Jun 24 20:53:31 2024 +0530 Merge pull request #191 from tokens-studio/tokens-json-export Tokens json export commit ee057c498e94aaa6e23db72b34f3f062f344a51e Author: Akshay Gupta Date: Mon Jun 24 20:44:08 2024 +0530 Simplify tranform tokens function commit e0be30bb79f0d01d11e778d2be0d890246c8e729 Author: Florian Schroedl Date: Mon Jun 24 15:58:19 2024 +0200 Dont show error when unfocusing name input field, but keep form disabled commit 29e3171bd97a91a6c6c607b3945e5a528123ecd5 Author: Akshay Gupta Date: Mon Jun 24 19:07:53 2024 +0530 Incorporate styling changes to match Penpot design language commit c98162d0bf6a2084ae19bf127ace3ecb2b5c8ed9 Author: Florian Schroedl Date: Mon Jun 24 15:24:22 2024 +0200 Move callback function to component commit fb7b11a13937b8f8f7eb4fe8ca8f440c49e1b83d Author: Akshay Gupta Date: Mon Jun 24 18:50:36 2024 +0530 Remove : from token type in export commit db26b38e816d6f007ea2b1808ca525c92aee0839 Author: Akshay Gupta Date: Mon Jun 24 18:47:12 2024 +0530 Modify transform tokens to nest within token names commit 28f25da9e8e54b9509c77c18574e301e8c64c256 Author: Florian Schroedl Date: Mon Jun 24 14:29:29 2024 +0200 Move to tests commit 111900c1220f43f36d4f31965c15a6aea2f61c18 Author: Florian Schroedl Date: Mon Jun 24 14:23:28 2024 +0200 Cleanup commit 10033ead913a8f956c0a2547fef464b697740725 Author: Florian Schroedl Date: Mon Jun 24 14:23:03 2024 +0200 Add specific esm testing environment for tokens commit 2b3f60231236d5129aac8fed306d28ccbe47686d Author: Akshay Gupta Date: Mon Jun 24 17:50:24 2024 +0530 Move json encode functionalities to tokens namespace commit ba6a6059c155c11d32c8a38c720592c3376cd6b7 Author: Florian Schroedl Date: Mon Jun 24 14:07:21 2024 +0200 Move to custom ns commit 69d9c8e88ff2beba907a8463b5d1b52207ca97d8 Author: Florian Schroedl Date: Mon Jun 24 12:44:29 2024 +0200 Add esm test commit ab51b433653c5c3f402983738bfab92bf7cc1c9d Author: Florian Schroedl Date: Mon Jun 24 12:44:05 2024 +0200 Add type commit 0a73cbc6f1026507ff55d290801bd9fba3e94ace Author: Akshay Gupta Date: Mon Jun 24 14:18:57 2024 +0530 Move transform and download functionality to core.cljs commit bbb09567f6a3c99374316ec07093175f36d50abf Author: Akshay Gupta Date: Mon Jun 24 14:18:35 2024 +0530 Remove sample json data commit 5c425141704c4e651baa4ad41083722ed6371d9d Author: Florian Schroedl Date: Mon Jun 24 09:59:22 2024 +0200 Add style dictionary find-token-reference test commit 75bdda6b077b43412f4771ab1f725904490429b4 Author: Akshay Gupta Date: Sun Jun 23 00:16:15 2024 +0530 add some formatting commit 62fc2cf65262bf32638b7443b62e956453cb07a1 Author: Akshay Gupta Date: Sun Jun 23 00:10:02 2024 +0530 Add initial working export tokens-json commit 5f25bd8a7bf46175a97dd3976f129d519f0560a1 Author: Florian Schroedl Date: Fri Jun 21 19:41:04 2024 +0200 Add comments commit 59780a9d4d4362df8e54ec728ebf7c497e156021 Author: Florian Schroedl Date: Fri Jun 21 19:40:03 2024 +0200 Add token finding function commit 598e4d36fc337235c38e5b0ad0662f15dbebe9a3 Author: Florian Schroedl Date: Fri Jun 21 17:19:59 2024 +0200 Disable on value error commit 910485008fc603a00cf999b1af3a8e6edd03a83c Author: Florian Schroedl Date: Fri Jun 21 17:19:13 2024 +0200 Fix name not updating button commit 39eb964cb774489955a58b3d1b012577592f4938 Author: Florian Schroedl Date: Fri Jun 21 17:18:56 2024 +0200 Reduce debounce timeout commit dd62c7fe18cf0d1e296638bf1403f1819dbd1057 Author: Florian Schroedl Date: Fri Jun 21 17:00:56 2024 +0200 Give new tokens without a name a temporary hardcoded string commit 1dcdddb2dbc9d0059b2c6297fd1eb451020c00c8 Author: Florian Schroedl Date: Fri Jun 21 17:00:45 2024 +0200 Check for self references commit 941fb041b62f33a6c80e55635eba17b346a49a7d Author: Florian Schroedl Date: Fri Jun 21 17:00:00 2024 +0200 Add form styling commit 8db47b58775fde1fe7fd567fbc26ea10ffc58979 Author: Florian Schroedl Date: Fri Jun 21 15:09:46 2024 +0200 Use initial value commit 53f01ef46c0b63a48f37d11fe2f96db563466571 Author: Florian Schroedl Date: Fri Jun 21 15:04:30 2024 +0200 Use input as cache key commit 35ee732701d40073901339a0e698a33c7db261f9 Author: Florian Schroedl Date: Fri Jun 21 14:59:08 2024 +0200 Debounced update of resolved value commit f00ac72fbea75f282f2c9791d6b3f7ff49b44ccf Author: Florian Schroedl Date: Fri Jun 21 10:10:45 2024 +0200 Revert to use-var commit e394216f00417f0130a3ab02a25e3fee69632e87 Author: Florian Schroedl Date: Fri Jun 21 10:02:21 2024 +0200 Move form out of modal specific code commit 1ca3f29708373df3c9a2765b9feec2b92076a02d Merge: f000a5145 80ec74f77 Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Thu Jun 20 17:03:45 2024 +0200 Merge pull request #190 from tokens-studio/pr-test Test commit 80ec74f77ee905ca067a3b81fd43680ba1f9fc1b Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Jun 20 17:00:38 2024 +0200 Fix resolver and add an oauth2 proxy commit ef6074a5afb87b2e91ec3d4140b05393ab618ce8 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Jun 20 15:35:33 2024 +0200 Test commit f000a514510bb0f839c57d91da5e2255de17eea1 Merge: 15041a8b9 125e14615 Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Thu Jun 20 13:29:37 2024 +0200 Merge pull request #189 from tokens-studio/clean-ci Fix proxy cache for config map commit 125e146150ceacab58e417b3677233642da9aec1 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Jun 20 13:28:13 2024 +0200 fix proxy cache for config map commit 15041a8b9a0ef527a5c06945d66319fe42aafa17 Merge: 31344a532 5c93cf9cd Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Thu Jun 20 13:04:29 2024 +0200 Merge pull request #188 from tokens-studio/clean-ci Fix font issues commit 5c93cf9cd39a984919c14e7a935015c368a8edca Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Jun 20 13:03:49 2024 +0200 Fix font issues Fix minio resolution not working Fix redis auth on by default commit 31344a5322fa97eb08f6573d8d5e6fce63007601 Merge: ea5dbe275 867fd2391 Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Thu Jun 20 02:18:31 2024 +0200 Merge pull request #187 from tokens-studio/clean-ci Cleanup commit 867fd239170ea723884672a40bbe97dc95376002 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Jun 20 02:15:35 2024 +0200 Cleanup commit ea5dbe275e766b978b8975cd2f99a93c76f85cfa Merge: dcf4b7ce6 41bd4c621 Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Thu Jun 20 02:06:50 2024 +0200 Merge pull request #185 from tokens-studio/feat/mailslurper Feat/mailslurper commit 41bd4c621f7b31be54154bb34feac69b58df328a Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Jun 20 02:06:21 2024 +0200 Last round of changes commit 228665f5f2f219b14747b2edcddd628ea2c05a19 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Jun 20 00:58:10 2024 +0200 Pr should be a prefix commit be6b217ef0581f39caeb9592afe5f60bb50032fc Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Jun 20 00:49:33 2024 +0200 Fix to use the sanitize the backend tag commit 87b1bc12c27f2375b483857ea9b9099d5fd25ace Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Jun 20 00:40:10 2024 +0200 Change asset storage commit 4b61e0d80cf709918f7d9a2a1b5b5ab8f3b0e563 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 21:09:18 2024 +0200 Fix branch name detection commit f5514b419a2f077365ee93a302f4aacbff471827 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 21:02:16 2024 +0200 Use a raw tag commit 349bdbb776a69aad0b24acd7cf7e1c1dc7fe75cf Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 20:52:33 2024 +0200 Change to use branch names instead of shas commit 0fd4f814d8ffa15eb3cd5dd5d7bcd65364940b82 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 20:47:35 2024 +0200 Remove node affinity commit 79b49bae27e88499f50e412651ebaa3768cb462c Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 20:31:21 2024 +0200 Update namespace commit dcf4b7ce6423d80aaf0788d9d8a7763d52a400e0 Merge: 596c1997b f45789596 Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Wed Jun 19 20:16:39 2024 +0200 Merge pull request #186 from tokens-studio/feat/clean-images Add clean images workflow commit f45789596135590d80944f11ed5a6c014012a609 Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Wed Jun 19 18:15:53 2024 +0000 Add clean images workflow commit b40f222d160954ee805cc874e570691a7ac7c8c3 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 20:06:35 2024 +0200 Add quote commit 99d6df4588e858d6b89453524dce522bb6204a6b Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 19:58:44 2024 +0200 Build backend as part of PR commit 034d5ad5ab2d723dcf7d59cde4fb8c853442325f Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 19:57:19 2024 +0200 Overhaul penpot chart commit 885322d479f8544130e5ec059f3976e473aed44c Author: Florian Schroedl Date: Wed Jun 19 17:17:00 2024 +0200 Reestore fields commit 0830a26be972b74db9595b7dcd188cb15b517034 Author: Florian Schroedl Date: Wed Jun 19 17:11:28 2024 +0200 Add error state for invalid name commit 905ccfdec939746b3c9feda1a1e414ea3887f2ee Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 16:36:00 2024 +0200 Capitalize chart commit e3d73be7c5ff8557cc80f67671621645ad3cc45b Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 16:35:46 2024 +0200 Make sure the uppercase goes through commit 072baf9c7b49f8b45101b3f4e2d22b4d2581d952 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 16:30:45 2024 +0200 Test PR again commit 3e20e15ffd9208776b42d0b9b52ab29c4f5adb4c Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 16:22:28 2024 +0200 Try fix PR chart commit 6ed788aa5a3b3c3c0f9b82a088b04ad67decb9aa Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 16:15:20 2024 +0200 Add patch to enable SMTP commit 0c45d15fe7fc171e8ff6cd26dec8269a29d442ea Author: Florian Schroedl Date: Wed Jun 19 16:01:40 2024 +0200 Variadic function doesn't work for hooks commit 596c1997b8c3547c4fb1efd6ac5948a9875a610c Merge: f3d5b10e1 21ef1586f Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Wed Jun 19 15:57:35 2024 +0200 Merge pull request #184 from tokens-studio/feat/mailslurper Move config from chart to include the smtp settings commit 21ef1586f00e5a00f757209309cb728997a7e729 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 15:56:03 2024 +0200 Move config commit f3d5b10e1f5b419c341606621a1420a099c28e14 Merge: 2ce3a180e 3e94d4685 Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Wed Jun 19 15:37:02 2024 +0200 Merge pull request #183 from tokens-studio/feat/mailslurper Typo in infra manifest commit 3e94d468504b4cfbfc89494f74f8a029eb4fc4ce Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 15:35:15 2024 +0200 Typo commit 2ce3a180eb476b8663957997d5a2ec3bb8207868 Merge: caa41146c 569db9d1e Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Wed Jun 19 15:27:59 2024 +0200 Merge pull request #182 from tokens-studio/feat/mailslurper Try cleanup namespace control commit 569db9d1e604d39956e14e8b9a55b9b7a4c33fdc Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 15:25:12 2024 +0200 Try cleanup namespace control commit caa41146c49df2975c8d354a52c8e606259db9f4 Merge: a2292eb38 5e32a5bbf Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Wed Jun 19 14:56:29 2024 +0200 Merge pull request #181 from tokens-studio/feat/mailslurper Remove onechart for simple manifests commit 5e32a5bbfdad9742a3e73bf40f976f50293ba662 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 14:53:21 2024 +0200 Remove onechart for simple manifests commit a2292eb387abe8572e8319eb6d0860ed723e344d Merge: 4c236ab42 deb7ba982 Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Wed Jun 19 14:43:24 2024 +0200 Merge pull request #180 from tokens-studio/feat/mailslurper Setup mailslurper commit deb7ba9823bbddc2a65a9c7707f13165c0dfd24e Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 14:42:04 2024 +0200 Setup mailslurper commit 4c236ab423df666fc653c9d9ce67804377e2b8e3 Merge: 168a5d57d 386bf1bc2 Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Wed Jun 19 14:10:43 2024 +0200 Merge pull request #179 from tokens-studio/fix/persistence Add persistence to penpot deploys commit 386bf1bc2fa3d06965a3127051550f5808889c84 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 14:09:35 2024 +0200 Add persistence to penpot deploys commit 1596dbe155b6b2477858e58e85cd926e58cc5d77 Author: Florian Schroedl Date: Wed Jun 19 13:54:09 2024 +0200 Add function to verify already used names commit deb9cb11201aec86898443bc60e2620c09f8ba27 Author: Florian Schroedl Date: Wed Jun 19 11:26:29 2024 +0200 Remove debugging code commit f169d4939721b22184eaa8c13a8edcf231dac2f5 Author: Florian Schroedl Date: Wed Jun 19 11:18:41 2024 +0200 Remove double cljs conversion commit 0a73c3aa9512aceb7f01db9eeb28f3cfa50a5e83 Author: Florian Schroedl Date: Wed Jun 19 11:09:01 2024 +0200 Validation in modal commit 168a5d57d4e24a2ad46b5df7a7e6b3a07f7f790b Author: Florian Schroedl Date: Wed Jun 19 10:49:35 2024 +0200 Add template commit a4ef2ee8bf3b30a31b4c6b00e2fbfaeb69e69d15 Author: Florian Schroedl Date: Wed Jun 19 10:42:42 2024 +0200 Add changelog commit 83515250da1af26f6a98dc898a56bbb39b7ecbd5 Merge: 0d4e3e862 5a8a32ddc Author: Florian Schrödl Date: Wed Jun 19 10:10:43 2024 +0200 Merge pull request #168 from tokens-studio/style-dictionary References & Expressions in Tokens commit 5a8a32ddc7b584116ce02609bb0c3dbf6bc6ff4c Author: Florian Schroedl Date: Wed Jun 19 09:43:36 2024 +0200 Remove items with missing references commit 23de79bd04c18436de82d91974acfd86d85f6bcf Author: Florian Schroedl Date: Wed Jun 19 09:40:26 2024 +0200 Remove unneeded function commit 0d4e3e86299a5f98cfecad6726ff12cc3a44406b Merge: 35135635c 0105e4206 Author: Akshay Gupta Date: Wed Jun 19 12:58:54 2024 +0530 Merge pull request #174 from tokens-studio/fix-dimensions-keys-applied Fix keys applied when dimensions or sizing token is applied directly commit 35135635c4d56b9643bf6164bccdf4ff58ce394e Merge: 2ed3ea6d6 0afddac5d Author: Akshay Gupta Date: Wed Jun 19 12:58:43 2024 +0530 Merge pull request #175 from tokens-studio/fix-min-max-height-error Fix/ min and max height-width application commit 2ed3ea6d6a9641008def0f8456b1f43f4d49e833 Merge: 1ebd2ee3d 3bbee9532 Author: Akshay Gupta Date: Wed Jun 19 12:58:25 2024 +0530 Merge pull request #177 from tokens-studio/remove-registration-questionnaire Remove registration questionnaire commit 3bbee9532f65c4b5f0e1dac21d85229833e4aa4d Author: Akshay Gupta Date: Wed Jun 19 12:38:28 2024 +0530 Fix error message commit f99239341f202ea04943a84e60a63872470941cb Author: Akshay Gupta Date: Wed Jun 19 12:18:39 2024 +0530 add message to undo this change in the future commit f405612a25e39d0b367ca3945e2012ca5315a8e3 Author: Akshay Gupta Date: Wed Jun 19 12:16:54 2024 +0530 Remove Onboarding Questionnaire commit 0afddac5d104812ccc7332bffed23ffc101fb281 Author: Akshay Gupta Date: Tue Jun 18 23:52:54 2024 +0530 Fix/ min and max height-width application commit 0105e42068cab91fd81e1430fe58f15a97575778 Author: Akshay Gupta Date: Tue Jun 18 23:21:17 2024 +0530 Fix keys applied when dimensions or sizing token is applied directly commit b4d7680cb4b8f5ec16bf0202ae8552d2274b4385 Author: Florian Schroedl Date: Tue Jun 18 11:29:02 2024 +0200 Show resolved value commit 742bb6de05e7dced24c2904affcf5731de14c484 Author: Florian Schroedl Date: Tue Jun 18 11:28:09 2024 +0200 Handle tokens with issues in ui commit a390942722be0b3054a5a4ea1a006759d0effa4c Author: Florian Schroedl Date: Tue Jun 18 11:19:09 2024 +0200 Resolve token value commit cf52e873e2b4150de4ed4c5c5411144359b96a90 Author: Florian Schroedl Date: Tue Jun 18 11:13:26 2024 +0200 Cleanup commit 5c2891b247554488a1f60ddc3b14b64b358fb90b Author: Florian Schroedl Date: Tue Jun 18 11:10:51 2024 +0200 Use resolved tokens from style-dictionary commit 9261c53affb6980029140777b12b4ff248d75757 Author: Florian Schroedl Date: Tue Jun 18 10:23:52 2024 +0200 Don't override original value, add resolved value, add missing reference error commit d65d880845fd68376b38f8337c66194149784d4e Author: Florian Schroedl Date: Tue Jun 18 09:59:36 2024 +0200 Silence errors commit 09609c18ef417c74039f605377b14fdcb5342e1e Author: Florian Schroedl Date: Mon Jun 17 17:07:02 2024 +0200 Remove compile style dictionary commit f0bc262a18ffd38957447edf46312c793baf1b45 Author: Florian Schroedl Date: Mon Jun 17 17:05:51 2024 +0200 Working version commit 5a64947b08a32bbf52705d690405a223acf3aa40 Author: Florian Schroedl Date: Mon Jun 17 16:13:34 2024 +0200 Add patched StyleDictionary commit 0a86e3a65115de4eacfc7d602b734a69bca79c54 Author: Florian Schroedl Date: Fri Jun 14 10:52:30 2024 +0200 Simplify commit c9df90577fbe6e624d76b4d3a518772d66fafb21 Author: Florian Schroedl Date: Thu Jun 13 09:27:53 2024 +0200 Add compiled library commit 965da83c97424bce7c075ab2eb7ad943030e0db2 Author: Florian Schroedl Date: Wed Jun 12 17:14:34 2024 +0200 Add workspace-tokens helper commit 9bc48a3a1a1ab103f05f559c4019587bfa6f2abf Author: Florian Schroedl Date: Wed Jun 12 17:14:27 2024 +0200 Allow passing custom cache atom commit 908cc2240f1d37db43735d3cf76dfd587042772d Author: Florian Schroedl Date: Wed Jun 12 16:48:13 2024 +0200 Docs commit a79d1013bfff824dd1dc24341236bd294be8dffd Author: Florian Schroedl Date: Wed Jun 12 16:45:24 2024 +0200 Prevent reprocessing the style-dictionary cache multiple times commit 73e8b8052157d2db2c228340a20e72e9fa00113a Author: Florian Schroedl Date: Wed Jun 12 16:19:39 2024 +0200 Cleanup commit 2f45ab1b625be7dd2da73339d361d62566afe46b Author: Florian Schroedl Date: Wed Jun 12 16:19:03 2024 +0200 Add hook for using resolved tokens cache commit 0921f8043bbb5ba9c5fb1e8eb315ce7f9e6719ec Author: Florian Schroedl Date: Wed Jun 12 16:10:02 2024 +0200 Allow passing of tokens commit b1b6b5292c3e95575174010d55d02691ac3e7943 Author: Florian Schroedl Date: Tue Jun 11 17:52:29 2024 +0200 Disable invalid token style for now commit 4fec7d5af21e336850475feb921908641b855acb Author: Florian Schroedl Date: Tue Jun 11 17:52:12 2024 +0200 Applying resolved token value commit 66b4b892df9a105e5ec0f9dbe41013e0821e002f Author: Florian Schroedl Date: Tue Jun 11 16:43:54 2024 +0200 Fix data-keys being converted to camel-case commit 4b90e909742deb9cff398a5e0278842a809458e5 Author: Florian Schroedl Date: Tue Jun 11 16:41:50 2024 +0200 Backporting resolved tokens to the original structure commit 1519f8f56026a770476be2ab18a5ca68fd48a230 Author: Florian Schroedl Date: Tue Jun 11 15:12:30 2024 +0200 Move to ns commit e691628648ff8f8aecb85f32cc4694f9ccf6fb60 Author: Florian Schroedl Date: Tue Jun 11 10:42:25 2024 +0200 Test out tokens-studio data commit efd4c5dcca7655dbde4be4d286b6dda75d13b502 Author: Florian Schroedl Date: Tue Jun 11 10:24:12 2024 +0200 Add performance measuring commit a5b22d542750767c2af9c06075939ab19b566db8 Author: Florian Schroedl Date: Mon Jun 10 15:50:48 2024 +0200 Got resolve working commit 7da772d6a20904d84da6a224bb3de009b5dbc2f9 Author: Florian Schroedl Date: Mon Jun 10 11:54:34 2024 +0200 Add sd function commit 1023ba866a6d36236b0c9bf6762a4ee60ab3976c Author: Florian Schroedl Date: Mon Jun 10 10:52:03 2024 +0200 Add StyleDictionary as compiled lib commit 1ebd2ee3d72bd3959ff60fe07b5559705dd4f141 Merge: dc36f4f6d 8d444b4b0 Author: Akshay Gupta Date: Fri Jun 14 12:40:44 2024 +0530 Merge pull request #172 from tokens-studio/hide-unfunctional-token-sections Hide non functional token sections commit 8d444b4b02c2990c141305ebfaf7b6430b812a07 Author: Akshay Gupta Date: Thu Jun 13 21:33:38 2024 +0530 Hide non functional token types from UI commit dc36f4f6d389a12d8b99ff78e3b78534dafe3c9a Merge: 93c249c77 f10a4f28e Author: Akshay Gupta Date: Thu Jun 13 12:59:49 2024 +0530 Merge pull request #164 from tokens-studio/other-token-types-context-menu Add context menu for opacity, rotation and stroke width tokens commit f10a4f28eaea0e104bae5d0a27d3a4dc56419472 Author: Akshay Gupta Date: Wed Jun 12 16:18:51 2024 +0530 Add context menu for opacity, rotation and stroke width commit 93c249c77ac043aa6b00398ac613e9390af74c86 Merge: 01d2a25c8 3f55536fc Author: Akshay Gupta Date: Wed Jun 12 15:29:30 2024 +0530 Merge pull request #161 from tokens-studio/dimensions-context-menu Dimensions context menu commit 3f55536fc042e9a86f565ffd8c52d1df079d2735 Author: Akshay Gupta Date: Mon Jun 10 23:25:11 2024 +0530 Add custom context menu and fix styling issues with subcontext menu commit 842b76f3c1290a34982fd63ed1703a883ff12619 Author: Akshay Gupta Date: Fri Jun 7 01:37:26 2024 +0530 replace 30px with variables commit e86038d52f8ae7369ea4a516b7dfc535056921d7 Author: Akshay Gupta Date: Fri Jun 7 01:27:18 2024 +0530 Add CSS to deal with margin before the Sub Context Menu titles commit 91eb59696c86b1662884bd053d9264c34efb5b3a Author: Akshay Gupta Date: Thu Jun 6 23:09:22 2024 +0530 Remove children attribute and use submenu instead commit 67a34c91d8c9b10f9aa7c49cf43c02fc4151eae8 Author: Akshay Gupta Date: Wed Jun 5 23:19:43 2024 +0530 Add leading spaces to subcontext menu titles commit 307f4725288fa73d03a674d962723da8c5896166 Author: Akshay Gupta Date: Wed Jun 5 22:23:27 2024 +0530 remove print statement commit a5c235754cc341c1c76ac598611fe980a0076529 Author: Akshay Gupta Date: Wed Jun 5 22:06:59 2024 +0530 Cleanup debug statements commit a98d6b4c07fcbb5012432732a4244c4b39a760ba Author: Akshay Gupta Date: Wed Jun 5 22:06:31 2024 +0530 Add context menu functionalities for dimensions token commit ed0d9e1cf51b6079c9f7ca1d9e0fd76a4ab37854 Author: Akshay Gupta Date: Wed Jun 5 13:49:18 2024 +0530 initial dimensions context menu commit 819c50eaf850a55233eb82e628f2225430af4e1b Author: Akshay Gupta Date: Wed Jun 5 13:49:00 2024 +0530 change dimension to dimensions across commit 01d2a25c8c25efeb2975726b5d5cb0e75ae1ec7c Merge: e8b755c75 ea593221b Author: Akshay Gupta Date: Tue Jun 4 17:02:04 2024 +0530 Merge pull request #160 from tokens-studio/sizing-token-context-menu Add new changes from token-studio-develop merge commit ea593221b30a360bb26e3e283f2d88b153313a31 Author: Akshay Gupta Date: Tue Jun 4 15:52:52 2024 +0530 Add new changes from token-studio-develop merge commit e8b755c7579d82d60f7095e52ef1986278e0021a Merge: 202b72dcd 88d3fc234 Author: Akshay Gupta Date: Tue Jun 4 15:47:58 2024 +0530 Merge pull request #159 from tokens-studio/sizing-token-context-menu Add context menu functionalities on sizing tokens commit 88d3fc234d128318dffedfebe85ca6b6cd38f7f1 Merge: a553253d2 202b72dcd Author: Akshay Gupta Date: Tue Jun 4 15:46:02 2024 +0530 Resolve merge conflicts in context_menu.cljs commit 202b72dcd009c6e3a584d518a250bce923c98127 Merge: 1056c6b44 057934c88 Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Tue Jun 4 11:23:49 2024 +0200 Merge pull request #132 from tokens-studio/feat/branch-deploys Prefer wait over deploy for build commit 057934c883bd7b452a816e44d76bdebf558fd06a Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Tue Jun 4 11:11:58 2024 +0200 Cleanup PR commit 3b3fbc2ccd9c62d57e316b12e6258150df9e1278 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Tue Jun 4 11:06:00 2024 +0200 fix deploys commit 1056c6b44891608b6adc472e73fddb3eed990406 Merge: dc14933f3 580076355 Author: Florian Schrödl Date: Tue Jun 4 10:39:03 2024 +0200 Merge pull request #158 from tokens-studio/142-when-a-token-is-applied-on-a-shape-in-the-context-menu-there-should-be-check-box-indicating-which-attribute-is-applied Show checkmark next to selected token attributes commit a553253d28d887d6a36e6e4a342719d904d1b858 Author: Akshay Gupta Date: Mon Jun 3 23:34:51 2024 +0530 remove println statement commit 193ad115a29aaa3a9ce077108b51c4db409ee283 Author: Akshay Gupta Date: Mon Jun 3 23:25:59 2024 +0530 Add context menu functionalities on sizing tokens commit 580076355b327e878c5c19e03863a24d1caf01da Author: Florian Schroedl Date: Mon Jun 3 15:21:08 2024 +0200 Show checkmark for applied tokens commit 65942ef63b3ee3694823eb7b8ca0c24a7be3dbd1 Author: Florian Schroedl Date: Mon Jun 3 13:39:26 2024 +0200 Use set of attributes for action generation commit c1096e15da28332c0c9d694ec4afdd32d0a93d8e Author: Florian Schroedl Date: Mon Jun 3 13:39:16 2024 +0200 Cleanup commit dc14933f3a774d289d3cfcd73a73c7f90646cb72 Merge: e89f03393 3c3ef57da Author: Florian Schroedl Date: Mon Jun 3 10:51:04 2024 +0200 Merge remote-tracking branch 'penpot/develop' into token-studio-develop commit e89f03393b06befef438b3baf71985176d619e18 Merge: 5c7e235c9 86e6421b6 Author: Florian Schrödl Date: Mon Jun 3 10:48:49 2024 +0200 Merge pull request #157 from tokens-studio/florian/input-select Allow token selection with keyboard from right side commit 86e6421b68e9d70de6cbf6972943b11052e8a4bd Author: Florian Schroedl Date: Fri May 31 16:25:30 2024 +0200 Disable selection when entering with mouse commit 710fa0d81732202e65b458476abb72e832ab2ee4 Author: Florian Schroedl Date: Fri May 31 16:22:01 2024 +0200 Allow arrow selection commit 5c7e235c979421b4e4e8c5f1d0eb9738422cb412 Merge: d624a559a c3cee77ef Author: Akshay Gupta Date: Fri May 31 18:31:37 2024 +0530 Merge pull request #155 from tokens-studio/spacing-context-menu Spacing context menu commit c3cee77efbb3a0f80df64c9157def90ab7c54f60 Author: Akshay Gupta Date: Fri May 31 18:19:42 2024 +0530 remove unused imports and refactor functions commit d624a559aa8cb137656c4804fee55b04e2b3d006 Merge: 420b8cf52 d16f1c773 Author: Florian Schrödl Date: Fri May 31 10:46:51 2024 +0200 Merge pull request #150 from tokens-studio/flex-row-gap-commit Spacing tokens commit 76347228fe254ac779bf3fa24360266bd72b8678 Author: Akshay Gupta Date: Thu May 30 22:25:21 2024 +0530 Add all spacing token context menu functionalities commit 84d96a1004cef29dda54521c69bc5ffa661a3e2d Author: Akshay Gupta Date: Wed May 29 18:47:17 2024 +0530 Add initial spacing context menu entries commit d16f1c773e13c9dfaa1cc74b651cb89effbd2e86 Author: Florian Schroedl Date: Wed May 29 14:53:40 2024 +0200 Change both properties commit 7376cb634a1adf6092c0b1b0ba28f7af91a4998e Author: Florian Schroedl Date: Wed May 29 14:32:09 2024 +0200 Add padding x/y tokens commit 0e7e37afc2746faf39644ad63c667cc8fbcbc937 Author: Florian Schroedl Date: Wed May 29 14:21:33 2024 +0200 Add padding editable select commit 28bdf62454c0a81e7bc9e5cd45654d8c42a9b38b Author: Florian Schroedl Date: Wed May 29 13:50:31 2024 +0200 Integrate changes commit 420b8cf52476051c501ba1713784c43d90c70a6a Merge: bdefc97c2 c2c0fbf40 Author: Florian Schrödl Date: Wed May 29 13:20:44 2024 +0200 Merge pull request #146 from tokens-studio/135-flex-row--gap-token-updating-from-the-right-sidebar 135 flex row gap token updating from the right sidebar commit 78f3d54dee446741a1e17b4c18bec76245d245f4 Author: Florian Schroedl Date: Wed May 29 10:55:40 2024 +0200 Add commit commit c2c0fbf40a6ee72d668f8fee88b678ab1c8bbbf2 Author: Florian Schroedl Date: Wed May 29 09:37:24 2024 +0200 Add spacing/row options commit 1ad998de233a5ddfc72a13bc851dcd15473733d6 Author: Florian Schroedl Date: Wed May 29 09:28:38 2024 +0200 Use editable-select for col-gap/row-gap commit fb5f7e870aad1341cf6761a7167d39c079807833 Author: Florian Schroedl Date: Wed May 29 09:23:47 2024 +0200 Fix drop-down button spacing commit 5c832472561edcef9662d616339f09e63fde4c0f Author: Florian Schroedl Date: Wed May 29 09:20:14 2024 +0200 Prevent selection on disabled selects commit c6f5da8873a24428532910f00a7fe670e1f0ab4e Author: Florian Schroedl Date: Wed May 29 09:16:55 2024 +0200 Move select styles to select component commit 9a7c944763ecbb24a6bf1bb8ca8315894327661c Author: Florian Schroedl Date: Wed May 29 09:04:49 2024 +0200 Remove unused classname commit 985d8d33ff6a233e5641e3b7b3d4004758d2aa03 Author: Florian Schroedl Date: Wed May 29 09:02:26 2024 +0200 Add event to passed arguments [*] [*] Needed for layout_container component commit 384da8555d6fb46bb960db095ec73ab81201d627 Author: Florian Schroedl Date: Wed May 29 08:50:50 2024 +0200 Dynamically pass props to input commit bdefc97c21f43a08571c3e14a66249fcb0291692 Merge: 144b164fa bb3ee2278 Author: Akshay Gupta Date: Tue May 28 17:36:59 2024 +0530 Merge pull request #140 from tokens-studio/general-token-context-menu-functions General token context menu functions and specific context menu functions for border radius commit bb3ee227808e2fb53353499d531d9795cf2b3a9c Author: Akshay Gupta Date: Tue May 28 17:03:26 2024 +0530 pass context menu attributes as map and some minor fixes commit e02777b855ea0ce89483fb506f9a2d469973c9a4 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Tue May 28 10:23:20 2024 +0200 Be explicit in tagging for prs commit 144b164fa006ec829824f85556e77aa514e9af8a Merge: 169d71b2d 96a7cf2e9 Author: Florian Schrödl Date: Tue May 28 10:06:12 2024 +0200 Merge pull request #139 from tokens-studio/fix-staging Fix staging commit eeb87e49a2e65340e92b990250eef359df7f8123 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Tue May 28 09:58:15 2024 +0200 Cleanup github token usage commit 9066ad9e39159642734c0827679becd33af4b7a1 Author: Akshay Gupta Date: Tue May 28 02:22:25 2024 +0530 Add border radius specific context menu functions commit 464bdf3d9c8d83b1be32584dad8c7b3b212b4dc1 Author: Florian Schroedl Date: Mon May 27 15:09:36 2024 +0200 Use single undo operation for width/height change commit 96a7cf2e98d1d400087706e814aafccb213d7177 Author: Florian Schroedl Date: Mon May 27 14:50:55 2024 +0200 Convert kebab keys into camelCase commit 47d75e7e2a97e0f89c5b416832be1deadfa7d562 Author: Florian Schroedl Date: Mon May 27 14:43:28 2024 +0200 Remove closed for now commit 6ed5dc138d6f7edebe67e0ec9ef62c8747eb6005 Author: Florian Schroedl Date: Mon May 27 14:43:11 2024 +0200 Fix editing/saving commit 169d71b2dfa7ba12cc091d46df7d71cb052d6cea Merge: 65563e2d3 6bacd1d66 Author: Florian Schrödl Date: Mon May 27 11:22:27 2024 +0200 Merge pull request #138 from tokens-studio/124-disable-1password-completion 124 disable 1password completion commit 6bacd1d663d5980bed64ebc77214aeb95e413ee7 Author: Florian Schroedl Date: Mon May 27 11:13:05 2024 +0200 Disable password manager completion commit 86d7979e1ec2c178707655966a481f93a3eeb461 Author: Florian Schroedl Date: Mon May 27 11:12:36 2024 +0200 Remove unused component commit d1fc43d8d6e3af528c07547dd9213195c8fe3628 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 27 10:38:35 2024 +0200 Try force deploy branch PR commit 370a5d9bb8afeff6822bcb3f812bf204a9d9b6c9 Author: Akshay Gupta Date: Mon May 27 13:02:24 2024 +0530 Add initial context menu token specific functionality commit 65563e2d3cec0d5a7c3197d9cc6b39918fa62254 Merge: 968c6437f 7a8722de1 Author: Akshay Gupta Date: Fri May 24 18:13:00 2024 +0530 Merge pull request #133 from tokens-studio/editing-tokens :feat editing tokens commit 968c6437fbd02b363bf1328a88bae4fb534d481e Merge: 75b935187 cbad5033c Author: Florian Schrödl Date: Fri May 24 11:46:45 2024 +0200 Merge pull request #134 from tokens-studio/123-other-fields-to-update Width/Height Token Changing from the sidebar commit cbad5033c25f6283f2520f41d57dd5e6da4844ef Author: Florian Schroedl Date: Fri May 24 11:25:30 2024 +0200 Cleanup commit f52e2e3a4114a789ba1e56a8976cb5ac3d0b0a7a Author: Florian Schroedl Date: Fri May 24 10:34:20 2024 +0200 Differentiate width/height sizing selected properties commit 49d9b52b121c3c2ac007eb7938d412fd4daabc1f Author: Florian Schroedl Date: Fri May 24 10:01:13 2024 +0200 Cleanup commit ea9d850412fb7325d4ee742165742a507c093cdf Author: Florian Schroedl Date: Fri May 24 10:00:43 2024 +0200 Fix selectionStart not being detectable (selectionStart doesnt work for number) commit b6061cc4a042c9da01572172d3aa7311a4a49320 Author: Florian Schroedl Date: Fri May 24 10:00:26 2024 +0200 Fix instant value change applies shape attributes commit bc620ba2cd436c158e58afe36c4d850b986bbe90 Author: Florian Schroedl Date: Fri May 24 08:55:04 2024 +0200 Update width value commit 595831118d11f2acc169e6c01137e3e02f3a2ae0 Author: Florian Schroedl Date: Fri May 24 08:36:28 2024 +0200 Allow aligning dropwdown to the left commit 406e8d110c49a141d8297bafecb9302fb98dc344 Author: Florian Schroedl Date: Fri May 24 07:34:43 2024 +0200 De-Applying token commit 7a8722de1bfea834d760c02121d66ff6e61e53cd Author: Akshay Gupta Date: Fri May 24 00:14:17 2024 +0530 Add ability to edit existing token attributes commit 5131b790604317169820444224456501271eb233 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu May 23 16:22:31 2024 +0200 Prefer wait over deploy for build commit 75b93518714d79e577b9350080835bff2154133e Merge: 557195cd5 84ad8a6be Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Thu May 23 16:19:31 2024 +0200 Merge pull request #131 from tokens-studio/feat/branch-deploys Test PR deploys commit 84ad8a6be68c27a8eb971e70382dfa2ac0b98f7d Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu May 23 15:39:21 2024 +0200 Escape interpolation commit f9e1a6563139ae6286eab3fd031b0b18d9eb9bb0 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu May 23 15:23:27 2024 +0200 Trigger cleanup as well commit 66f67ddff4d9203e0ad71ba0f77842d85a8270da Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu May 23 15:13:43 2024 +0200 Test PR deploys commit 2dd994799c93a6042455642836d1f835d1b00cd8 Author: Florian Schroedl Date: Thu May 23 09:41:16 2024 +0200 Abstract API commit e181065bda45de0042fd4c8b4e36dd4457c29c5d Author: Florian Schroedl Date: Thu May 23 09:29:17 2024 +0200 Formatting commit 1ed692230be9166c54e4a797dcab13251f994a2c Author: Florian Schroedl Date: Thu May 23 09:24:12 2024 +0200 Abstract functionality commit 557195cd55cd8e161a0c98dddef6e21acf389926 Merge: 2818d097a 80ff7f769 Author: Florian Schrödl Date: Thu May 23 11:05:12 2024 +0200 Merge pull request #130 from tokens-studio/129-bug-file-is-crashing-post-applying-a-border-radius-token-to-a-shape Fix non-optional keys breaking staging server commit 80ff7f769cf04c3eae55345e84faf13a1f17efaf Author: Florian Schroedl Date: Thu May 23 10:53:18 2024 +0200 Fix non-optional keys breaking staging server commit 273a9530ea275117135e004c42017233fbdc6bb4 Author: Akshay Gupta Date: Thu May 23 13:14:28 2024 +0530 initial edit commit commit 2818d097abb8be2dd21cdc62679a3e86978df06d Merge: 1a144192a cc0e4af4b Author: Florian Schrödl Date: Thu May 23 08:43:51 2024 +0200 Merge pull request #128 from tokens-studio/119-higlight-applied-token-in-the-editing-field Show token value inside shapes panel (border-radius) commit cc0e4af4bc0d22f0e59db6259b413d5ebd37a9a4 Author: Florian Schroedl Date: Wed May 22 16:37:19 2024 +0200 Fix token value not being removed after submit commit b1379ed7dea857467243018789aa41ca144b372c Author: Florian Schroedl Date: Wed May 22 16:35:44 2024 +0200 Fix refocus prop not being removed commit 5bccfa9e2fba81a2f306001d0df0fa4de07bdb6e Author: Florian Schroedl Date: Wed May 22 16:29:18 2024 +0200 Dont submit token when text is selected commit 5806ae7426e4c20effe7e0045cb57652920cbce8 Author: Florian Schroedl Date: Wed May 22 16:20:40 2024 +0200 Abstract functions commit 2eb5efb2746b119c01f63a8ceac17595a36cc7de Author: Florian Schroedl Date: Wed May 22 16:13:58 2024 +0200 Cleanup commit 850bf80ffc63d451e48e9fbc40c10dee519261a8 Author: Florian Schroedl Date: Wed May 22 15:59:22 2024 +0200 Replace token with value when inserted after token input commit 6f5930bf15174c706aed48bcc7499899fb8e93fb Author: Florian Schroedl Date: Wed May 22 15:43:40 2024 +0200 Clear token value on blur commit 2efd6e1584d407dd0ecae5e4f0190168d952035a Author: Florian Schroedl Date: Wed May 22 15:36:26 2024 +0200 Refocus input on token deletion commit 86b493522cf3adcbe393aa083e8a9e78627dc3ae Author: Florian Schroedl Date: Wed May 22 15:12:56 2024 +0200 Remove unneeded focus hack commit 1a144192a9af61fce61a8dc1a5e01059b3b600d2 Merge: cbfcc5056 04c43acf3 Author: Florian Schrödl Date: Wed May 22 15:00:05 2024 +0200 Merge pull request #127 from tokens-studio/fix-sass-pipe-break Dont break pipe when sass has an error commit 70336ea45ea4a87b9f511e0b82a3d60e587c7d1a Author: Florian Schroedl Date: Wed May 22 14:26:37 2024 +0200 Style focused pill commit 7e79cf274db9c0311e3b292ef7e3c2c6b620ab90 Author: Florian Schroedl Date: Wed May 22 14:17:56 2024 +0200 Fix input background being clipped on hover commit 42df4263759f6622dca1ca34795af3700414c2f1 Author: Florian Schroedl Date: Wed May 22 14:13:33 2024 +0200 Style pill and input combination commit 7c80f87f30a58a577cd44de1e84ca722a79a720f Author: Florian Schroedl Date: Wed May 22 14:13:23 2024 +0200 Show value instead of label, add title commit 019759392cd8287b18cb2947e70836a8bd033c0e Author: Florian Schroedl Date: Wed May 22 10:23:57 2024 +0200 Unlink token when pressing backspace on empty input field commit 7da382dfed20b5d6b2259968984b8d7e02bfe4cd Author: Florian Schroedl Date: Tue May 21 15:47:18 2024 +0200 Clear value when pressing backspace as last action commit 35f384ce9b38baa17bf31c84aeb5575bc86808b0 Author: Florian Schroedl Date: Tue May 21 15:40:34 2024 +0200 Use custom input value logic when token is applied commit 50354ccb71251919f93b6b51f9e743bee44db52e Author: Florian Schroedl Date: Tue May 21 15:40:19 2024 +0200 Fix state being reset at start commit 975f41bc08988ae129b7fc0803c5277be883bf83 Author: Florian Schroedl Date: Tue May 21 15:21:01 2024 +0200 Display regular input field when token is applied [*] [*] Numeric input renders default 0 commit 04c43acf39f7ac7a6289b14c192ad2f72e75c72a Author: Florian Schroedl Date: Wed May 22 13:48:13 2024 +0200 Dont break pipe when sass has an error commit cbfcc50563fd3cec062b8043615ebd43adc933ba Merge: 44f55308a eb168a6f9 Author: Florian Schroedl Date: Wed May 22 13:46:26 2024 +0200 Merge remote-tracking branch 'penpot/develop' into token-studio-develop commit 44f55308a6453c3e3e516fb4181e95359a1a04d8 Merge: e874ed5b6 2b1066535 Author: Akshay Gupta Date: Wed May 22 15:14:54 2024 +0530 Merge pull request #126 from tokens-studio/rotation-token Add ability to apply rotation token commit 2b10665356bf63a37037659b0ed97f3524389a1d Author: Akshay Gupta Date: Wed May 22 15:11:01 2024 +0530 close applied tokens map schema commit 13a8872dbdc8130d77e9ecd4611dda7525ddd5e2 Author: Akshay Gupta Date: Wed May 22 15:08:05 2024 +0530 add rotation to applied tokens schema commit 3793f1791a8ca9471e0255bac49337bdf2e5df02 Author: Akshay Gupta Date: Wed May 22 13:08:59 2024 +0530 Add ability to apply rotation token commit e874ed5b6cace7afacf73fe100960031dc66452c Merge: cb7d4409e eca133426 Author: Akshay Gupta Date: Tue May 21 17:11:21 2024 +0530 Merge pull request #125 from tokens-studio/remember-token-section-state Remember token section open/close state commit eca133426623f3691068926dc0b7bba11d72be85 Author: Akshay Gupta Date: Tue May 21 16:52:47 2024 +0530 Remember token section open/close state commit cb7d4409e247b2a513971d229af74fcd4fae5d93 Merge: a1f09d69b 9b13444c4 Author: Akshay Gupta Date: Tue May 21 13:28:34 2024 +0530 Merge pull request #116 from tokens-studio/spacing-token-layout-update spacing token to update only row or column gap as per flex direction commit a1f09d69b0566c03ef8547c89a6806a2a0226985 Merge: 162e7b6c5 344a27602 Author: Akshay Gupta Date: Tue May 21 13:27:42 2024 +0530 Merge pull request #117 from tokens-studio/sort-tokens-by-insert-order sort tokens by insert order commit 344a27602b627dbe40d14d535e1fc18a0c793859 Author: Akshay Gupta Date: Mon May 20 22:25:46 2024 +0530 sort tokens by insert order commit 9b13444c44e41e72a67bed3e1d9ebe47f924248d Author: Akshay Gupta Date: Mon May 20 21:59:28 2024 +0530 spacing token to update only row or column gap as per flex direction commit 162e7b6c58226b32cbc1a495a308c39b175812f6 Merge: 90ab485e7 5954a8698 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 20 12:59:50 2024 +0200 Merge branch 'token-studio-develop' of github.com:tokens-studio/tokens-studio-for-penpot into feat/port-tracking-and-smoke commit 90ab485e78f1ba64f37ca9022254b7ca2bca6810 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 20 12:56:43 2024 +0200 Needs depend on smoke commit 5954a8698bcbce6023bab0e5c816b28fbb106a85 Merge: ec36e06b7 851054c61 Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Mon May 20 12:45:42 2024 +0200 Merge pull request #114 from tokens-studio/feat/port-tracking-and-smoke Add port label tracking and add a smoke test commit 851054c617a804f591e40e0468265394a778e410 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 20 12:11:29 2024 +0200 Add port label tracking and add a smoke test commit ec36e06b7b8a5b910617cd8cfec8244aefbd27ff Merge: 0bd3b0598 3caa9d780 Author: Florian Schrödl Date: Fri May 17 14:59:28 2024 +0200 Merge pull request #113 from tokens-studio/108-custom-editable-select-for-token-completion Custom editable select for token completion commit 3caa9d780ae132dc9abc6fb0b09597bfe6c76c95 Author: Florian Schroedl Date: Fri May 17 11:37:36 2024 +0200 Show checkmark icon for applied tokens commit ad26d9e2d36b9c262377c8bc88e5cdad7672c483 Author: Florian Schroedl Date: Fri May 17 10:55:24 2024 +0200 More styling commit 85a40d19ed2fe0d85059ebd46889f0773badb60f Author: Florian Schroedl Date: Fri May 17 10:26:32 2024 +0200 Extract component commit b61a59d3757558c1140a1d97840d32942f04b33d Author: Florian Schroedl Date: Fri May 17 10:16:01 2024 +0200 Extract key down handler commit ced325e0090aa1b4b18177c8e94ca1e844ad57f2 Author: Florian Schroedl Date: Fri May 17 10:15:22 2024 +0200 Return selected item map instead of value [*] [*] Multiple tokens could have the same value commit e69bfb8c544dd41713b3e1ba131f0aea72d93fad Author: Florian Schroedl Date: Fri May 17 09:05:18 2024 +0200 Style select commit 8dd2ba7d7800fbec75d7930d797c9c13192e472a Author: Florian Schroedl Date: Fri May 17 09:04:50 2024 +0200 Fix naming commit cb980ace44d97c2b11f2ba0f39d23d744558e0ad Author: Florian Schroedl Date: Fri May 17 09:04:35 2024 +0200 Use regular map for options commit 165e222117faa746108b4a1fff0962527aed950c Author: Florian Schroedl Date: Fri May 17 08:17:51 2024 +0200 Only show dropdown when options contain items commit b0dcbae3ac1c86473183ab76be1121e31783dd95 Author: Florian Schroedl Date: Fri May 17 08:13:55 2024 +0200 Fix border clipping commit 6a8887d9ccf862beeac087b0096fc9323512a814 Author: Florian Schroedl Date: Fri May 17 08:04:23 2024 +0200 Remove text transform commit d2107e7f69a8be042cf1f59275d1568558d6f5e5 Author: Florian Schroedl Date: Fri May 17 08:02:06 2024 +0200 Fix width of drop down commit 91271b9e41eb20d10032f29b2ab6192430096875 Author: Florian Schroedl Date: Fri May 17 07:57:55 2024 +0200 Custom editable-select commit 0bd3b0598bef4d0dbd3d9c4455aa139dd69da2a9 Merge: 23ee54b4b a3d4d6226 Author: Florian Schroedl Date: Thu May 16 18:43:05 2024 +0200 Merge remote-tracking branch 'penpot/develop' into token-studio-develop commit 23ee54b4b7c2669a4ae5d4057a0c0695b6638ad7 Merge: bde2b4b3a c654766f8 Author: Florian Schrödl Date: Thu May 16 18:37:46 2024 +0200 Merge pull request #111 from tokens-studio/71-apply-token-from-the-shapes-panel-right-side Apply border radius token from the shapes panel commit bde2b4b3a5b719a666226ebe02c8745eaf5b7449 Merge: 3e7a42213 c44ac862f Author: Akshay Gupta Date: Thu May 16 17:15:59 2024 +0530 Merge pull request #110 from tokens-studio/duplicate-token add functionality to duplicate token from context menu commit c44ac862f019c70e40e74619cbcccbf43741b08c Author: Akshay Gupta Date: Thu May 16 15:48:39 2024 +0530 simplify duplicate token function commit c654766f87563ddcac7ce3c9330b9841e08fc357 Author: Florian Schroedl Date: Thu May 16 11:43:37 2024 +0200 Cleanup outdated props commit 5205b684e9dde4582dd5b99ea67710a6e0af4a56 Author: Florian Schroedl Date: Thu May 16 11:36:08 2024 +0200 Fix token not being applied commit e1ae3d55afb5b159c9527f395b075c64908337fb Author: Akshay Gupta Date: Thu May 16 14:08:11 2024 +0530 ad functionality to duplicate token from context menu commit 23bee8415a69355135a57eb80a609ff672ce557a Author: Florian Schroedl Date: Thu May 16 09:59:55 2024 +0200 Fix missing dependency commit 48c85d72002a1a2023c1774c13c3a2075c585b55 Author: Florian Schroedl Date: Thu May 16 09:55:57 2024 +0200 Simplify token application commit 0d154679e9f6dc52c13518a63c148cd1efa4b967 Author: Florian Schroedl Date: Thu May 16 09:44:11 2024 +0200 Add docstrings commit c60c5ac34fb971bfb8deffb29b17349cfec0b9b1 Author: Florian Schroedl Date: Thu May 16 09:33:20 2024 +0200 Apply tokens directly to shape commit cdca00a986ca154e99f05a2ec771e7f35a3d2736 Author: Florian Schroedl Date: Thu May 16 09:02:48 2024 +0200 Extract token apply function commit 4e3af1407dec0429c9f68af807e7327e02251249 Author: Florian Schroedl Date: Wed May 15 18:28:04 2024 +0200 Fix styling of dropdown items? commit 9a58188dc3895ed44ec8a3bc5e5ae78656ec7095 Author: Florian Schroedl Date: Wed May 15 18:20:47 2024 +0200 Show border-radius tokens as options commit d9dbaad281558b7b56cba37655f3c0af462f002c Author: Florian Schroedl Date: Wed May 15 18:20:28 2024 +0200 Add tokens map generators commit 5e301605ade4bb9c80b3a4942030928424c47866 Author: Florian Schroedl Date: Wed May 15 17:44:06 2024 +0200 Extract token grouping to core commit 622843f18d1bfa2f056e56805203b580f5917cee Author: Florian Schroedl Date: Wed May 15 17:43:49 2024 +0200 Take tokens as ref commit 8f852bf48fb658819f067c9411377930f99a8592 Author: Florian Schroedl Date: Wed May 15 17:26:10 2024 +0200 Use :as commit 3e7a422136b6366e7354991079f294939ffc1aac Merge: f8972efea 591e33340 Author: Florian Schrödl Date: Wed May 15 17:14:41 2024 +0200 Merge pull request #104 from tokens-studio/fix-sizing-dimensions-mixup Fix sizing/dimensions token mixup commit 591e3334006b7c7bcb6ed5a3642efd0f5e427032 Author: Florian Schroedl Date: Wed May 15 15:40:07 2024 +0200 Fix sizing/dimensions token mixup commit f8972efea0542238a9cbcdaa191fa7589fec3453 Merge: d4dd49bdb d69cca2d9 Author: Akshay Gupta Date: Wed May 15 18:56:42 2024 +0530 Merge pull request #103 from tokens-studio/simple-context-menu fix delimiter mismatch and add missing data/tokens package commit d69cca2d9c6b017e57ac2a832f7c42fa04b213b4 Author: Akshay Gupta Date: Wed May 15 18:50:30 2024 +0530 fix delimiter mismatch and add missing data/tokens package commit d4dd49bdb7ca4065c9fbce664d5beb491b05bedf Merge: 157bb01e8 ec5a11731 Author: Akshay Gupta Date: Wed May 15 18:31:13 2024 +0530 Merge pull request #97 from tokens-studio/simple-context-menu Simple context menu commit ec5a11731883e53c0b6835109ba406bb452fecc4 Merge: d3d454a43 157bb01e8 Author: Akshay Gupta Date: Wed May 15 18:30:53 2024 +0530 Merge branch 'token-studio-develop' into simple-context-menu commit d3d454a43c1f2428dfac73b866e49b07333e4239 Author: Akshay Gupta Date: Wed May 15 14:50:24 2024 +0530 move delete token to tokens actions section commit 5fa2048b234a0d0c119bfcc52563087d0c9d62b4 Author: Akshay Gupta Date: Wed May 15 14:40:46 2024 +0530 re-use workspace context menu entry and fix double nested ul commit 316db61c8a12378fc071847df0075c4d8d2a131a Author: Akshay Gupta Date: Wed May 15 13:23:47 2024 +0530 remove warning modal when deletion of a token commit fcd7a35b466b62077dcb69dc315ad75951ccbd1c Author: Akshay Gupta Date: Wed May 15 12:59:18 2024 +0530 move context menu functions to data/tokens commit 157bb01e8f14b898ab7cbc2d19dadb3d2faafc95 Merge: b9e9f9fb1 584ac6341 Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Tue May 14 16:39:16 2024 +0200 Merge pull request #99 from tokens-studio/fix/containerization Downtune replica amount. Cleanup redis host commit 584ac6341d8462e422e4364f2c3385d75123b78f Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Tue May 14 16:37:16 2024 +0200 Downtune replica amount. Cleanup redis host commit b9e9f9fb138b78e164a6380072eeb07311275b1f Merge: d67311b12 4d14d78ee Author: Florian Schrödl Date: Tue May 14 16:27:19 2024 +0200 Merge pull request #98 from tokens-studio/icons-spacing Add more space between icon and label, fix icon offset commit 4d14d78eed1c81d92453a94c3936345686edcbe4 Author: Florian Schroedl Date: Tue May 14 16:01:11 2024 +0200 Add more space between icon and label, fix icon offset commit d67311b12662d3fe44c5f4822e498526dc270748 Merge: 230b271be e6f86cda6 Author: Florian Schrödl Date: Tue May 14 15:26:01 2024 +0200 Merge pull request #96 from tokens-studio/95-placeholder-icons Add token placeholder icons commit 8cb9d9c3523139733b494c8744c9ded1987685a5 Author: Akshay Gupta Date: Tue May 14 18:48:48 2024 +0530 Add delete token functionality in context menu commit 31b487ed869cd5532abcad49ebed4cd628b9cf4b Author: Akshay Gupta Date: Tue May 14 18:25:08 2024 +0530 remoev translation function commit 24f1693684fcf74693d94b6dba61e3c61e24c57a Author: Akshay Gupta Date: Tue May 14 18:10:13 2024 +0530 Add Context Menu for tokens and simple placeholder functions commit e6f86cda643cc0c04b34eda95d4b0fd3179bd00c Author: Florian Schroedl Date: Tue May 14 14:24:36 2024 +0200 Add token placeholder icons commit 230b271be3a9e0c0a83549c4a88745d951d3271d Merge: 740024061 677b28218 Author: Florian Schroedl Date: Tue May 14 12:00:45 2024 +0200 Merge remote-tracking branch 'penpot/develop' into token-studio-develop commit 74002406169172fde7bf84a69d08659ffb337f04 Merge: 550045cb3 aa8b1f4c7 Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Mon May 13 16:42:34 2024 +0200 Merge pull request #94 from tokens-studio/fix/containerization Chart does auto inject the release name commit aa8b1f4c737501de6c5190e10477f8dcbc759edc Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 13 16:41:51 2024 +0200 Chart does auto inject the release name commit 550045cb3b5dda2d1ece5fdc39b2f3494a25c478 Merge: 50f69936a 60207fd01 Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Mon May 13 16:21:37 2024 +0200 Merge pull request #93 from tokens-studio/fix/containerization Circumvent bug commit 60207fd01ecbdc1836cf46a2287137de5e8ff82f Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 13 16:21:01 2024 +0200 Circumvent bug commit 50f69936a47429223df784fd5cba309de9d2b1a6 Merge: d90755531 f9d4b9f69 Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Mon May 13 16:10:32 2024 +0200 Merge pull request #92 from tokens-studio/fix/containerization Add missing secretName commit f9d4b9f6995cd8d54b2806e8b2f53d4b21e1cca7 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 13 16:09:56 2024 +0200 Add missing secretName commit d907555314d53427d04caaa493903487835019fa Merge: d3c0abc11 e50a46409 Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Mon May 13 15:32:21 2024 +0200 Merge pull request #90 from tokens-studio/fix/containerization Add redis. Ingress should be under front end for some reason commit e50a46409f24ee8ad7c7d3fd5ec24add4c4e99ea Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 13 15:31:03 2024 +0200 Add redis. Ingress should be under front end for some reason commit d3c0abc11a7a920cd53655a58107049ced4bb1e1 Merge: 64dc685f2 98d7895e2 Author: Florian Schrödl Date: Mon May 13 15:09:48 2024 +0200 Merge pull request #85 from tokens-studio/84-border-width Stroke Width commit 64dc685f2a75eb0e897e7ef6546251a874c4c51c Merge: 071df4074 79ce39612 Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Mon May 13 15:07:23 2024 +0200 Merge pull request #89 from tokens-studio/fix/containerization Fix pull secrets needed to be a reference commit 79ce396122b6bc97a5b604bf69675b42a0bbf377 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 13 15:06:22 2024 +0200 Fix pull secrets needed to be a reference commit 071df4074f75aae37be0e58fdc795128f6037a1b Merge: 309abec88 0ce5c165d Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Mon May 13 14:43:15 2024 +0200 Merge pull request #88 from tokens-studio/fix/containerization Update secrets commit 0ce5c165dbe4a3545fb13f8de5104511c04cf50f Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 13 14:41:58 2024 +0200 Update secrets commit 309abec88a53e3288f1d0eb9c901dbc816b4eac9 Merge: 425155153 10aaa966f Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Mon May 13 14:26:44 2024 +0200 Merge pull request #87 from tokens-studio/fix/containerization Change deploy to use alternate chart as truecharts using a weird helm… commit 10aaa966f9fbf6d57622877e4fa96ea4566f35bc Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 13 14:25:07 2024 +0200 Change deploy to use alternate chart as truecharts using a weird helm dependency commit 98d7895e2a0a4803a1547df6cc6f85c1fc87e901 Author: Florian Schroedl Date: Mon May 13 11:23:30 2024 +0200 Add stroke-width token commit 4251551535a27520b399f9a17fb75488872b90b6 Merge: eafd4f01e ae263363e Author: Florian Schrödl Date: Fri May 10 17:36:50 2024 +0200 Merge pull request #83 from tokens-studio/82-opacity Add opacity commit eafd4f01eba92aa7430c329dc764f2579bf73a58 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Fri May 10 14:34:05 2024 +0200 Use raw manifests commit 153ea95a55d82044d096b036bb22c1da88897834 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Fri May 10 14:02:34 2024 +0200 Typo commit 16c893fa60f5e417e4b1f5cc7e938f2e2b7962d8 Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Fri May 10 14:01:08 2024 +0200 Add matrix for docker build commit 0e94c9851a96e7829a4f5b5654a0aa410424157f Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Fri May 10 13:59:09 2024 +0200 Move workflow file commit 07583b5e34a0787b624364edd7a07cab89f5ba8b Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Fri May 10 13:57:17 2024 +0200 Add deployment config commit ae263363ed8d9232e034f1577e9bdd7b2bed19dc Author: Akshay Gupta Date: Thu May 9 21:36:38 2024 +0530 Add opacity commit 4e3ee7bdab9a8a1a90cff298d1b4d7ddc3f07a29 Merge: 5efcb0f42 42b25479b Author: Florian Schrödl Date: Fri May 10 12:05:06 2024 +0200 Merge pull request #81 from tokens-studio/value-resolve Value resolve commit 42b25479b34810633ed2ba922bdcd52bd6919e6d Author: Florian Schroedl Date: Fri May 10 10:36:56 2024 +0200 Highlight invalid token values commit 5813acea02f09ab9adb5566899181a5b06d6e809 Author: Florian Schroedl Date: Fri May 10 10:26:22 2024 +0200 Log whole token commit df48295903b67d171ad471dde4f7c194d99f349e Author: Florian Schroedl Date: Fri May 10 10:22:09 2024 +0200 Add resolving function and move to core ns commit 5efcb0f4246e1561dc831c4c64c62c61d7272013 Merge: 2ed4ece23 6d5beb758 Author: Akshay Gupta Date: Fri May 10 12:25:23 2024 +0530 Merge pull request #78 from tokens-studio/fix-assets-panel-view Fix assets panel tab view commit 2ed4ece23d68da16a8e14620a83ef6008855b434 Merge: d81b1f328 9a243e3b4 Author: Akshay Gupta Date: Fri May 10 12:22:03 2024 +0530 Merge pull request #76 from tokens-studio/token-pills-wrap Add flex wrap to token pills wrapper commit d81b1f328dacdd972209f4c92fba644e7a8ca66c Merge: 68a201374 0c856702c Author: Akshay Gupta Date: Fri May 10 12:21:38 2024 +0530 Merge pull request #80 from tokens-studio/add-spacing-function Add simple token spacing application commit 0c856702c684e5ccb1caf071fde06a14f6260e6a Author: Florian Schroedl Date: Fri May 10 08:36:40 2024 +0200 Remove unneeded import commit 76a38bcb0c7810333fdc14833cc462e7909e330e Author: Akshay Gupta Date: Thu May 9 21:36:38 2024 +0530 Add simple token spacing application commit 6d5beb75831df00883515d3d82845e44ed266518 Author: Akshay Gupta Date: Thu May 9 18:42:33 2024 +0530 Fix assets panel tab view commit 9a243e3b4fda8a3eb41eb6f680fd07b154a3c54a Author: Akshay Gupta Date: Thu May 9 17:51:48 2024 +0530 Add flex wrap to token pills wrapper commit 68a201374cd9665519ab803e25850158ead2cc5c Merge: 11d4496e9 69ed15e78 Author: Florian Schrödl Date: Wed May 8 14:29:15 2024 +0200 Merge pull request #74 from tokens-studio/70-sort-sections-by-tokens Sort token groups commit 11d4496e9a16aed344ae4d0421f4422e01f1f8ab Merge: 6fa1d6eec fd3922936 Author: Florian Schrödl Date: Wed May 8 14:29:02 2024 +0200 Merge pull request #68 from tokens-studio/65-dimensions Dimensions Token commit 6fa1d6eeccaaf0501671ad02a69bd0ded30ff30a Merge: 6bb4eec80 3d13015e3 Author: Akshay Gupta Date: Wed May 8 17:52:33 2024 +0530 Merge pull request #66 from tokens-studio/close-token-modal add ability to close modal once save token button is clicked commit 69ed15e7891f8bb9b0e6ffefbddd4bd5d529b475 Author: Florian Schroedl Date: Thu Apr 25 19:00:00 2024 +0200 Remove search bar commit e5a7f87d1c47060bbf40dbec091511391c31a2ae Author: Florian Schroedl Date: Thu Apr 25 19:00:00 2024 +0200 Sort token groups commit fd392293676b12c4b4d7f9c8e39063dacaa877af Author: Florian Schroedl Date: Thu Apr 25 19:00:00 2024 +0200 Add shape dimensions updating commit a9aac4c8672207ca1d99af318c0f5eb0918348f0 Author: Florian Schroedl Date: Thu Apr 25 19:00:00 2024 +0200 Move emit to the shape update function [*] [*] A shape update might need multiple emit functions commit 3d13015e303980c70b3058fa421324b463244c78 Author: Akshay Gupta Date: Wed May 8 15:16:11 2024 +0530 add ability to close modal once save token button is clicked commit 28e6db9bb4cd4a86bc6c3a3e16aaa857d385ad73 Author: Florian Schroedl Date: Thu Apr 25 19:00:00 2024 +0200 Reuse attribute keys from token schema commit 6bb4eec8052438baffa78b76165b2cf7f0362db7 Author: Florian Schroedl Date: Thu Apr 25 19:00:00 2024 +0200 Remove unneeded on-apply prop commit 76f42a0aecf0ddd494a02d81a76c6f907cd76411 Author: Florian Schroedl Date: Thu Apr 25 19:00:00 2024 +0200 Cleanup on-apply-token function commit f71ce60b1100903464bdba0511b715e08f926618 Merge: e5c564041 e7b065ac6 Author: Florian Schroedl Date: Tue May 7 14:39:33 2024 +0200 Merge remote-tracking branch 'penpot/develop' into token-studio-develop commit e5c5640413a05a68378f076a827e67fbea2dbb79 Author: Florian Schroedl Date: Thu Apr 25 19:00:00 2024 +0200 Start tokens studio plugin base --- common/src/app/common/files/changes.cljc | 15 +- .../src/app/common/files/changes_builder.cljc | 8 + common/src/app/common/logic/libraries.cljc | 94 +++- common/src/app/common/logic/shapes.cljc | 35 +- common/src/app/common/logic/tokens.cljc | 42 ++ common/src/app/common/test_helpers/files.cljc | 6 + .../src/app/common/test_helpers/tokens.cljc | 93 ++++ common/src/app/common/types/component.cljc | 8 + common/src/app/common/types/container.cljc | 31 +- common/src/app/common/types/token.cljc | 67 +++ common/src/app/common/types/tokens_lib.cljc | 228 ++++++++-- common/src/app/common/types/tokens_list.cljc | 49 -- .../app/common/types/tokens_theme_list.cljc | 79 ---- .../common_tests/logic/comp_sync_test.cljc | 6 +- .../common_tests/logic/token_apply_test.cljc | 202 +++++++++ .../test/common_tests/logic/token_test.cljc | 117 +++++ .../types/data/tokens-multi-set-example.json | 9 +- .../common_tests/types/tokens_lib_test.cljc | 82 +++- frontend/package.json | 2 +- .../playwright/data/get-teams-tokens.json | 26 ++ .../data/workspace/get-team-tokens.json | 24 + frontend/playwright/ui/pages/WorkspacePage.js | 6 + frontend/playwright/ui/specs/tokens.spec.js | 145 ++++++ .../resources/images/icons/broken-link.svg | 3 + .../resources/images/icons/import-export.svg | 3 + .../images/icons/token-status-full.svg | 8 + .../images/icons/token-status-non-applied.svg | 8 + .../images/icons/token-status-partial.svg | 8 + .../styles/common/refactor/spacing.scss | 1 + frontend/src/app/main/data/tokens.cljs | 101 ++--- .../src/app/main/data/workspace/colors.cljs | 256 ++++++----- .../app/main/data/workspace/libraries.cljs | 1 - .../app/main/data/workspace/modifiers.cljs | 7 +- .../app/main/data/workspace/shape_layout.cljs | 62 +-- .../src/app/main/data/workspace/texts.cljs | 75 +-- .../app/main/data/workspace/transforms.cljs | 47 +- frontend/src/app/main/refs.cljs | 12 +- .../src/app/main/ui/components/select.cljs | 5 + frontend/src/app/main/ui/ds.cljs | 3 + .../src/app/main/ui/ds/buttons/button.cljs | 8 +- frontend/src/app/main/ui/ds/colors.scss | 23 + .../src/app/main/ui/ds/controls/input.cljs | 3 +- .../main/ui/ds/foundations/assets/icon.cljs | 2 + .../utilities/token/token_status.cljs | 28 ++ .../utilities/token/token_status.mdx | 31 ++ .../utilities/token/token_status.scss | 10 + .../utilities/token/token_status.stories.jsx | 23 + .../src/app/main/ui/ds/utilities/swatch.cljs | 118 ++--- .../src/app/main/ui/ds/utilities/swatch.mdx | 53 +-- .../main/ui/ds/utilities/swatch.stories.jsx | 70 +-- .../ui/workspace/sidebar/assets/common.cljs | 28 +- .../ui/workspace/sidebar/assets/common.scss | 2 +- .../sidebar/options/menus/border_radius.cljs | 23 +- .../sidebar/options/menus/measures.cljs | 1 - .../app/main/ui/workspace/tokens/changes.cljs | 60 ++- .../app/main/ui/workspace/tokens/common.scss | 16 + .../ui/workspace/tokens/context_menu.cljs | 160 +++++-- .../ui/workspace/tokens/context_menu.scss | 94 ++-- .../app/main/ui/workspace/tokens/form.cljs | 45 +- .../app/main/ui/workspace/tokens/modals.cljs | 7 +- .../ui/workspace/tokens/modals/themes.cljs | 86 ++-- .../ui/workspace/tokens/modals/themes.scss | 23 +- .../app/main/ui/workspace/tokens/sets.cljs | 218 ++++++--- .../app/main/ui/workspace/tokens/sets.scss | 8 + .../workspace/tokens/sets_context_menu.cljs | 11 +- .../app/main/ui/workspace/tokens/sidebar.cljs | 171 ++++--- .../app/main/ui/workspace/tokens/sidebar.scss | 48 +- .../ui/workspace/tokens/style_dictionary.cljs | 6 +- .../app/main/ui/workspace/tokens/token.cljs | 4 +- .../main/ui/workspace/tokens/token_pill.cljs | 59 +++ .../main/ui/workspace/tokens/token_pill.scss | 106 +++++ .../main/ui/workspace/tokens/token_set.cljs | 12 +- .../main/ui/workspace/tokens/token_types.cljs | 5 +- .../app/main/ui/workspace/tokens/update.cljs | 14 +- frontend/src/app/util/dom.cljs | 6 + frontend/src/app/worker.cljs | 1 - .../frontend_tests/basic_shapes_test.cljs | 2 +- .../test/frontend_tests/helpers/state.cljs | 2 +- .../logic/components_and_tokens.cljs | 426 ++++++++++++++++++ frontend/test/frontend_tests/runner.cljs | 2 + .../frontend_tests/tokens/helpers/tokens.cljs | 5 - .../tokens/logic/token_actions_test.cljs | 32 ++ frontend/translations/en.po | 208 ++++++++- frontend/translations/es.po | 219 ++++++++- frontend/yarn.lock | 10 +- run-ci.sh | 50 ++ 86 files changed, 3463 insertions(+), 1050 deletions(-) create mode 100644 common/src/app/common/logic/tokens.cljc create mode 100644 common/src/app/common/test_helpers/tokens.cljc delete mode 100644 common/src/app/common/types/tokens_list.cljc delete mode 100644 common/src/app/common/types/tokens_theme_list.cljc create mode 100644 common/test/common_tests/logic/token_apply_test.cljc create mode 100644 common/test/common_tests/logic/token_test.cljc create mode 100644 frontend/playwright/data/get-teams-tokens.json create mode 100644 frontend/playwright/data/workspace/get-team-tokens.json create mode 100644 frontend/playwright/ui/specs/tokens.spec.js create mode 100644 frontend/resources/images/icons/broken-link.svg create mode 100644 frontend/resources/images/icons/import-export.svg create mode 100644 frontend/resources/images/icons/token-status-full.svg create mode 100644 frontend/resources/images/icons/token-status-non-applied.svg create mode 100644 frontend/resources/images/icons/token-status-partial.svg create mode 100644 frontend/src/app/main/ui/ds/foundations/utilities/token/token_status.cljs create mode 100644 frontend/src/app/main/ui/ds/foundations/utilities/token/token_status.mdx create mode 100644 frontend/src/app/main/ui/ds/foundations/utilities/token/token_status.scss create mode 100644 frontend/src/app/main/ui/ds/foundations/utilities/token/token_status.stories.jsx create mode 100644 frontend/src/app/main/ui/workspace/tokens/token_pill.cljs create mode 100644 frontend/src/app/main/ui/workspace/tokens/token_pill.scss create mode 100644 frontend/test/frontend_tests/logic/components_and_tokens.cljs create mode 100755 run-ci.sh diff --git a/common/src/app/common/files/changes.cljc b/common/src/app/common/files/changes.cljc index 45195c48d..2adf6b559 100644 --- a/common/src/app/common/files/changes.cljc +++ b/common/src/app/common/files/changes.cljc @@ -415,6 +415,12 @@ [:type [:= :add-token-sets]] [:token-sets [:sequential ::ctot/token-set]]]] + [:rename-token-set-group + [:map {:title "RenameTokenSetGroup"} + [:type [:= :rename-token-set-group]] + [:from-path-str :string] + [:to-path-str :string]]] + [:mod-token-set [:map {:title "ModTokenSetChange"} [:type [:= :mod-token-set]] @@ -1063,6 +1069,13 @@ (ctob/ensure-tokens-lib) (ctob/add-sets (map ctob/make-token-set token-sets))))) +(defmethod process-change :rename-token-set-group + [data {:keys [from-path-str to-path-str]}] + (update data :tokens-lib (fn [lib] + (-> lib + (ctob/ensure-tokens-lib) + (ctob/rename-set-group from-path-str to-path-str))))) + (defmethod process-change :mod-token-set [data {:keys [name token-set]}] (update data :tokens-lib (fn [lib] @@ -1153,7 +1166,7 @@ ; We need to trigger a sync if the shape has changed any ; attribute that participates in components synchronization. (and (= (:type operation) :set) - (get ctk/sync-attrs (:attr operation)))) + (ctk/component-attr? (:attr operation)))) any-sync? (some need-sync? operations)] (when any-sync? (if page-id diff --git a/common/src/app/common/files/changes_builder.cljc b/common/src/app/common/files/changes_builder.cljc index 6e6ead182..9ad9d0b28 100644 --- a/common/src/app/common/files/changes_builder.cljc +++ b/common/src/app/common/files/changes_builder.cljc @@ -812,6 +812,14 @@ (update :undo-changes conj {:type :del-token-set :name (:name token-set)}) (apply-changes-local))) +(defn rename-token-set-group + [changes from-path-str to-path-str] + (-> changes + (update :redo-changes conj {:type :rename-token-set-group :from-path-str from-path-str :to-path-str to-path-str}) + ;; TODO: Figure out undo + #_(update :undo-changes conj {:type :rename-token-set-group :name (:name token-set) :token-set (or prev-token-set token-set)}) + (apply-changes-local))) + (defn update-token-set [changes token-set prev-token-set] (-> changes diff --git a/common/src/app/common/logic/libraries.cljc b/common/src/app/common/logic/libraries.cljc index bc9ab68b0..98db43816 100644 --- a/common/src/app/common/logic/libraries.cljc +++ b/common/src/app/common/logic/libraries.cljc @@ -27,6 +27,7 @@ [app.common.types.shape-tree :as ctst] [app.common.types.shape.interactions :as ctsi] [app.common.types.shape.layout :as ctl] + [app.common.types.token :as cto] [app.common.types.typography :as cty] [app.common.uuid :as uuid] [clojure.set :as set] @@ -1479,6 +1480,44 @@ [{:type :set-remote-synced :remote-synced (:remote-synced shape)}]})))))) +(defn- update-tokens + "Token synchronization algorithm. Copy the applied tokens that have changed + in the origin shape to the dest shape (applying or removing as necessary). + + Only the given token attributes are synced." + [changes container dest-shape orig-shape token-attrs] + (let [orig-tokens (get orig-shape :applied-tokens {}) + dest-tokens (get dest-shape :applied-tokens {}) + dest-tokens' (reduce (fn [dest-tokens' token-attr] + (let [orig-token (get orig-tokens token-attr) + dest-token (get dest-tokens token-attr)] + (if (= orig-token dest-token) + dest-tokens' + (if (nil? orig-token) + (dissoc dest-tokens' token-attr) + (assoc dest-tokens' token-attr orig-token))))) + dest-tokens + token-attrs)] + (if (= dest-tokens dest-tokens') + changes + (-> changes + (update :redo-changes conj (make-change + container + {:type :mod-obj + :id (:id dest-shape) + :operations [{:type :set + :attr :applied-tokens + :val dest-tokens' + :ignore-touched true}]})) + (update :undo-changes conj (make-change + container + {:type :mod-obj + :id (:id dest-shape) + :operations [{:type :set + :attr :applied-tokens + :val dest-tokens + :ignore-touched true}]})))))) + (defn- update-attrs "The main function that implements the attribute sync algorithm. Copy attributes that have changed in the origin shape to the dest shape. @@ -1511,37 +1550,41 @@ (loop [attrs (->> (seq (keys ctk/sync-attrs)) ;; We don't update the flex-child attrs (remove ctk/swap-keep-attrs) - ;; We don't do automatic update of the `layout-grid-cells` property. (remove #(= :layout-grid-cells %))) + applied-tokens #{} roperations [] uoperations '()] (let [attr (first attrs)] (if (nil? attr) - (if (empty? roperations) + (if (and (empty? roperations) (empty? applied-tokens)) changes (let [all-parents (cfh/get-parent-ids (:objects container) (:id dest-shape))] - (-> changes - (update :redo-changes conj (make-change - container - {:type :mod-obj - :id (:id dest-shape) - :operations roperations})) - (update :redo-changes conj (make-change - container - {:type :reg-objects - :shapes all-parents})) - (update :undo-changes conj (make-change - container - {:type :mod-obj - :id (:id dest-shape) - :operations (vec uoperations)})) - (update :undo-changes concat [(make-change - container - {:type :reg-objects - :shapes all-parents})])))) + (cond-> changes + (seq roperations) + (-> (update :redo-changes conj (make-change + container + {:type :mod-obj + :id (:id dest-shape) + :operations roperations})) + (update :redo-changes conj (make-change + container + {:type :reg-objects + :shapes all-parents})) + (update :undo-changes conj (make-change + container + {:type :mod-obj + :id (:id dest-shape) + :operations (vec uoperations)})) + (update :undo-changes concat [(make-change + container + {:type :reg-objects + :shapes all-parents})])) + (seq applied-tokens) + (update-tokens container dest-shape origin-shape applied-tokens)))) + (let [;; position-data is a special case because can be affected by :geometry-group and :content-group ;; so, if the position-data changes but the geometry is touched we need to reset the position-data ;; so it's calculated again @@ -1564,14 +1607,21 @@ :val (get dest-shape attr) :ignore-touched true} - attr-group (get ctk/sync-attrs attr)] + attr-group (get ctk/sync-attrs attr) + token-attrs (cto/shape-attr->token-attrs attr) + applied-tokens' (cond-> applied-tokens + (not (and (touched attr-group) + omit-touched?)) + (into token-attrs))] (if (or (= (get origin-shape attr) (get dest-shape attr)) (and (touched attr-group) omit-touched?)) (recur (next attrs) + applied-tokens' roperations uoperations) (recur (next attrs) + applied-tokens' (conj roperations roperation) (conj uoperations uoperation))))))))) diff --git a/common/src/app/common/logic/shapes.cljc b/common/src/app/common/logic/shapes.cljc index 2d9dd4464..e1e31ed30 100644 --- a/common/src/app/common/logic/shapes.cljc +++ b/common/src/app/common/logic/shapes.cljc @@ -14,8 +14,35 @@ [app.common.types.container :as ctn] [app.common.types.shape.interactions :as ctsi] [app.common.types.shape.layout :as ctl] + [app.common.types.token :as cto] [app.common.uuid :as uuid])) +(defn- generate-unapply-tokens + "When updating attributes that have a token applied, we must unapply it, because the value + of the attribute now has been given directly, and does not come from the token." + [changes objects] + (let [mod-obj-changes (->> (:redo-changes changes) + (filter #(= (:type %) :mod-obj))) + + check-attr (fn [shape changes attr] + (let [tokens (get shape :applied-tokens {}) + token-attrs (cto/shape-attr->token-attrs attr)] + (if (some #(contains? tokens %) token-attrs) + (pcb/update-shapes changes [(:id shape)] #(cto/unapply-token-id % token-attrs)) + changes))) + + check-shape (fn [changes mod-obj-change] + (let [shape (get objects (:id mod-obj-change)) + xf (comp (filter #(= (:type %) :set)) + (map :attr)) + attrs (into [] xf (:operations mod-obj-change))] + (reduce (partial check-attr shape) + changes + attrs)))] + (reduce check-shape + changes + mod-obj-changes))) + (defn generate-update-shapes [changes ids update-fn objects {:keys [attrs ignore-tree ignore-touched with-objects?]}] (let [changes (reduce @@ -29,8 +56,12 @@ (pcb/with-objects objects)) ids) grid-ids (->> ids (filter (partial ctl/grid-layout? objects))) - changes (pcb/update-shapes changes grid-ids ctl/assign-cell-positions {:with-objects? true}) - changes (pcb/reorder-grid-children changes ids)] + changes (-> changes + (pcb/update-shapes grid-ids ctl/assign-cell-positions {:with-objects? true}) + (pcb/reorder-grid-children ids) + (cond-> + (not ignore-touched) + (generate-unapply-tokens objects)))] changes)) (defn- generate-update-shape-flags diff --git a/common/src/app/common/logic/tokens.cljc b/common/src/app/common/logic/tokens.cljc new file mode 100644 index 000000000..d1e7a49d8 --- /dev/null +++ b/common/src/app/common/logic/tokens.cljc @@ -0,0 +1,42 @@ +(ns app.common.logic.tokens + (:require + [app.common.files.changes-builder :as pcb] + [app.common.types.tokens-lib :as ctob])) + +(defn generate-update-active-sets + "Copy the active sets from the currently active themes and move them to the hidden token theme and update the theme with `update-hidden-theme-fn`. + + Use this for managing sets active state without having to modify a user created theme (\"no themes selected\" state in the ui)." + [changes tokens-lib update-hidden-theme-fn] + (let [prev-active-token-themes (ctob/get-active-theme-paths tokens-lib) + active-token-set-names (ctob/get-active-themes-set-names tokens-lib) + + prev-hidden-token-theme (ctob/get-hidden-theme tokens-lib) + hidden-token-theme (-> (or (some-> prev-hidden-token-theme (ctob/set-sets active-token-set-names)) + (ctob/make-hidden-token-theme :sets active-token-set-names)) + (update-hidden-theme-fn)) + + changes (-> changes + (pcb/update-active-token-themes #{ctob/hidden-token-theme-path} prev-active-token-themes)) + + changes (if prev-hidden-token-theme + (pcb/update-token-theme changes hidden-token-theme prev-hidden-token-theme) + (pcb/add-token-theme changes hidden-token-theme))] + changes)) + +(defn generate-toggle-token-set + "Toggle a token set at `set-name` in `tokens-lib` without modifying a user theme." + [changes tokens-lib set-name] + (generate-update-active-sets changes tokens-lib #(ctob/toggle-set % set-name))) + +(defn generate-toggle-token-set-group + "Toggle a token set group at `prefixed-set-path-str` in `tokens-lib` without modifying a user theme." + [changes tokens-lib prefixed-set-path-str] + (let [deactivate? (contains? #{:all :partial} (ctob/sets-at-path-all-active? tokens-lib prefixed-set-path-str)) + sets-names (->> (ctob/get-sets-at-prefix-path tokens-lib prefixed-set-path-str) + (map :name) + (into #{})) + update-fn (if deactivate? + #(ctob/disable-sets % sets-names) + #(ctob/enable-sets % sets-names))] + (generate-update-active-sets changes tokens-lib update-fn))) diff --git a/common/src/app/common/test_helpers/files.cljc b/common/src/app/common/test_helpers/files.cljc index 7d384b0ef..d7c18dcd9 100644 --- a/common/src/app/common/test_helpers/files.cljc +++ b/common/src/app/common/test_helpers/files.cljc @@ -58,6 +58,12 @@ (validate-file! file') file')) +(defn apply-undo-changes + [file changes] + (let [file' (ctf/update-file-data file #(cfc/process-changes % (:undo-changes changes) true))] + (validate-file! file') + file')) + ;; ----- Pages (defn sample-page diff --git a/common/src/app/common/test_helpers/tokens.cljc b/common/src/app/common/test_helpers/tokens.cljc new file mode 100644 index 000000000..c344f32b7 --- /dev/null +++ b/common/src/app/common/test_helpers/tokens.cljc @@ -0,0 +1,93 @@ +;; This Source Code Form is subject to the terms of the Mozilla Public +;; License, v. 2.0. If a copy of the MPL was not distributed with this +;; file, You can obtain one at http://mozilla.org/MPL/2.0/. +;; +;; Copyright (c) KALEIDOS INC + +(ns app.common.test-helpers.tokens + (:require + [app.common.test-helpers.files :as thf] + [app.common.test-helpers.shapes :as ths] + [app.common.types.container :as ctn] + [app.common.types.file :as ctf] + [app.common.types.pages-list :as ctpl] + [app.common.types.shape-tree :as ctst] + [app.common.types.token :as cto] + [app.common.types.tokens-lib :as ctob])) + +(defn get-tokens-lib + [file] + (:tokens-lib (ctf/file-data file))) + +(defn add-tokens-lib + [file] + (ctf/update-file-data file #(update % :tokens-lib ctob/ensure-tokens-lib))) + +(defn update-tokens-lib + [file f] + (ctf/update-file-data file #(update % :tokens-lib f))) + +(defn get-token + [file set-name token-name] + (let [tokens-lib (:tokens-lib (:data file))] + (when tokens-lib + (-> tokens-lib + (ctob/get-set set-name) + (ctob/get-token token-name))))) + +(defn- set-stroke-width + [shape stroke-width] + (let [strokes (if (seq (:strokes shape)) + (:strokes shape) + [{:stroke-style :solid + :stroke-alignment :inner + :stroke-width 1 + :stroke-color "#000000" + :stroke-opacity 1}]) + new-strokes (update strokes 0 assoc :stroke-width stroke-width)] + (ctn/set-shape-attr shape :strokes new-strokes {:ignore-touched true}))) + +(defn- set-stroke-color + [shape stroke-color] + (let [strokes (if (seq (:strokes shape)) + (:strokes shape) + [{:stroke-style :solid + :stroke-alignment :inner + :stroke-width 1 + :stroke-color "#000000" + :stroke-opacity 1}]) + new-strokes (update strokes 0 assoc :stroke-color stroke-color)] + (ctn/set-shape-attr shape :strokes new-strokes {:ignore-touched true}))) + +(defn- set-fill-color + [shape fill-color] + (let [fills (if (seq (:fills shape)) + (:fills shape) + [{:fill-color "#000000" + :fill-opacity 1}]) + new-fills (update fills 0 assoc :fill-color fill-color)] + (ctn/set-shape-attr shape :fills new-fills {:ignore-touched true}))) + +(defn apply-token-to-shape + [file shape-label token-name token-attrs shape-attrs resolved-value] + (let [page (thf/current-page file) + shape (ths/get-shape file shape-label) + shape' (as-> shape $ + (cto/apply-token-to-shape {:shape $ + :token {:name token-name} + :attributes token-attrs}) + (reduce (fn [shape attr] + (case attr + :stroke-width (set-stroke-width shape resolved-value) + :stroke-color (set-stroke-color shape resolved-value) + :fill (set-fill-color shape resolved-value) + (ctn/set-shape-attr shape attr resolved-value {:ignore-touched true}))) + $ + shape-attrs))] + + (ctf/update-file-data + file + (fn [file-data] + (ctpl/update-page file-data + (:id page) + #(ctst/set-shape % shape')))))) diff --git a/common/src/app/common/types/component.cljc b/common/src/app/common/types/component.cljc index aec70e7c2..b26461f2b 100644 --- a/common/src/app/common/types/component.cljc +++ b/common/src/app/common/types/component.cljc @@ -138,6 +138,14 @@ :layout-item-z-index :layout-item-align-self}) +(defn component-attr? + "Check if some attribute is one that is involved in component syncrhonization. + Note that design tokens also are involved, although they go by an alternate + route and thus they are not part of :sync-attrs." + [attr] + (or (get sync-attrs attr) + (= :applied-tokens attr))) + (defn instance-root? "Check if this shape is the head of a top instance." [shape] diff --git a/common/src/app/common/types/container.cljc b/common/src/app/common/types/container.cljc index ca0181604..5c5673459 100644 --- a/common/src/app/common/types/container.cljc +++ b/common/src/app/common/types/container.cljc @@ -18,6 +18,7 @@ [app.common.types.plugins :as ctpg] [app.common.types.shape-tree :as ctst] [app.common.types.shape.layout :as ctl] + [app.common.types.token :as ctt] [app.common.uuid :as uuid])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -540,14 +541,28 @@ ;; --- SHAPE UPDATE +(defn- get-token-groups + [shape new-applied-tokens] + (let [old-applied-tokens (d/nilv (:applied-tokens shape) #{}) + changed-token-attrs (filter #(not= (get old-applied-tokens %) (get new-applied-tokens %)) + ctt/all-keys) + changed-groups (into #{} + (comp (map ctt/token-attr->shape-attr) + (map #(get ctk/sync-attrs %)) + (filter some?)) + changed-token-attrs)] + changed-groups)) + (defn set-shape-attr "Assign attribute to shape with touched logic. The returned shape will contain a metadata associated with it indicating if shape is touched or not." [shape attr val & {:keys [ignore-touched ignore-geometry]}] - (let [group (get ctk/sync-attrs attr) - shape-val (get shape attr) + (let [group (get ctk/sync-attrs attr) + token-groups (when (= attr :applied-tokens) + (get-token-groups shape val)) + shape-val (get shape attr) ignore? (or ignore-touched @@ -585,9 +600,15 @@ ;; set the "touched" flag for the group the attribute belongs to. ;; In some cases we need to ignore touched only if the attribute is ;; geometric (position, width or transformation). - (and in-copy? group (not ignore?) (not equal?) - (not (and ignore-geometry is-geometry?))) - (-> (update :touched ctk/set-touched-group group) + (and in-copy? + (or (and group (not equal?)) (seq token-groups)) + (not ignore?) (not (and ignore-geometry is-geometry?))) + (-> (update :touched (fn [touched] + (reduce #(ctk/set-touched-group %1 %2) + touched + (if group + (cons group token-groups) + token-groups)))) (dissoc :remote-synced)) (nil? val) diff --git a/common/src/app/common/types/token.cljc b/common/src/app/common/types/token.cljc index 31f0dd600..7794b45e1 100644 --- a/common/src/app/common/types/token.cljc +++ b/common/src/app/common/types/token.cljc @@ -6,8 +6,10 @@ (ns app.common.types.token (:require + [app.common.data :as d] [app.common.schema :as sm] [app.common.schema.registry :as sr] + [clojure.data :as data] [clojure.set :as set] [malli.util :as mu])) @@ -148,6 +150,15 @@ (def rotation-keys (schema-keys ::rotation)) +(def all-keys (set/union color-keys + border-radius-keys + stroke-width-keys + sizing-keys + opacity-keys + spacing-keys + dimensions-keys + rotation-keys)) + (sm/register! ^{::sm/type ::tokens} [:map {:title "Applied Tokens"}]) @@ -161,3 +172,59 @@ ::spacing ::rotation ::dimensions]) + +(defn shape-attr->token-attrs + [shape-attr] + (cond + (= :fills shape-attr) #{:fill} + (= :strokes shape-attr) #{:stroke-color :stroke-width} + (border-radius-keys shape-attr) #{shape-attr} + (sizing-keys shape-attr) #{shape-attr} + (opacity-keys shape-attr) #{shape-attr} + (spacing-keys shape-attr) #{shape-attr} + (rotation-keys shape-attr) #{shape-attr})) + +(defn token-attr->shape-attr + [token-attr] + (case token-attr + :fill :fills + :stroke-color :strokes + :stroke-width :strokes + token-attr)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; TOKENS IN SHAPES +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defn- toggle-or-apply-token + "Remove any shape attributes from token if they exists. + Othewise apply token attributes." + [shape token] + (let [[shape-leftover token-leftover _matching] (data/diff (:applied-tokens shape) token)] + (merge {} shape-leftover token-leftover))) + +(defn- token-from-attributes [token attributes] + (->> (map (fn [attr] [attr (:name token)]) attributes) + (into {}))) + +(defn- apply-token-to-attributes [{:keys [shape token attributes]}] + (let [token (token-from-attributes token attributes)] + (toggle-or-apply-token shape token))) + +(defn apply-token-to-shape + [{:keys [shape token attributes] :as _props}] + (let [applied-tokens (apply-token-to-attributes {:shape shape + :token token + :attributes attributes})] + (update shape :applied-tokens #(merge % applied-tokens)))) + +(defn maybe-apply-token-to-shape + "When the passed `:token` is non-nil apply it to the `:applied-tokens` on a shape." + [{:keys [shape token _attributes] :as props}] + (if token + (apply-token-to-shape props) + shape)) + +(defn unapply-token-id [shape attributes] + (update shape :applied-tokens d/without-keys attributes)) + diff --git a/common/src/app/common/types/tokens_lib.cljc b/common/src/app/common/types/tokens_lib.cljc index 93148bcf9..76f653351 100644 --- a/common/src/app/common/types/tokens_lib.cljc +++ b/common/src/app/common/types/tokens_lib.cljc @@ -183,8 +183,38 @@ (def set-separator "/") -(defn join-set-path [set-path] - (join-path set-path set-separator)) +(defn join-set-path-str [& args] + (->> (filter some? args) + (str/join set-separator))) + +(defn join-set-path [path] + (join-path path set-separator)) + +(defn split-set-str-path-prefix + "Split set-path + + E.g.: \"S-some-set\" -> [\"S-\" \"some-set\"] + \"G-some-group\" -> [\"G-\" \"some-group\"]" + [path-str] + (some->> path-str + (re-matches #"^([SG]-)(.*)") + (rest))) + +(defn add-set-path-prefix [set-name-str] + (str set-prefix set-name-str)) + +(defn add-set-path-group-prefix [group-path-str] + (str set-group-prefix group-path-str)) + +(defn set-full-path->set-prefixed-full-path + "Returns token-set paths with prefixes to differentiate between sets and set-groups. + + Sets will be prefixed with `set-prefix` (S-). + Set groups will be prefixed with `set-group-prefix` (G-)." + [full-path] + (let [set-path (mapv add-set-path-group-prefix (butlast full-path)) + set-name (add-set-path-prefix (last full-path))] + (conj set-path set-name))) (defn split-set-prefix [set-path] (some->> set-path @@ -230,6 +260,48 @@ path-part))) (join-set-path))) +(defn get-token-set-final-name [path] + (-> (split-token-set-path path) + (last))) + +(defn set-name->prefixed-full-path [name-str] + (-> (split-token-set-path name-str) + (set-full-path->set-prefixed-full-path))) + +(defn get-token-set-prefixed-path [token-set] + (let [path (get-path token-set set-separator)] + (set-full-path->set-prefixed-full-path path))) + +(defn get-prefixed-token-set-final-prefix [prefixed-path-str] + (some-> (get-token-set-final-name prefixed-path-str) + (split-set-str-path-prefix) + (first))) + +(defn set-name-string->prefixed-set-path-string [name-str] + (-> (set-name->prefixed-full-path name-str) + (join-set-path))) + +(defn prefixed-set-path-string->set-path [path-str] + (->> (split-token-set-path path-str) + (map (fn [path-part] + (or (-> (split-set-str-path-prefix path-part) + (second)) + path-part))))) + +(defn prefixed-set-path-string->set-name-string [path-str] + (->> (prefixed-set-path-string->set-path path-str) + (join-set-path))) + +(defn prefixed-set-path-final-group? + "Predicate if the given prefixed path string ends with a group." + [prefixed-path-str] + (= (get-prefixed-token-set-final-prefix prefixed-path-str) set-group-prefix)) + +(defn prefixed-set-path-final-set? + "Predicate if the given prefixed path string ends with a set." + [prefixed-path-str] + (= (get-prefixed-token-set-final-prefix prefixed-path-str) set-prefix)) + (defn tokens-tree "Convert tokens into a nested tree with their `:name` as the path. Optionally use `update-token-fn` option to transform the token." @@ -263,7 +335,7 @@ (delete-token [_ token-name] "delete a token from the list") (get-token [_ token-name] "return token by token-name") (get-tokens [_] "return an ordered sequence of all tokens in the set") - (get-set-path [_] "returns name of set converted to the path with prefix identifiers") + (get-set-prefixed-path-string [_] "convert set name to prefixed full path string") (get-tokens-tree [_] "returns a tree of tokens split & nested by their name path") (get-dtcg-tokens-tree [_] "returns tokens tree formated to the dtcg spec")) @@ -312,8 +384,8 @@ (get-tokens [_] (vals tokens)) - (get-set-path [_] - (set-name->set-path-string name)) + (get-set-prefixed-path-string [_] + (set-name-string->prefixed-set-path-string name)) (get-tokens-tree [_] (tokens-tree tokens)) @@ -358,9 +430,23 @@ ;; === TokenSets (collection) (defprotocol ITokenSets + "Collection of sets and set groups. + + Naming conventions: + Set name: the complete name as a string, without prefix \"some-group/some-subgroup/some-set\". + Set final name or fname: the last part of the name \"some-set\". + Set path: the groups part of the name, as a vector [\"some-group\" \"some-subgroup\"]. + Set path str: the set path as a string \"some-group/some-subgroup\". + Set full path: the path including the fname, as a vector [\"some-group\", \"some-subgroup\", \"some-set\"]. + Set full path str: the set full path as a string \"some-group/some-subgroup/some-set\". + + Set prefix: the two-characters prefix added to a full path item \"G-\" / \"S-\". + Prefixed set path or ppath: a path wit added prefixes [\"G-some-group\", \"G-some-subgroup\"]. + Prefixed set full path or pfpath: a full path wit prefixes [\"G-some-group\", \"G-some-subgroup\", \"S-some-set\"]. + Prefixed set final name or pfname: a final name with prefix \"S-some-set\"." (add-set [_ token-set] "add a set to the library, at the end") (add-sets [_ token-set] "add a collection of sets to the library, at the end") - (update-set [_ set-name f] "modify a set in the ilbrary") + (update-set [_ set-name f] "modify a set in the library") (delete-set-path [_ set-path] "delete a set in the library") (move-set-before [_ set-name before-set-name] "move a set with `set-name` before a set with `before-set-name` in the library. When `before-set-name` is nil, move set to bottom") @@ -369,6 +455,9 @@ When `before-set-name` is nil, move set to bottom") (get-in-set-tree [_ path] "get `path` in nested tree of all sets in the library") (get-sets [_] "get an ordered sequence of all sets in the library") (get-path-sets [_ path] "get an ordered sequence of sets at `path` in the library") + (get-sets-at-prefix-path [_ prefixed-path-str] "get an ordered sequence of sets at `prefixed-path-str` in the library") + (get-sets-at-path [_ path-str] "get an ordered sequence of sets at `path` in the library") + (rename-set-group [_ from-path-str to-path-str] "renames set groups and all child set names from `from-path-str` to `to-path-str`") (get-ordered-set-names [_] "get an ordered sequence of all sets names in the library") (get-set [_ set-name] "get one set looking for name") (get-neighbor-set-name [_ set-name index-offset] "get neighboring set name offset by `index-offset`")) @@ -415,12 +504,13 @@ When `before-set-name` is nil, move set to bottom") (def hidden-token-theme-path (token-theme-path hidden-token-theme-group hidden-token-theme-name)) - (defprotocol ITokenTheme (set-sets [_ set-names] "set the active token sets") + (enable-set [_ set-name] "enable set in theme") + (enable-sets [_ set-names] "enable sets in theme") (disable-set [_ set-name] "disable set in theme") + (disable-sets [_ set-names] "disable sets in theme") (toggle-set [_ set-name] "toggle a set enabled / disabled in the theme") - (update-set-name [_ prev-set-name set-name] "update set-name from `prev-set-name` to `set-name` when it exists") (theme-path [_] "get `token-theme-path` from theme") (theme-matches-group-name [_ group name] "if a theme matches the given group & name") @@ -436,13 +526,22 @@ When `before-set-name` is nil, move set to bottom") (dt/now) set-names)) + (enable-set [this set-name] + (set-sets this (conj sets set-name))) + + (enable-sets [this set-names] + (set-sets this (set/union sets set-names))) + (disable-set [this set-name] (set-sets this (disj sets set-name))) + (disable-sets [this set-names] + (set-sets this (or (set/difference sets set-names) #{}))) + (toggle-set [this set-name] - (set-sets this (if (sets set-name) - (disj sets set-name) - (conj sets set-name)))) + (if (sets set-name) + (disable-set this set-name) + (enable-set this set-name))) (update-set-name [this prev-set-name set-name] (if (get sets prev-set-name) @@ -521,6 +620,8 @@ When `before-set-name` is nil, move set to bottom") (get-theme-tree [_] "get a nested tree of all themes in the library") (get-themes [_] "get an ordered sequence of all themes in the library") (get-theme [_ group name] "get one theme looking for name") + (get-hidden-theme [_] "get the theme hidden from the user , +used for managing active sets without a user created theme.") (get-theme-groups [_] "get a sequence of group names by order") (get-active-theme-paths [_] "get the active theme paths") (get-active-themes [_] "get an ordered sequence of active themes in the library") @@ -587,6 +688,11 @@ When `before-set-name` is nil, move set to bottom") (delete-token-from-set [_ set-name token-name] "delete a token from a set") (toggle-set-in-theme [_ group-name theme-name set-name] "toggle a set used / not used in a theme") (get-active-themes-set-names [_] "set of set names that are active in the the active themes") + (sets-at-path-all-active? [_ prefixed-path] "compute active state for child sets at `prefixed-path`. +Will return a value that matches this schema: +`:none` None of the nested sets are active +`:all` All of the nested sets are active +`:partial` Mixed active state of nested sets") (get-active-themes-set-tokens [_] "set of set names that are active in the the active themes") (encode-dtcg [_] "Encodes library to a dtcg compatible json string") (decode-dtcg-json [_ parsed-json] "Decodes parsed json containing tokens and converts to library") @@ -613,7 +719,7 @@ When `before-set-name` is nil, move set to bottom") ITokenSets (add-set [_ token-set] (dm/assert! "expected valid token set" (check-token-set! token-set)) - (let [path (get-token-set-path token-set)] + (let [path (get-token-set-prefixed-path token-set)] (TokensLib. (d/oassoc-in sets path token-set) themes active-themes))) @@ -625,18 +731,18 @@ When `before-set-name` is nil, move set to bottom") this token-sets)) (update-set [this set-name f] - (let [path (split-token-set-name set-name) - set (get-in sets path)] + (let [prefixed-full-path (set-name->prefixed-full-path set-name) + set (get-in sets prefixed-full-path)] (if set (let [set' (-> (make-token-set (f set)) (assoc :modified-at (dt/now))) - path' (get-token-set-path set') + prefixed-full-path' (get-token-set-prefixed-path set') name-changed? (not= (:name set) (:name set'))] (check-token-set! set') (if name-changed? (TokensLib. (-> sets - (d/oassoc-in-before path path' set') - (d/dissoc-in path)) + (d/oassoc-in-before prefixed-full-path prefixed-full-path' set') + (d/dissoc-in prefixed-full-path)) (walk/postwalk (fn [form] (if (instance? TokenTheme form) @@ -644,33 +750,34 @@ When `before-set-name` is nil, move set to bottom") form)) themes) active-themes) - (TokensLib. (d/oassoc-in sets path set') + (TokensLib. (d/oassoc-in sets prefixed-full-path set') themes active-themes))) this))) - (delete-set-path [_ set-path] - (let [path (split-token-set-path set-path) - set-node (get-in sets path) - set-group? (not (instance? TokenSet set-node))] - (TokensLib. (d/dissoc-in sets path) + (delete-set-path [_ prefixed-set-name] + (let [prefixed-set-path (split-token-set-path prefixed-set-name) + set-node (get-in sets prefixed-set-path) + set-group? (not (instance? TokenSet set-node)) + set-name-string (prefixed-set-path-string->set-name-string prefixed-set-name)] + (TokensLib. (d/dissoc-in sets prefixed-set-path) ;; TODO: When deleting a set-group, also deactivate the child sets (if set-group? themes (walk/postwalk (fn [form] (if (instance? TokenTheme form) - (disable-set form set-path) + (disable-set form set-name-string) form)) themes)) active-themes))) ;; TODO Handle groups and nesting (move-set-before [this set-name before-set-name] - (let [source-path (split-token-set-name set-name) + (let [source-path (set-name->prefixed-full-path set-name) token-set (-> (get-set this set-name) (assoc :modified-at (dt/now))) - target-path (split-token-set-name before-set-name)] + target-path (set-name->prefixed-full-path before-set-name)] (if before-set-name (TokensLib. (d/oassoc-in-before sets target-path source-path token-set) themes @@ -696,6 +803,26 @@ When `before-set-name` is nil, move set to bottom") (tree-seq d/ordered-map? vals) (filter (partial instance? TokenSet)))) + (get-sets-at-prefix-path [_ prefixed-path-str] + (some->> (get-in sets (split-token-set-path prefixed-path-str)) + (tree-seq d/ordered-map? vals) + (filter (partial instance? TokenSet)))) + + (get-sets-at-path [_ path-str] + (some->> (split-token-set-path path-str) + (map add-set-path-group-prefix) + (get-in sets) + (tree-seq d/ordered-map? vals) + (filter (partial instance? TokenSet)))) + + (rename-set-group [this from-path-str to-path-str] + (->> (get-sets-at-path this from-path-str) + (reduce + (fn [lib set] + (update-set lib (:name set) (fn [set'] + (update set' :name #(str to-path-str (str/strip-prefix % from-path-str)))))) + this))) + (get-ordered-set-names [this] (map :name (get-sets this))) @@ -703,7 +830,7 @@ When `before-set-name` is nil, move set to bottom") (count (get-sets this))) (get-set [_ set-name] - (let [path (split-token-set-name set-name)] + (let [path (set-name->prefixed-full-path set-name)] (get-in sets path))) (get-neighbor-set-name [this set-name index-offset] @@ -766,6 +893,9 @@ When `before-set-name` is nil, move set to bottom") (get-theme [_ group name] (dm/get-in themes [group name])) + (get-hidden-theme [this] + (get-theme this hidden-token-theme-group hidden-token-theme-name)) + (set-active-themes [_ active-themes] (TokensLib. sets themes @@ -831,6 +961,19 @@ When `before-set-name` is nil, move set to bottom") (mapcat :sets) (get-active-themes this))) + (sets-at-path-all-active? [this prefixed-path-str] + (let [active-set-names (get-active-themes-set-names this)] + (if (seq active-set-names) + (let [path-active-set-names (->> (get-sets-at-prefix-path this prefixed-path-str) + (map :name) + (into #{})) + difference (set/difference path-active-set-names active-set-names)] + (cond + (empty? difference) :all + (seq (set/intersection path-active-set-names active-set-names)) :partial + :else :none)) + :none))) + (get-active-themes-set-tokens [this] (let [sets-order (get-ordered-set-names this) active-themes (get-active-themes this) @@ -845,15 +988,26 @@ When `before-set-name` is nil, move set to bottom") (d/ordered-map) active-themes))) (encode-dtcg [_] - (into {} (comp - (filter (partial instance? TokenSet)) - (map (fn [token-set] - [(:name token-set) (get-dtcg-tokens-tree token-set)]))) - (tree-seq d/ordered-map? vals sets))) + (let [themes (into [] + (comp + (filter #(and (instance? TokenTheme %) + (not (hidden-temporary-theme? %)))) + (map (fn [token-theme] + (->> token-theme + (into {}) + walk/stringify-keys)))) + (tree-seq d/ordered-map? vals themes)) + sets (into {} (comp + (filter (partial instance? TokenSet)) + (map (fn [token-set] + [(:name token-set) (get-dtcg-tokens-tree token-set)]))) + (tree-seq d/ordered-map? vals sets))] + (assoc sets "$themes" themes))) (decode-dtcg-json [_ parsed-json] (let [;; tokens-studio/plugin will add these meta properties, remove them for now sets-data (dissoc parsed-json "$themes" "$metadata") + themes-data (get parsed-json "$themes") lib (make-tokens-lib) lib' (reduce (fn [lib [set-name tokens]] @@ -861,7 +1015,15 @@ When `before-set-name` is nil, move set to bottom") :name set-name :tokens (flatten-nested-tokens-json tokens "")))) lib sets-data)] - lib')) + (reduce + (fn [lib {:strs [name group description is-source modified-at sets]}] + (add-theme lib (TokenTheme. name + group + description + is-source + (dt/parse-instant modified-at) + (set sets)))) + lib' themes-data))) (get-all-tokens [this] (reduce diff --git a/common/src/app/common/types/tokens_list.cljc b/common/src/app/common/types/tokens_list.cljc deleted file mode 100644 index b31262d4d..000000000 --- a/common/src/app/common/types/tokens_list.cljc +++ /dev/null @@ -1,49 +0,0 @@ -;; This Source Code Form is subject to the terms of the Mozilla Public -;; License, v. 2.0. If a copy of the MPL was not distributed with this -;; file, You can obtain one at http://mozilla.org/MPL/2.0/. -;; -;; Copyright (c) KALEIDOS INC - -(ns app.common.types.tokens-list - (:require - [app.common.data :as d] - [app.common.time :as dt])) - -(defn tokens-seq - "Returns a sequence of all tokens within the file data." - [file-data] - (vals (:tokens file-data))) - -(defn- touch - "Updates the `modified-at` timestamp of a token." - [token] - (assoc token :modified-at (dt/now))) - -(defn add-token - "Adds a new token to the file data, setting its `modified-at` timestamp." - [file-data token-set-id token] - (-> file-data - (update :tokens assoc (:id token) (touch token)) - (d/update-in-when [:token-sets-index token-set-id] #(-> - (update % :tokens conj (:id token)) - (touch))))) - -(defn get-token - "Retrieves a token by its ID from the file data." - [file-data token-id] - (get-in file-data [:tokens token-id])) - -(defn set-token - "Sets or updates a token in the file data, updating its `modified-at` timestamp." - [file-data token] - (d/assoc-in-when file-data [:tokens (:id token)] (touch token))) - -(defn update-token - "Applies a function to update a token in the file data, then touches it." - [file-data token-id f & args] - (d/update-in-when file-data [:tokens token-id] #(-> (apply f % args) (touch)))) - -(defn delete-token - "Removes a token from the file data by its ID." - [file-data token-id] - (update file-data :tokens dissoc token-id)) diff --git a/common/src/app/common/types/tokens_theme_list.cljc b/common/src/app/common/types/tokens_theme_list.cljc deleted file mode 100644 index 971c96946..000000000 --- a/common/src/app/common/types/tokens_theme_list.cljc +++ /dev/null @@ -1,79 +0,0 @@ -;; This Source Code Form is subject to the terms of the Mozilla Public -;; License, v. 2.0. If a copy of the MPL was not distributed with this -;; file, You can obtain one at http://mozilla.org/MPL/2.0/. -;; -;; Copyright (c) KALEIDOS INC - -(ns app.common.types.tokens-theme-list - (:require - [app.common.data :as d] - [app.common.time :as dt])) - -(defn- touch - "Updates the `modified-at` timestamp of a token set." - [token-set] - (assoc token-set :modified-at (dt/now))) - -(defn assoc-active-token-themes - [file-data theme-ids] - (assoc file-data :token-active-themes theme-ids)) - -(defn add-temporary-token-theme - [file-data {:keys [id name] :as token-theme}] - (-> file-data - (d/dissoc-in [:token-themes-index (:token-theme-temporary-id file-data)]) - (assoc :token-theme-temporary-id id) - (assoc :token-theme-temporary-name name) - (update :token-themes-index assoc id token-theme))) - -(defn delete-temporary-token-theme - [file-data token-theme-id] - (cond-> file-data - (= (:token-theme-temporary-id file-data) token-theme-id) (dissoc :token-theme-temporary-id :token-theme-temporary-name) - :always (d/dissoc-in [:token-themes-index (:token-theme-temporary-id file-data)]))) - -(defn add-token-theme - [file-data {:keys [index id] :as token-theme}] - (-> file-data - (update :token-themes - (fn [token-themes] - (let [exists? (some (partial = id) token-themes)] - (cond - exists? token-themes - (nil? index) (conj (or token-themes []) id) - :else (d/insert-at-index token-themes index [id]))))) - (update :token-themes-index assoc id token-theme))) - -(defn update-token-theme - [file-data token-theme-id f & args] - (d/update-in-when file-data [:token-themes-index token-theme-id] #(-> (apply f % args) (touch)))) - -(defn delete-token-theme - [file-data theme-id] - (-> file-data - (update :token-themes (fn [ids] (d/removev #(= % theme-id) ids))) - (update :token-themes-index dissoc theme-id) - (update :token-active-themes disj theme-id))) - -(defn add-token-set - [file-data {:keys [index id] :as token-set}] - (-> file-data - (update :token-set-groups - (fn [token-set-groups] - (let [exists? (some (partial = id) token-set-groups)] - (cond - exists? token-set-groups - (nil? index) (conj (or token-set-groups []) id) - :else (d/insert-at-index token-set-groups index [id]))))) - (update :token-sets-index assoc id token-set))) - -(defn update-token-set - [file-data token-set-id f & args] - (d/update-in-when file-data [:token-sets-index token-set-id] #(-> (apply f % args) (touch)))) - -(defn delete-token-set - [file-data token-set-id] - (-> file-data - (update :token-set-groups (fn [xs] (into [] (remove #(= (:id %) token-set-id) xs)))) - (update :token-sets-index dissoc token-set-id) - (update :token-themes-index (fn [xs] (update-vals xs #(update % :sets disj token-set-id)))))) diff --git a/common/test/common_tests/logic/comp_sync_test.cljc b/common/test/common_tests/logic/comp_sync_test.cljc index 94f093ff3..f970f5fcb 100644 --- a/common/test/common_tests/logic/comp_sync_test.cljc +++ b/common/test/common_tests/logic/comp_sync_test.cljc @@ -193,7 +193,6 @@ (ths/add-sample-shape :free-shape)) page (thf/current-page file) - main-root (ths/get-shape file :main-root) ;; ==== Action changes1 (cls/generate-relocate (pcb/empty-changes) @@ -203,9 +202,6 @@ 0 ; to-index #{(thi/id :free-shape)}) ; ids - - - updated-file (thf/apply-changes file changes1) changes2 (cll/generate-sync-file-changes (pcb/empty-changes) @@ -491,4 +487,4 @@ (t/is (= (:fill-color fill') "#fabada")) (t/is (= (:fill-opacity fill') 1)) (t/is (= (:touched copy2-root') nil)) - (t/is (= (:touched copy2-child') nil)))) \ No newline at end of file + (t/is (= (:touched copy2-child') nil)))) diff --git a/common/test/common_tests/logic/token_apply_test.cljc b/common/test/common_tests/logic/token_apply_test.cljc new file mode 100644 index 000000000..be7be1e5f --- /dev/null +++ b/common/test/common_tests/logic/token_apply_test.cljc @@ -0,0 +1,202 @@ +;; This Source Code Form is subject to the terms of the Mozilla Public +;; License, v. 2.0. If a copy of the MPL was not distributed with this +;; file, You can obtain one at http://mozilla.org/MPL/2.0/. +;; +;; Copyright (c) KALEIDOS INC + +(ns common-tests.logic.token-apply-test + (:require + [app.common.files.changes-builder :as pcb] + [app.common.logic.shapes :as cls] + [app.common.test-helpers.compositions :as tho] + [app.common.test-helpers.files :as thf] + [app.common.test-helpers.ids-map :as thi] + [app.common.test-helpers.shapes :as ths] + [app.common.test-helpers.tokens :as tht] + [app.common.types.container :as ctn] + [app.common.types.token :as cto] + [app.common.types.tokens-lib :as ctob] + [clojure.test :as t])) + +(t/use-fixtures :each thi/test-fixture) + +(defn- setup-file + [] + (-> (thf/sample-file :file1) + (tht/add-tokens-lib) + (tht/update-tokens-lib #(-> % + (ctob/add-set (ctob/make-token-set :name "test-token-set")) + (ctob/add-theme (ctob/make-token-theme :name "test-theme" + :sets #{"test-token-set"})) + (ctob/set-active-themes #{"/test-theme"}) + (ctob/add-token-in-set "test-token-set" + (ctob/make-token :name "token-radius" + :type :border-radius + :value 10)) + (ctob/add-token-in-set "test-token-set" + (ctob/make-token :name "token-rotation" + :type :rotation + :value 30)) + (ctob/add-token-in-set "test-token-set" + (ctob/make-token :name "token-opacity" + :type :opacity + :value 0.7)) + (ctob/add-token-in-set "test-token-set" + (ctob/make-token :name "token-stroke-width" + :type :stroke-width + :value 2)) + (ctob/add-token-in-set "test-token-set" + (ctob/make-token :name "token-color" + :type :color + :value "#00ff00")) + (ctob/add-token-in-set "test-token-set" + (ctob/make-token :name "token-dimensions" + :type :dimensions + :value 100)))) + (tho/add-frame :frame1))) + +(defn- apply-all-tokens + [file] + (-> file + (tht/apply-token-to-shape :frame1 "token-radius" [:r1 :r2 :r3 :r4] [:r1 :r2 :r3 :r4] 10) + (tht/apply-token-to-shape :frame1 "token-rotation" [:rotation] [:rotation] 30) + (tht/apply-token-to-shape :frame1 "token-opacity" [:opacity] [:opacity] 0.7) + (tht/apply-token-to-shape :frame1 "token-stroke-width" [:stroke-width] [:stroke-width] 2) + (tht/apply-token-to-shape :frame1 "token-color" [:stroke-color] [:stroke-color] "#00ff00") + (tht/apply-token-to-shape :frame1 "token-color" [:fill] [:fill] "#00ff00") + (tht/apply-token-to-shape :frame1 "token-dimensions" [:width :height] [:width :height] 100))) + +(t/deftest apply-tokens-to-shape + (let [;; ==== Setup + file (setup-file) + page (thf/current-page file) + frame1 (ths/get-shape file :frame1) + token-radius (tht/get-token file "test-token-set" "token-radius") + token-rotation (tht/get-token file "test-token-set" "token-rotation") + token-opacity (tht/get-token file "test-token-set" "token-opacity") + token-stroke-width (tht/get-token file "test-token-set" "token-stroke-width") + token-color (tht/get-token file "test-token-set" "token-color") + token-dimensions (tht/get-token file "test-token-set" "token-dimensions") + + ;; ==== Action + changes (-> (-> (pcb/empty-changes nil) + (pcb/with-page page) + (pcb/with-objects (:objects page))) + (cls/generate-update-shapes [(:id frame1)] + (fn [shape] + (as-> shape $ + (cto/maybe-apply-token-to-shape {:token nil ; test nil case + :shape $ + :attributes []}) + (cto/maybe-apply-token-to-shape {:token token-radius + :shape $ + :attributes [:r1 :r2 :r3 :r4]}) + (cto/maybe-apply-token-to-shape {:token token-rotation + :shape $ + :attributes [:rotation]}) + (cto/maybe-apply-token-to-shape {:token token-opacity + :shape $ + :attributes [:opacity]}) + (cto/maybe-apply-token-to-shape {:token token-stroke-width + :shape $ + :attributes [:stroke-width]}) + (cto/maybe-apply-token-to-shape {:token token-color + :shape $ + :attributes [:stroke-color]}) + (cto/maybe-apply-token-to-shape {:token token-color + :shape $ + :attributes [:fill]}) + (cto/maybe-apply-token-to-shape {:token token-dimensions + :shape $ + :attributes [:width :height]}))) + (:objects page) + {})) + + file' (thf/apply-changes file changes) + + ;; ==== Get + frame1' (ths/get-shape file' :frame1) + applied-tokens' (:applied-tokens frame1')] + + ;; ==== Check + (t/is (= (count applied-tokens') 11)) + (t/is (= (:r1 applied-tokens') "token-radius")) + (t/is (= (:r2 applied-tokens') "token-radius")) + (t/is (= (:r3 applied-tokens') "token-radius")) + (t/is (= (:r4 applied-tokens') "token-radius")) + (t/is (= (:rotation applied-tokens') "token-rotation")) + (t/is (= (:opacity applied-tokens') "token-opacity")) + (t/is (= (:stroke-width applied-tokens') "token-stroke-width")) + (t/is (= (:stroke-color applied-tokens') "token-color")) + (t/is (= (:fill applied-tokens') "token-color")) + (t/is (= (:width applied-tokens') "token-dimensions")) + (t/is (= (:height applied-tokens') "token-dimensions")))) + +(t/deftest unapply-tokens-from-shape + (let [;; ==== Setup + file (-> (setup-file) + (apply-all-tokens)) + page (thf/current-page file) + frame1 (ths/get-shape file :frame1) + + ;; ==== Action + changes (-> (-> (pcb/empty-changes nil) + (pcb/with-page page) + (pcb/with-objects (:objects page))) + (cls/generate-update-shapes [(:id frame1)] + (fn [shape] + (-> shape + (cto/unapply-token-id [:r1 :r2 :r3 :r4]) + (cto/unapply-token-id [:rotation]) + (cto/unapply-token-id [:opacity]) + (cto/unapply-token-id [:stroke-width]) + (cto/unapply-token-id [:stroke-color]) + (cto/unapply-token-id [:fill]) + (cto/unapply-token-id [:width :height]))) + (:objects page) + {})) + + file' (thf/apply-changes file changes) + + ;; ==== Get + frame1' (ths/get-shape file' :frame1) + applied-tokens' (:applied-tokens frame1')] + + ;; ==== Check + (t/is (= (count applied-tokens') 0)))) + +(t/deftest unapply-tokens-automatic + (let [;; ==== Setup + file (-> (setup-file) + (apply-all-tokens)) + page (thf/current-page file) + frame1 (ths/get-shape file :frame1) + + ;; ==== Action + changes (-> (-> (pcb/empty-changes nil) + (pcb/with-page page) + (pcb/with-objects (:objects page))) + (cls/generate-update-shapes [(:id frame1)] + (fn [shape] + (-> shape + (ctn/set-shape-attr :r1 0) + (ctn/set-shape-attr :r2 0) + (ctn/set-shape-attr :r3 0) + (ctn/set-shape-attr :r4 0) + (ctn/set-shape-attr :rotation 0) + (ctn/set-shape-attr :opacity 0) + (ctn/set-shape-attr :strokes []) + (ctn/set-shape-attr :fills []) + (ctn/set-shape-attr :width 0) + (ctn/set-shape-attr :height 0))) + (:objects page) + {})) + + file' (thf/apply-changes file changes) + + ;; ==== Get + frame1' (ths/get-shape file' :frame1) + applied-tokens' (:applied-tokens frame1')] + + ;; ==== Check + (t/is (= (count applied-tokens') 0)))) \ No newline at end of file diff --git a/common/test/common_tests/logic/token_test.cljc b/common/test/common_tests/logic/token_test.cljc new file mode 100644 index 000000000..c91235d8f --- /dev/null +++ b/common/test/common_tests/logic/token_test.cljc @@ -0,0 +1,117 @@ +(ns common-tests.logic.token-test + (:require + [app.common.files.changes-builder :as pcb] + [app.common.logic.tokens :as clt] + [app.common.test-helpers.files :as thf] + [app.common.test-helpers.ids-map :as thi] + [app.common.test-helpers.tokens :as tht] + [app.common.types.tokens-lib :as ctob] + [clojure.test :as t])) + +(t/use-fixtures :each thi/test-fixture) + +(defn- setup-file [lib-fn] + (-> (thf/sample-file :file1) + (tht/add-tokens-lib) + (tht/update-tokens-lib lib-fn))) + +(t/deftest generate-toggle-token-set-test + (t/testing "toggling an active set will switch to hidden theme without user sets" + (let [file (setup-file #(-> % + (ctob/add-set (ctob/make-token-set :name "foo/bar")) + (ctob/add-theme (ctob/make-token-theme :name "theme" + :sets #{"foo/bar"})) + (ctob/set-active-themes #{"/theme"}))) + changes (clt/generate-toggle-token-set (pcb/empty-changes) (tht/get-tokens-lib file) "foo/bar") + + redo (thf/apply-changes file changes) + redo-lib (tht/get-tokens-lib redo) + undo (thf/apply-undo-changes redo changes) + undo-lib (tht/get-tokens-lib undo)] + (t/is (= #{ctob/hidden-token-theme-path} (ctob/get-active-theme-paths redo-lib))) + (t/is (= #{} (:sets (ctob/get-hidden-theme redo-lib)))) + + ;; Undo + (t/is (nil? (ctob/get-hidden-theme undo-lib))) + (t/is (= #{"/theme"} (ctob/get-active-theme-paths undo-lib))))) + + (t/testing "toggling an inactive set will switch to hidden theme without user sets" + (let [file (setup-file #(-> % + (ctob/add-set (ctob/make-token-set :name "foo/bar")) + (ctob/add-theme (ctob/make-token-theme :name "theme" + :sets #{"foo/bar"})) + (ctob/set-active-themes #{"/theme"}))) + changes (clt/generate-toggle-token-set (pcb/empty-changes) (tht/get-tokens-lib file) "foo/bar") + + redo (thf/apply-changes file changes) + redo-lib (tht/get-tokens-lib redo) + undo (thf/apply-undo-changes redo changes) + undo-lib (tht/get-tokens-lib undo)] + (t/is (= #{ctob/hidden-token-theme-path} (ctob/get-active-theme-paths redo-lib))) + (t/is (= #{} (:sets (ctob/get-hidden-theme redo-lib)))) + + ;; Undo + (t/is (nil? (ctob/get-hidden-theme undo-lib))) + (t/is (= #{"/theme"} (ctob/get-active-theme-paths undo-lib))))) + + (t/testing "toggling an set with hidden theme already active will toggle set in hidden theme" + (let [file (setup-file #(-> % + (ctob/add-set (ctob/make-token-set :name "foo/bar")) + (ctob/add-theme (ctob/make-hidden-token-theme)) + (ctob/set-active-themes #{ctob/hidden-token-theme-path}))) + + changes (clt/generate-toggle-token-set-group (pcb/empty-changes) (tht/get-tokens-lib file) "G-foo/S-bar") + + redo (thf/apply-changes file changes) + redo-lib (tht/get-tokens-lib redo) + undo (thf/apply-undo-changes redo changes) + undo-lib (tht/get-tokens-lib undo)] + (t/is (= (ctob/get-active-theme-paths redo-lib) (ctob/get-active-theme-paths undo-lib))) + + (t/is (= #{"foo/bar"} (:sets (ctob/get-hidden-theme redo-lib)))) + + ;; Undo + (t/is (some? (ctob/get-hidden-theme undo-lib)))))) + +(t/deftest generate-toggle-token-set-group-test + (t/testing "toggling set group with no active sets inside will activate all child sets" + (let [file (setup-file #(-> % + (ctob/add-set (ctob/make-token-set :name "foo/bar")) + (ctob/add-set (ctob/make-token-set :name "foo/bar/baz")) + (ctob/add-set (ctob/make-token-set :name "foo/bar/baz/baz-child")) + (ctob/add-theme (ctob/make-token-theme :name "theme")) + (ctob/set-active-themes #{"/theme"}))) + changes (clt/generate-toggle-token-set-group (pcb/empty-changes) (tht/get-tokens-lib file) "G-foo/G-bar") + + redo (thf/apply-changes file changes) + redo-lib (tht/get-tokens-lib redo) + undo (thf/apply-undo-changes redo changes) + undo-lib (tht/get-tokens-lib undo)] + (t/is (= #{ctob/hidden-token-theme-path} (ctob/get-active-theme-paths redo-lib))) + (t/is (= #{"foo/bar/baz" "foo/bar/baz/baz-child"} (:sets (ctob/get-hidden-theme redo-lib)))) + + ;; Undo + (t/is (nil? (ctob/get-hidden-theme undo-lib))) + (t/is (= #{"/theme"} (ctob/get-active-theme-paths undo-lib))))) + + (t/testing "toggling set group with partially active sets inside will deactivate all child sets" + (let [file (setup-file #(-> % + (ctob/add-set (ctob/make-token-set :name "foo/bar")) + (ctob/add-set (ctob/make-token-set :name "foo/bar/baz")) + (ctob/add-set (ctob/make-token-set :name "foo/bar/baz/baz-child")) + (ctob/add-theme (ctob/make-token-theme :name "theme" + :sets #{"foo/bar/baz"})) + (ctob/set-active-themes #{"/theme"}))) + + changes (clt/generate-toggle-token-set-group (pcb/empty-changes) (tht/get-tokens-lib file) "G-foo/G-bar") + + redo (thf/apply-changes file changes) + redo-lib (tht/get-tokens-lib redo) + undo (thf/apply-undo-changes redo changes) + undo-lib (tht/get-tokens-lib undo)] + (t/is (= #{} (:sets (ctob/get-hidden-theme redo-lib)))) + (t/is (= #{ctob/hidden-token-theme-path} (ctob/get-active-theme-paths redo-lib))) + + ;; Undo + (t/is (nil? (ctob/get-hidden-theme undo-lib))) + (t/is (= #{"/theme"} (ctob/get-active-theme-paths undo-lib)))))) diff --git a/common/test/common_tests/types/data/tokens-multi-set-example.json b/common/test/common_tests/types/data/tokens-multi-set-example.json index ca836d961..7b44af9bc 100644 --- a/common/test/common_tests/types/data/tokens-multi-set-example.json +++ b/common/test/common_tests/types/data/tokens-multi-set-example.json @@ -796,7 +796,14 @@ } } }, - "$themes": [], + "$themes": [ { + "name": "theme-1", + "group": "group-1", + "description": null, + "is-source": false, + "modified-at": "2024-01-01T00:00:00.000+00:00", + "sets": [ "light" ] + } ], "$metadata": { "tokenSetOrder": ["core", "light", "dark", "theme"] } diff --git a/common/test/common_tests/types/tokens_lib_test.cljc b/common/test/common_tests/types/tokens_lib_test.cljc index cab60fc8f..67fd9c105 100644 --- a/common/test/common_tests/types/tokens_lib_test.cljc +++ b/common/test/common_tests/types/tokens_lib_test.cljc @@ -100,7 +100,6 @@ (->> (ctob/move-set-before tokens-lib set-name before-set-name) (ctob/get-ordered-set-names) (into [])))] - ;; TODO Nested moving doesn't work as expected (t/testing "regular moving" (t/is (= ["A" "Move" "B"] (move "Move" "B"))) (t/is (= ["B" "A" "Move"] (move "A" "Move")))) @@ -231,6 +230,24 @@ (t/is (= (:name token-set') "updated-name")) (t/is (dt/is-after? (:modified-at token-set') (:modified-at token-set))))) + (t/deftest rename-token-set-group + (let [tokens-lib (-> (ctob/make-tokens-lib) + (ctob/add-set (ctob/make-token-set :name "foo/bar/baz")) + (ctob/add-set (ctob/make-token-set :name "foo/bar/baz/baz-child-1")) + (ctob/add-set (ctob/make-token-set :name "foo/bar/baz/baz-child-2")) + (ctob/add-theme (ctob/make-token-theme :name "theme" :sets #{"foo/bar/baz/baz-child-1"}))) + tokens-lib' (-> tokens-lib + (ctob/rename-set-group "foo/bar" "foo/bar-renamed") + (ctob/rename-set-group "foo/bar-renamed/baz" "foo/bar-renamed/baz-renamed")) + expected-set-names (ctob/get-ordered-set-names tokens-lib') + expected-theme-sets (-> (ctob/get-theme tokens-lib' "" "theme") + :sets)] + (t/is (= expected-set-names + '("foo/bar-renamed/baz" + "foo/bar-renamed/baz-renamed/baz-child-1" + "foo/bar-renamed/baz-renamed/baz-child-2"))) + (t/is (= expected-theme-sets #{"foo/bar-renamed/baz-renamed/baz-child-1"})))) + (t/deftest delete-token-set (let [tokens-lib (-> (ctob/make-tokens-lib) (ctob/add-set (ctob/make-token-set :name "test-token-set")) @@ -241,11 +258,10 @@ (ctob/delete-set-path "S-not-existing-set")) token-set' (ctob/get-set tokens-lib' "updated-name") - ;;token-theme' (ctob/get-theme tokens-lib' "" "test-token-theme") - ] + token-theme' (ctob/get-theme tokens-lib' "" "test-token-theme")] (t/is (= (ctob/set-count tokens-lib') 0)) - ;; (t/is (= (:sets token-theme') #{})) TODO: fix this + (t/is (= (:sets token-theme') #{})) (t/is (nil? token-set')))) (t/deftest active-themes-set-names @@ -401,8 +417,39 @@ expected-tokens (ctob/get-active-themes-set-tokens tokens-lib) expected-token-names (mapv key expected-tokens)] (t/is (= '("set-a" "set-b" "inactive-set") expected-order)) - (t/is (= ["set-a-token" "set-b-token"] expected-token-names))))) + (t/is (= ["set-a-token" "set-b-token"] expected-token-names)))) + (t/testing "sets-at-path-active-state" + (let [tokens-lib (-> (ctob/make-tokens-lib) + + (ctob/add-set (ctob/make-token-set :name "foo/bar/baz")) + (ctob/add-set (ctob/make-token-set :name "foo/bar/bam")) + + (ctob/add-theme (ctob/make-token-theme :name "none")) + (ctob/add-theme (ctob/make-token-theme :name "partial" + :sets #{"foo/bar/baz"})) + (ctob/add-theme (ctob/make-token-theme :name "all" + :sets #{"foo/bar/baz" + "foo/bar/bam"})) + (ctob/add-theme (ctob/make-token-theme :name "invalid" + :sets #{"foo/missing"}))) + + expected-none (-> tokens-lib + (ctob/set-active-themes #{"/none"}) + (ctob/sets-at-path-all-active? "G-foo")) + expected-all (-> tokens-lib + (ctob/set-active-themes #{"/all"}) + (ctob/sets-at-path-all-active? "G-foo")) + expected-partial (-> tokens-lib + (ctob/set-active-themes #{"/partial"}) + (ctob/sets-at-path-all-active? "G-foo")) + expected-invalid-none (-> tokens-lib + (ctob/set-active-themes #{"/invalid"}) + (ctob/sets-at-path-all-active? "G-foo"))] + (t/is (= :none expected-none)) + (t/is (= :all expected-all)) + (t/is (= :partial expected-partial)) + (t/is (= :none expected-invalid-none))))) (t/deftest token-theme-in-a-lib (t/testing "add-token-theme" @@ -1060,8 +1107,13 @@ get-set-token (fn [set-name token-name] (some-> (ctob/get-set lib set-name) (ctob/get-token token-name) - (dissoc :modified-at)))] + (dissoc :modified-at))) + token-theme (ctob/get-theme lib "group-1" "theme-1")] (t/is (= '("core" "light" "dark" "theme") (ctob/get-ordered-set-names lib))) + (t/testing "set exists in theme" + (t/is (= (:group token-theme) "group-1")) + (t/is (= (:name token-theme) "theme-1")) + (t/is (= (:sets token-theme) #{"light"}))) (t/testing "tokens exist in core set" (t/is (= (get-set-token "core" "colors.red.600") {:name "colors.red.600" @@ -1082,7 +1134,8 @@ (t/is (nil? (get-set-token "typography" "H1.Bold")))))) (t/testing "encode-dtcg-json" - (let [tokens-lib (-> (ctob/make-tokens-lib) + (let [now (dt/now) + tokens-lib (-> (ctob/make-tokens-lib) (ctob/add-set (ctob/make-token-set :name "core" :tokens {"colors.red.600" (ctob/make-token @@ -1099,9 +1152,19 @@ (ctob/make-token {:name "button.primary.background" :type :color - :value "{accent.default}"})}))) + :value "{accent.default}"})})) + (ctob/add-theme (ctob/make-token-theme :name "theme-1" + :group "group-1" + :modified-at now + :sets #{"core"}))) expected (ctob/encode-dtcg tokens-lib)] - (t/is (= {"core" + (t/is (= {"$themes" [{"description" nil + "group" "group-1" + "is-source" false + "modified-at" now + "name" "theme-1" + "sets" #{"core"}}] + "core" {"colors" {"red" {"600" {"$value" "#e53e3e" "$type" "color"}}} "spacing" @@ -1142,4 +1205,3 @@ (t/is (= @with-prev-tokens-lib @tokens-lib))) (t/testing "fresh tokens library is also equal" (= @with-empty-tokens-lib @tokens-lib))))))) - diff --git a/frontend/package.json b/frontend/package.json index 0f85bf1b2..acf288b23 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -122,7 +122,7 @@ "rxjs": "8.0.0-alpha.14", "sax": "^1.4.1", "source-map-support": "^0.5.21", - "style-dictionary": "4.0.0-prerelease.34", + "style-dictionary": "4.0.0-prerelease.36", "tdigest": "^0.1.2", "tinycolor2": "npm:^1.6.0", "ua-parser-js": "2.0.0-rc.1", diff --git a/frontend/playwright/data/get-teams-tokens.json b/frontend/playwright/data/get-teams-tokens.json new file mode 100644 index 000000000..7ec12f187 --- /dev/null +++ b/frontend/playwright/data/get-teams-tokens.json @@ -0,0 +1,26 @@ +[ + { + "~:features": { + "~#set": [ + "design-tokens/v1", + "layout/grid", + "styles/v2", + "fdata/pointer-map", + "fdata/objects-map", + "components/v2", + "fdata/shape-data-type" + ] + }, + "~:permissions": { + "~:type": "~:membership", + "~:is-owner": true, + "~:is-admin": true, + "~:can-edit": true + }, + "~:name": "Default", + "~:modified-at": "~m1713533116375", + "~:id": "~uc7ce0794-0992-8105-8004-38e630f7920a", + "~:created-at": "~m1713533116375", + "~:is-default": true + } +] diff --git a/frontend/playwright/data/workspace/get-team-tokens.json b/frontend/playwright/data/workspace/get-team-tokens.json new file mode 100644 index 000000000..855b1506a --- /dev/null +++ b/frontend/playwright/data/workspace/get-team-tokens.json @@ -0,0 +1,24 @@ +{ + "~:features": { + "~#set": [ + "design-tokens/v1", + "layout/grid", + "styles/v2", + "fdata/pointer-map", + "fdata/objects-map", + "components/v2", + "fdata/shape-data-type" + ] + }, + "~:permissions": { + "~:type": "~:membership", + "~:is-owner": true, + "~:is-admin": true, + "~:can-edit": true + }, + "~:name": "Default", + "~:modified-at": "~m1713533116375", + "~:id": "~uc7ce0794-0992-8105-8004-38e630f40f6d", + "~:created-at": "~m1713533116375", + "~:is-default": true +} diff --git a/frontend/playwright/ui/pages/WorkspacePage.js b/frontend/playwright/ui/pages/WorkspacePage.js index d0d29b531..3948730c5 100644 --- a/frontend/playwright/ui/pages/WorkspacePage.js +++ b/frontend/playwright/ui/pages/WorkspacePage.js @@ -85,6 +85,12 @@ export class WorkspacePage extends BaseWebSocketPage { this.togglePalettesVisibility = page.getByTestId( "toggle-palettes-visibility", ); + this.tokensUpdateCreateModal = page.getByTestId( + "token-update-create-modal", + ); + this.tokenThemesSetsSidebar = page.getByTestId("token-themes-sets-sidebar"); + this.tokenSetItems = page.getByTestId("tokens-set-item"); + this.tokenSetGroupItems = page.getByTestId("tokens-set-group-item"); } async goToWorkspace({ diff --git a/frontend/playwright/ui/specs/tokens.spec.js b/frontend/playwright/ui/specs/tokens.spec.js new file mode 100644 index 000000000..0c33b0ddd --- /dev/null +++ b/frontend/playwright/ui/specs/tokens.spec.js @@ -0,0 +1,145 @@ +import { test, expect } from "@playwright/test"; +import { WorkspacePage } from "../pages/WorkspacePage"; +import { BaseWebSocketPage } from "../pages/BaseWebSocketPage"; + +test.beforeEach(async ({ page }) => { + await WorkspacePage.init(page); + await BaseWebSocketPage.mockRPC(page, "get-teams", "get-teams-tokens.json"); +}); + +const setupFileWithTokens = async (page) => { + const workspacePage = new WorkspacePage(page); + await workspacePage.setupEmptyFile(); + await workspacePage.mockRPC( + "get-team?id=*", + "workspace/get-team-tokens.json", + ); + + await workspacePage.goToWorkspace(); + + const tokensTabButton = page.getByRole("tab", { name: "Tokens" }); + await tokensTabButton.click(); + + return { + workspacePage, + tokensUpdateCreateModal: workspacePage.tokensUpdateCreateModal, + tokenThemesSetsSidebar: workspacePage.tokenThemesSetsSidebar, + tokenSetItems: workspacePage.tokenSetItems, + tokenSetGroupItems: workspacePage.tokenSetGroupItems, + }; +}; + +test.describe("Tokens: Tokens Tab", () => { + test("Clicking tokens tab button opens tokens sidebar tab", async ({ + page, + }) => { + const { workspacePage, tokensUpdateCreateModal, tokenThemesSetsSidebar } = + await setupFileWithTokens(page); + + const tokensTabPanel = page.getByRole("tabpanel", { name: "tokens" }); + + await expect(tokensTabPanel).toHaveText(/TOKENS/); + await expect(tokensTabPanel).toHaveText(/Themes/); + }); + + test("User creates color token and auto created set show up in the sidebar", async ({ + page, + }) => { + const { workspacePage, tokensUpdateCreateModal, tokenThemesSetsSidebar } = + await setupFileWithTokens(page); + + const tokensTabPanel = page.getByRole("tabpanel", { name: "tokens" }); + await tokensTabPanel.getByTitle("Add token: Color").click(); + + // Create color token with mouse + + await expect(tokensUpdateCreateModal).toBeVisible(); + + const nameField = tokensUpdateCreateModal.getByLabel("Name"); + const valueField = tokensUpdateCreateModal.getByLabel("Value"); + + await nameField.click(); + await nameField.fill("color.primary"); + + await valueField.click(); + await valueField.fill("red"); + + const submitButton = tokensUpdateCreateModal.getByRole("button", { + name: "Save", + }); + await expect(submitButton).toBeEnabled(); + await submitButton.click(); + + await expect(tokensTabPanel.getByText("color.primary")).toBeEnabled(); + + // Create token referencing the previous one with keyboard + + await tokensTabPanel.getByTitle("Add token: Color").click(); + await expect(tokensUpdateCreateModal).toBeVisible(); + + await nameField.click(); + await nameField.fill("color.secondary"); + await nameField.press("Tab"); + + await valueField.click(); + await valueField.fill("{color.primary}"); + + await expect(submitButton).toBeEnabled(); + await nameField.press("Enter"); + + const referenceToken = tokensTabPanel.getByText("color.secondary"); + await expect(referenceToken).toBeEnabled(); + + // Tokens tab panel should have two tokens with the color red / #ff0000 + await expect(tokensTabPanel.getByTitle("#ff0000")).toHaveCount(2); + + // Global set has been auto created and is active + await expect( + tokenThemesSetsSidebar.getByRole("button", { + name: "Global", + }), + ).toHaveCount(1); + await expect( + tokenThemesSetsSidebar.getByRole("button", { + name: "Global", + }), + ).toHaveAttribute("aria-checked", "true"); + }); +}); + +test.describe("Tokens: Sets Tab", () => { + const createSet = async (sidebar, setName, finalKey = "Enter") => { + const tokensTabButton = sidebar + .getByRole("button", { name: "Add set" }) + .click(); + + const setInput = sidebar.locator("input:focus"); + await expect(setInput).toBeVisible(); + await setInput.fill(setName); + await setInput.press(finalKey); + }; + + // test("User creates sets tree structure by entering a set path", async ({ + // page, + // }) => { + // const { + // workspacePage, + // tokenThemesSetsSidebar, + // tokenSetItems, + // tokenSetGroupItems, + // } = await setupFileWithTokens(page); + // + // const tokensTabButton = tokenThemesSetsSidebar + // .getByRole("button", { name: "Add set" }) + // .click(); + // + // await createSet(tokenThemesSetsSidebar, "core/colors/light"); + // await createSet(tokenThemesSetsSidebar, "core/colors/dark"); + // + // // User cancels during editing + // await createSet(tokenThemesSetsSidebar, "core/colors/dark", "Escape"); + // + // await expect(tokenSetItems).toHaveCount(2); + // await expect(tokenSetGroupItems).toHaveCount(2); + // }); +}); diff --git a/frontend/resources/images/icons/broken-link.svg b/frontend/resources/images/icons/broken-link.svg new file mode 100644 index 000000000..4e6ed1273 --- /dev/null +++ b/frontend/resources/images/icons/broken-link.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/resources/images/icons/import-export.svg b/frontend/resources/images/icons/import-export.svg new file mode 100644 index 000000000..26ef0f81a --- /dev/null +++ b/frontend/resources/images/icons/import-export.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/frontend/resources/images/icons/token-status-full.svg b/frontend/resources/images/icons/token-status-full.svg new file mode 100644 index 000000000..a24ba0ce7 --- /dev/null +++ b/frontend/resources/images/icons/token-status-full.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/frontend/resources/images/icons/token-status-non-applied.svg b/frontend/resources/images/icons/token-status-non-applied.svg new file mode 100644 index 000000000..6c9838f0a --- /dev/null +++ b/frontend/resources/images/icons/token-status-non-applied.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/frontend/resources/images/icons/token-status-partial.svg b/frontend/resources/images/icons/token-status-partial.svg new file mode 100644 index 000000000..de17718d2 --- /dev/null +++ b/frontend/resources/images/icons/token-status-partial.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/frontend/resources/styles/common/refactor/spacing.scss b/frontend/resources/styles/common/refactor/spacing.scss index fcc536563..c903c96f3 100644 --- a/frontend/resources/styles/common/refactor/spacing.scss +++ b/frontend/resources/styles/common/refactor/spacing.scss @@ -152,6 +152,7 @@ $s-648: #{0.25 * 162}rem; $s-664: #{0.25 * 166}rem; $s-688: #{0.25 * 172}rem; $s-712: #{0.25 * 178}rem; +$s-720: #{0.25 * 180}rem; $s-736: #{0.25 * 184}rem; $s-744: #{0.25 * 186}rem; $s-800: #{0.25 * 200}rem; diff --git a/frontend/src/app/main/data/tokens.cljs b/frontend/src/app/main/data/tokens.cljs index dbd3358c7..e70f557bf 100644 --- a/frontend/src/app/main/data/tokens.cljs +++ b/frontend/src/app/main/data/tokens.cljs @@ -6,20 +6,18 @@ (ns app.main.data.tokens (:require - [app.common.data :as d] [app.common.data.macros :as dm] [app.common.files.changes-builder :as pcb] [app.common.geom.point :as gpt] + [app.common.logic.tokens :as clt] [app.common.types.shape :as cts] [app.common.types.tokens-lib :as ctob] [app.main.data.changes :as dch] [app.main.data.workspace.shapes :as dwsh] [app.main.refs :as refs] - [app.main.ui.workspace.tokens.token :as wtt] [app.main.ui.workspace.tokens.token-set :as wtts] [app.main.ui.workspace.tokens.update :as wtu] [beicon.v2.core :as rx] - [clojure.data :as data] [cuerdas.core :as str] [potok.v2.core :as ptk])) @@ -51,57 +49,25 @@ ;; TOKENS Actions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defn toggle-or-apply-token - "Remove any shape attributes from token if they exists. - Othewise apply token attributes." - [shape token] - (let [[shape-leftover token-leftover _matching] (data/diff (:applied-tokens shape) token)] - (merge {} shape-leftover token-leftover))) - -(defn token-from-attributes [token attributes] - (->> (map (fn [attr] [attr (wtt/token-identifier token)]) attributes) - (into {}))) - -(defn unapply-token-id [shape attributes] - (update shape :applied-tokens d/without-keys attributes)) - -(defn apply-token-to-attributes [{:keys [shape token attributes]}] - (let [token (token-from-attributes token attributes)] - (toggle-or-apply-token shape token))) - -(defn apply-token-to-shape - [{:keys [shape token attributes] :as _props}] - (let [applied-tokens (apply-token-to-attributes {:shape shape - :token token - :attributes attributes})] - (update shape :applied-tokens #(merge % applied-tokens)))) - -(defn maybe-apply-token-to-shape - "When the passed `:token` is non-nil apply it to the `:applied-tokens` on a shape." - [{:keys [shape token _attributes] :as props}] - (if token - (apply-token-to-shape props) - shape)) - (defn get-token-data-from-token-id [id] (let [workspace-data (deref refs/workspace-data)] (get (:tokens workspace-data) id))) -(defn set-selected-token-set-id - [id] - (ptk/reify ::set-selected-token-set-id +(defn set-selected-token-set-path + [full-path] + (ptk/reify ::set-selected-token-set-path ptk/UpdateEvent (update [_ state] - (wtts/assoc-selected-token-set-id state id)))) + (wtts/assoc-selected-token-set-path state full-path)))) -(defn set-selected-token-set-id-from-name +(defn set-selected-token-set-path-from-name [token-set-name] - (ptk/reify ::set-selected-token-set-id-from-name + (ptk/reify ::set-selected-token-set-path-from-name ptk/UpdateEvent (update [_ state] - (->> (ctob/set-name->set-path-string token-set-name) - (wtts/assoc-selected-token-set-id state))))) + (->> (ctob/set-name-string->prefixed-set-path-string token-set-name) + (wtts/assoc-selected-token-set-path state))))) (defn create-token-theme [token-theme] (let [new-token-theme token-theme] @@ -165,9 +131,19 @@ (let [changes (-> (pcb/empty-changes it) (pcb/add-token-set new-token-set))] (rx/of - (set-selected-token-set-id-from-name (:name new-token-set)) + (set-selected-token-set-path-from-name (:name new-token-set)) (dch/commit-changes changes))))))) +(defn rename-token-set-group [from-path-str to-path-str] + (ptk/reify ::rename-token-set-group + ptk/WatchEvent + (watch [it _state _] + (let [changes (-> (pcb/empty-changes it) + (pcb/rename-token-set-group from-path-str to-path-str))] + (rx/of + (set-selected-token-set-path-from-name to-path-str) + (dch/commit-changes changes)))))) + (defn update-token-set [set-name token-set] (ptk/reify ::update-token-set ptk/WatchEvent @@ -177,28 +153,25 @@ changes (-> (pcb/empty-changes it) (pcb/update-token-set token-set prev-token-set))] (rx/of - (set-selected-token-set-id-from-name (:name token-set)) + (set-selected-token-set-path-from-name (:name token-set)) (dch/commit-changes changes)))))) (defn toggle-token-set [{:keys [token-set-name]}] (ptk/reify ::toggle-token-set ptk/WatchEvent - (watch [it state _] - (let [tokens-lib (get-tokens-lib state) - prev-theme (ctob/get-theme tokens-lib ctob/hidden-token-theme-group ctob/hidden-token-theme-name) - active-token-set-names (ctob/get-active-themes-set-names tokens-lib) - theme (-> (or (some-> prev-theme - (ctob/set-sets active-token-set-names)) - (ctob/make-hidden-token-theme :sets active-token-set-names)) - (ctob/toggle-set token-set-name)) - prev-active-token-themes (ctob/get-active-theme-paths tokens-lib) - changes (-> (pcb/empty-changes it) - (pcb/update-active-token-themes #{(ctob/token-theme-path ctob/hidden-token-theme-group ctob/hidden-token-theme-name)} prev-active-token-themes)) - changes' (if prev-theme - (pcb/update-token-theme changes theme prev-theme) - (pcb/add-token-theme changes theme))] + (watch [_ state _] + (let [changes (clt/generate-toggle-token-set (pcb/empty-changes) (get-tokens-lib state) token-set-name)] (rx/of - (dch/commit-changes changes') + (dch/commit-changes changes) + (wtu/update-workspace-tokens)))))) + +(defn toggle-token-set-group [{:keys [prefixed-path-str]}] + (ptk/reify ::toggle-token-set-group + ptk/WatchEvent + (watch [_ state _] + (let [changes (clt/generate-toggle-token-set-group (pcb/empty-changes) (get-tokens-lib state) prefixed-path-str)] + (rx/of + (dch/commit-changes changes) (wtu/update-workspace-tokens)))))) (defn import-tokens-lib [lib] @@ -210,7 +183,7 @@ (ctob/get-sets) (first) (:name) - (set-selected-token-set-id-from-name)) + (set-selected-token-set-path-from-name)) changes (-> (pcb/empty-changes it) (pcb/with-library-data data) (pcb/set-tokens-lib lib))] @@ -219,14 +192,14 @@ update-token-set-change (wtu/update-workspace-tokens)))))) -(defn delete-token-set-path [token-set-path] +(defn delete-token-set-path [prefixed-full-set-path] (ptk/reify ::delete-token-set-path ptk/WatchEvent (watch [it state _] (let [data (get state :workspace-data) changes (-> (pcb/empty-changes it) (pcb/with-library-data data) - (pcb/delete-token-set-path token-set-path))] + (pcb/delete-token-set-path prefixed-full-set-path))] (rx/of (dch/commit-changes changes) (wtu/update-workspace-tokens)))))) @@ -276,7 +249,7 @@ (pcb/update-token (pcb/empty-changes) (:name token-set) token prev-token) (pcb/add-token (pcb/empty-changes) (:name token-set) token)))] (rx/of - (set-selected-token-set-id-from-name token-set-name) + (set-selected-token-set-path-from-name token-set-name) (dch/commit-changes changes)))))) (defn delete-token diff --git a/frontend/src/app/main/data/workspace/colors.cljs b/frontend/src/app/main/data/workspace/colors.cljs index 709cc739d..43425d449 100644 --- a/frontend/src/app/main/data/workspace/colors.cljs +++ b/frontend/src/app/main/data/workspace/colors.cljs @@ -82,45 +82,46 @@ (assoc-in [:workspace-global :picked-shift?] shift?))))) (defn transform-fill - [state ids color transform] - (let [objects (wsh/lookup-page-objects state) + ([state ids color transform] (transform-fill state ids color transform nil)) + ([state ids color transform options] + (let [objects (wsh/lookup-page-objects state) - is-text? #(= :text (:type (get objects %))) - text-ids (filter is-text? ids) - shape-ids (remove is-text? ids) + is-text? #(= :text (:type (get objects %))) + text-ids (filter is-text? ids) + shape-ids (remove is-text? ids) - undo-id (js/Symbol) + undo-id (js/Symbol) - attrs - (cond-> {} - (contains? color :color) - (assoc :fill-color (:color color)) + attrs + (cond-> {} + (contains? color :color) + (assoc :fill-color (:color color)) - (contains? color :id) - (assoc :fill-color-ref-id (:id color)) + (contains? color :id) + (assoc :fill-color-ref-id (:id color)) - (contains? color :file-id) - (assoc :fill-color-ref-file (:file-id color)) + (contains? color :file-id) + (assoc :fill-color-ref-file (:file-id color)) - (contains? color :gradient) - (assoc :fill-color-gradient (:gradient color)) + (contains? color :gradient) + (assoc :fill-color-gradient (:gradient color)) - (contains? color :opacity) - (assoc :fill-opacity (:opacity color)) + (contains? color :opacity) + (assoc :fill-opacity (:opacity color)) - (contains? color :image) - (assoc :fill-image (:image color)) + (contains? color :image) + (assoc :fill-image (:image color)) - :always - (d/without-nils)) + :always + (d/without-nils)) - transform-attrs #(transform % attrs)] + transform-attrs #(transform % attrs)] - (rx/concat - (rx/of (dwu/start-undo-transaction undo-id)) - (rx/from (map #(dwt/update-text-with-function % transform-attrs) text-ids)) - (rx/of (dwsh/update-shapes shape-ids transform-attrs)) - (rx/of (dwu/commit-undo-transaction undo-id))))) + (rx/concat + (rx/of (dwu/start-undo-transaction undo-id)) + (rx/from (map #(dwt/update-text-with-function % transform-attrs options) text-ids)) + (rx/of (dwsh/update-shapes shape-ids transform-attrs options)) + (rx/of (dwu/commit-undo-transaction undo-id)))))) (defn swap-attrs [shape attr index new-index] (let [first (get-in shape [attr index]) @@ -146,81 +147,86 @@ (rx/of (dwsh/update-shapes shape-ids transform-attrs))))))) (defn change-fill - [ids color position] - (ptk/reify ::change-fill - ptk/WatchEvent - (watch [_ state _] - (let [change-fn (fn [shape attrs] - (-> shape - (cond-> (not (contains? shape :fills)) - (assoc :fills [])) - (assoc-in [:fills position] (into {} attrs))))] - (transform-fill state ids color change-fn))))) + ([ids color position] (change-fill ids color position nil)) + ([ids color position options] + (ptk/reify ::change-fill + ptk/WatchEvent + (watch [_ state _] + (let [change-fn (fn [shape attrs] + (-> shape + (cond-> (not (contains? shape :fills)) + (assoc :fills [])) + (assoc-in [:fills position] (into {} attrs))))] + (transform-fill state ids color change-fn options)))))) (defn change-fill-and-clear - [ids color] - (ptk/reify ::change-fill-and-clear - ptk/WatchEvent - (watch [_ state _] - (let [set (fn [shape attrs] (assoc shape :fills [attrs]))] - (transform-fill state ids color set))))) + ([ids color] (change-fill-and-clear ids color nil)) + ([ids color options] + (ptk/reify ::change-fill-and-clear + ptk/WatchEvent + (watch [_ state _] + (let [set (fn [shape attrs] (assoc shape :fills [attrs]))] + (transform-fill state ids color set options)))))) (defn add-fill - [ids color] + ([ids color] (add-fill ids color nil)) + ([ids color options] - (dm/assert! - "expected a valid color struct" - (ctc/check-color! color)) + (dm/assert! + "expected a valid color struct" + (ctc/check-color! color)) - (dm/assert! - "expected a valid coll of uuid's" - (every? uuid? ids)) + (dm/assert! + "expected a valid coll of uuid's" + (every? uuid? ids)) - (ptk/reify ::add-fill - ptk/WatchEvent - (watch [_ state _] - (let [add (fn [shape attrs] - (-> shape - (update :fills #(into [attrs] %))))] - (transform-fill state ids color add))))) + (ptk/reify ::add-fill + ptk/WatchEvent + (watch [_ state _] + (let [add (fn [shape attrs] + (-> shape + (update :fills #(into [attrs] %))))] + (transform-fill state ids color add options)))))) (defn remove-fill - [ids color position] + ([ids color position] (remove-fill ids color position nil)) + ([ids color position options] - (dm/assert! - "expected a valid color struct" - (ctc/check-color! color)) + (dm/assert! + "expected a valid color struct" + (ctc/check-color! color)) - (dm/assert! - "expected a valid coll of uuid's" - (every? uuid? ids)) + (dm/assert! + "expected a valid coll of uuid's" + (every? uuid? ids)) - (ptk/reify ::remove-fill - ptk/WatchEvent - (watch [_ state _] - (let [remove-fill-by-index (fn [values index] (->> (d/enumerate values) - (filterv (fn [[idx _]] (not= idx index))) - (mapv second))) + (ptk/reify ::remove-fill + ptk/WatchEvent + (watch [_ state _] + (let [remove-fill-by-index (fn [values index] (->> (d/enumerate values) + (filterv (fn [[idx _]] (not= idx index))) + (mapv second))) - remove (fn [shape _] (update shape :fills remove-fill-by-index position))] - (transform-fill state ids color remove))))) + remove (fn [shape _] (update shape :fills remove-fill-by-index position))] + (transform-fill state ids color remove options)))))) (defn remove-all-fills - [ids color] + ([ids color] (remove-all-fills ids color nil)) + ([ids color options] - (dm/assert! - "expected a valid color struct" - (ctc/check-color! color)) + (dm/assert! + "expected a valid color struct" + (ctc/check-color! color)) - (dm/assert! - "expected a valid coll of uuid's" - (every? uuid? ids)) + (dm/assert! + "expected a valid coll of uuid's" + (every? uuid? ids)) - (ptk/reify ::remove-all-fills - ptk/WatchEvent - (watch [_ state _] - (let [remove-all (fn [shape _] (assoc shape :fills []))] - (transform-fill state ids color remove-all))))) + (ptk/reify ::remove-all-fills + ptk/WatchEvent + (watch [_ state _] + (let [remove-all (fn [shape _] (assoc shape :fills []))] + (transform-fill state ids color remove-all options)))))) (defn change-hide-fill-on-export [ids hide-fill-on-export] @@ -237,56 +243,58 @@ (d/merge shape attrs) shape)))))))) (defn change-stroke - [ids attrs index] - (ptk/reify ::change-stroke - ptk/WatchEvent - (watch [_ _ _] - (let [color-attrs (cond-> {} - (contains? attrs :color) - (assoc :stroke-color (:color attrs)) + ([ids attrs index] (change-stroke ids attrs index nil)) + ([ids attrs index options] + (ptk/reify ::change-stroke + ptk/WatchEvent + (watch [_ _ _] + (let [color-attrs (cond-> {} + (contains? attrs :color) + (assoc :stroke-color (:color attrs)) - (contains? attrs :id) - (assoc :stroke-color-ref-id (:id attrs)) + (contains? attrs :id) + (assoc :stroke-color-ref-id (:id attrs)) - (contains? attrs :file-id) - (assoc :stroke-color-ref-file (:file-id attrs)) + (contains? attrs :file-id) + (assoc :stroke-color-ref-file (:file-id attrs)) - (contains? attrs :gradient) - (assoc :stroke-color-gradient (:gradient attrs)) + (contains? attrs :gradient) + (assoc :stroke-color-gradient (:gradient attrs)) - (contains? attrs :opacity) - (assoc :stroke-opacity (:opacity attrs)) + (contains? attrs :opacity) + (assoc :stroke-opacity (:opacity attrs)) - (contains? attrs :image) - (assoc :stroke-image (:image attrs))) + (contains? attrs :image) + (assoc :stroke-image (:image attrs))) - attrs (-> - (merge attrs color-attrs) - (dissoc :image) - (dissoc :gradient))] + attrs (-> + (merge attrs color-attrs) + (dissoc :image) + (dissoc :gradient))] - (rx/of (dwsh/update-shapes - ids - (fn [shape] - (let [new-attrs (merge (get-in shape [:strokes index]) attrs) - new-attrs (cond-> new-attrs - (not (contains? new-attrs :stroke-width)) - (assoc :stroke-width 1) + (rx/of (dwsh/update-shapes + ids + (fn [shape] + (let [new-attrs (merge (get-in shape [:strokes index]) attrs) + new-attrs (cond-> new-attrs + (not (contains? new-attrs :stroke-width)) + (assoc :stroke-width 1) - (not (contains? new-attrs :stroke-style)) - (assoc :stroke-style :solid) + (not (contains? new-attrs :stroke-style)) + (assoc :stroke-style :solid) - (not (contains? new-attrs :stroke-alignment)) - (assoc :stroke-alignment :center) + (not (contains? new-attrs :stroke-alignment)) + (assoc :stroke-alignment :inner) - :always - (d/without-nils))] - (cond-> shape - (not (contains? shape :strokes)) - (assoc :strokes []) + :always + (d/without-nils))] + (cond-> shape + (not (contains? shape :strokes)) + (assoc :strokes []) - :always - (assoc-in [:strokes index] new-attrs)))))))))) + :always + (assoc-in [:strokes index] new-attrs)))) + options))))))) (defn change-shadow [ids attrs index] diff --git a/frontend/src/app/main/data/workspace/libraries.cljs b/frontend/src/app/main/data/workspace/libraries.cljs index 6a6ac39dd..3461de888 100644 --- a/frontend/src/app/main/data/workspace/libraries.cljs +++ b/frontend/src/app/main/data/workspace/libraries.cljs @@ -824,7 +824,6 @@ (rx/map #(reset-component %) (rx/from ids)) (rx/of (dwu/commit-undo-transaction undo-id))))))) - (defn update-component "Modify the component linked to the shape with the given id, in the current page, so that all attributes of its shapes are equal to the diff --git a/frontend/src/app/main/data/workspace/modifiers.cljs b/frontend/src/app/main/data/workspace/modifiers.cljs index cde48b4d9..c2d75abf6 100644 --- a/frontend/src/app/main/data/workspace/modifiers.cljs +++ b/frontend/src/app/main/data/workspace/modifiers.cljs @@ -465,8 +465,10 @@ ([] (apply-modifiers nil)) - ([{:keys [modifiers undo-transation? stack-undo? ignore-constraints ignore-snap-pixel undo-group] - :or {undo-transation? true stack-undo? false ignore-constraints false ignore-snap-pixel false}}] + ([{:keys [modifiers undo-transation? stack-undo? ignore-constraints + ignore-snap-pixel ignore-touched undo-group] + :or {undo-transation? true stack-undo? false ignore-constraints false + ignore-snap-pixel false ignore-touched false}}] (ptk/reify ::apply-modifiers ptk/WatchEvent (watch [_ state _] @@ -515,6 +517,7 @@ {:reg-objects? true :stack-undo? stack-undo? :ignore-tree ignore-tree + :ignore-touched ignore-touched :undo-group undo-group ;; Attributes that can change in the transform. This way we don't have to check ;; all the attributes diff --git a/frontend/src/app/main/data/workspace/shape_layout.cljs b/frontend/src/app/main/data/workspace/shape_layout.cljs index 7a2db7bcc..e910fafec 100644 --- a/frontend/src/app/main/data/workspace/shape_layout.cljs +++ b/frontend/src/app/main/data/workspace/shape_layout.cljs @@ -262,15 +262,16 @@ (rx/of (with-meta event (meta it))))))))) (defn update-layout - [ids changes] - (ptk/reify ::update-layout - ptk/WatchEvent - (watch [_ _ _] - (let [undo-id (js/Symbol)] - (rx/of (dwu/start-undo-transaction undo-id) - (dwsh/update-shapes ids (d/patch-object changes)) - (ptk/data-event :layout/update {:ids ids}) - (dwu/commit-undo-transaction undo-id)))))) + ([ids changes] (update-layout ids changes nil)) + ([ids changes options] + (ptk/reify ::update-layout + ptk/WatchEvent + (watch [_ _ _] + (let [undo-id (js/Symbol)] + (rx/of (dwu/start-undo-transaction undo-id) + (dwsh/update-shapes ids (d/patch-object changes) options) + (ptk/data-event :layout/update {:ids ids}) + (dwu/commit-undo-transaction undo-id))))))) (defn add-layout-track ([ids type value] @@ -518,27 +519,28 @@ (assoc :layout-item-v-sizing :fix)))) (defn update-layout-child - [ids changes] - (ptk/reify ::update-layout-child - ptk/WatchEvent - (watch [_ state _] - (let [objects (wsh/lookup-page-objects state) - children-ids (->> ids (mapcat #(cfh/get-children-ids objects %))) - parent-ids (->> ids (map #(cfh/get-parent-id objects %))) - undo-id (js/Symbol)] - (rx/of (dwu/start-undo-transaction undo-id) - (dwsh/update-shapes ids (d/patch-object changes)) - (dwsh/update-shapes children-ids (partial fix-child-sizing objects changes)) - (dwsh/update-shapes - parent-ids - (fn [parent objects] - (-> parent - (fix-parent-sizing objects (set ids) changes) - (cond-> (ctl/grid-layout? parent) - (ctl/assign-cells objects)))) - {:with-objects? true}) - (ptk/data-event :layout/update {:ids ids}) - (dwu/commit-undo-transaction undo-id)))))) + ([ids changes] (update-layout-child ids changes nil)) + ([ids changes options] + (ptk/reify ::update-layout-child + ptk/WatchEvent + (watch [_ state _] + (let [objects (wsh/lookup-page-objects state) + children-ids (->> ids (mapcat #(cfh/get-children-ids objects %))) + parent-ids (->> ids (map #(cfh/get-parent-id objects %))) + undo-id (js/Symbol)] + (rx/of (dwu/start-undo-transaction undo-id) + (dwsh/update-shapes ids (d/patch-object changes) options) + (dwsh/update-shapes children-ids (partial fix-child-sizing objects changes) options) + (dwsh/update-shapes + parent-ids + (fn [parent objects] + (-> parent + (fix-parent-sizing objects (set ids) changes) + (cond-> (ctl/grid-layout? parent) + (ctl/assign-cells objects)))) + (merge options {:with-objects? true})) + (ptk/data-event :layout/update {:ids ids}) + (dwu/commit-undo-transaction undo-id))))))) (defn update-grid-cells [layout-id ids props] diff --git a/frontend/src/app/main/data/workspace/texts.cljs b/frontend/src/app/main/data/workspace/texts.cljs index 0ff5809be..b0c69130e 100644 --- a/frontend/src/app/main/data/workspace/texts.cljs +++ b/frontend/src/app/main/data/workspace/texts.cljs @@ -434,49 +434,50 @@ (txt/transform-nodes (some-fn txt/is-text-node? txt/is-paragraph-node?) migrate-node content)) (defn update-text-with-function - [id update-node-fn] - (ptk/reify ::update-text-with-function - ptk/UpdateEvent - (update [_ state] - (d/update-in-when state [:workspace-editor-state id] ted/update-editor-current-inline-styles-fn (comp update-node-fn migrate-node))) + ([id update-node-fn] (update-text-with-function id update-node-fn nil)) + ([id update-node-fn options] + (ptk/reify ::update-text-with-function + ptk/UpdateEvent + (update [_ state] + (d/update-in-when state [:workspace-editor-state id] ted/update-editor-current-inline-styles-fn (comp update-node-fn migrate-node))) - ptk/WatchEvent - (watch [_ state _] - (when (or - (and (features/active-feature? state "text-editor/v2") (nil? (:workspace-editor state))) - (and (not (features/active-feature? state "text-editor/v2")) (nil? (get-in state [:workspace-editor-state id])))) - (let [objects (wsh/lookup-page-objects state) - shape (get objects id) + ptk/WatchEvent + (watch [_ state _] + (when (or + (and (features/active-feature? state "text-editor/v2") (nil? (:workspace-editor state))) + (and (not (features/active-feature? state "text-editor/v2")) (nil? (get-in state [:workspace-editor-state id])))) + (let [objects (wsh/lookup-page-objects state) + shape (get objects id) - update-node? (some-fn txt/is-text-node? txt/is-paragraph-node?) + update-node? (some-fn txt/is-text-node? txt/is-paragraph-node?) - shape-ids - (cond - (cfh/text-shape? shape) [id] - (cfh/group-shape? shape) (cfh/get-children-ids objects id)) + shape-ids + (cond + (cfh/text-shape? shape) [id] + (cfh/group-shape? shape) (cfh/get-children-ids objects id)) - update-content - (fn [content] - (->> content - (migrate-content) - (txt/transform-nodes update-node? update-node-fn))) + update-content + (fn [content] + (->> content + (migrate-content) + (txt/transform-nodes update-node? update-node-fn))) - update-shape - (fn [shape] - (-> shape - (dissoc :fills) - (d/update-when :content update-content)))] - (rx/of (dwsh/update-shapes shape-ids update-shape))))) + update-shape + (fn [shape] + (-> shape + (dissoc :fills) + (d/update-when :content update-content)))] + (rx/of (dwsh/update-shapes shape-ids update-shape options))))) - ptk/EffectEvent - (effect [_ state _] - (when (features/active-feature? state "text-editor/v2") - (let [instance (:workspace-editor state) - styles (some-> (editor.v2/getCurrentStyle instance) - (styles/get-styles-from-style-declaration) - ((comp update-node-fn migrate-node)) - (styles/attrs->styles))] - (editor.v2/applyStylesToSelection instance styles)))))) + ptk/EffectEvent + (effect [_ state _] + (when (features/active-feature? state "text-editor/v2") + (let [instance (:workspace-editor state) + styles (some-> (editor.v2/getCurrentStyle instance) + (styles/get-styles-from-style-declaration) + ((comp update-node-fn migrate-node)) + (styles/attrs->styles))] + (editor.v2/applyStylesToSelection instance styles))))))) ;; --- RESIZE UTILS diff --git a/frontend/src/app/main/data/workspace/transforms.cljs b/frontend/src/app/main/data/workspace/transforms.cljs index c4e2a8064..3c157498f 100644 --- a/frontend/src/app/main/data/workspace/transforms.cljs +++ b/frontend/src/app/main/data/workspace/transforms.cljs @@ -301,30 +301,31 @@ (defn update-dimensions "Change size of shapes, from the sideber options form. Will ignore pixel snap used in the options side panel" - [ids attr value] - (dm/assert! (number? value)) - (dm/assert! - "expected valid coll of uuids" - (every? uuid? ids)) - (dm/assert! - "expected valid attr" - (contains? #{:width :height} attr)) - (ptk/reify ::update-dimensions - ptk/UpdateEvent - (update [_ state] - (let [objects (wsh/lookup-page-objects state) - get-modifier - (fn [shape] (ctm/change-dimensions-modifiers shape attr value)) + ([ids attr value] (update-dimensions ids attr value nil)) + ([ids attr value options] + (dm/assert! (number? value)) + (dm/assert! + "expected valid coll of uuids" + (every? uuid? ids)) + (dm/assert! + "expected valid attr" + (contains? #{:width :height} attr)) + (ptk/reify ::update-dimensions + ptk/UpdateEvent + (update [_ state] + (let [objects (wsh/lookup-page-objects state) + get-modifier + (fn [shape] (ctm/change-dimensions-modifiers shape attr value)) - modif-tree - (-> (dwm/build-modif-tree ids objects get-modifier) - (gm/set-objects-modifiers objects))] + modif-tree + (-> (dwm/build-modif-tree ids objects get-modifier) + (gm/set-objects-modifiers objects))] - (assoc state :workspace-modifiers modif-tree))) + (assoc state :workspace-modifiers modif-tree))) - ptk/WatchEvent - (watch [_ _ _] - (rx/of (dwm/apply-modifiers))))) + ptk/WatchEvent + (watch [_ _ _] + (rx/of (dwm/apply-modifiers options)))))) (defn change-orientation "Change orientation of shapes, from the sidebar options form. @@ -402,7 +403,7 @@ "Rotate shapes a fixed angle, from a keyboard action." ([ids rotation] (increase-rotation ids rotation nil)) - ([ids rotation params] + ([ids rotation params & options] (ptk/reify ::increase-rotation ptk/WatchEvent (watch [_ state _] @@ -411,7 +412,7 @@ shapes (->> ids (map #(get objects %)))] (rx/concat (rx/of (dwm/set-delta-rotation-modifiers rotation shapes params)) - (rx/of (dwm/apply-modifiers)))))))) + (rx/of (dwm/apply-modifiers options)))))))) ;; -- Move ---------------------------------------------------------- diff --git a/frontend/src/app/main/refs.cljs b/frontend/src/app/main/refs.cljs index 04a099208..e87a6370b 100644 --- a/frontend/src/app/main/refs.cljs +++ b/frontend/src/app/main/refs.cljs @@ -453,8 +453,8 @@ (def workspace-token-themes-no-hidden (l/derived #(remove ctob/hidden-temporary-theme? %) workspace-token-themes)) -(def workspace-selected-token-set-id - (l/derived wtts/get-selected-token-set-id st/state)) +(def workspace-selected-token-set-path + (l/derived wtts/get-selected-token-set-path st/state)) (def workspace-token-set-group-selected? (l/derived wtts/token-group-selected? st/state)) @@ -468,6 +468,14 @@ (def workspace-active-theme-paths (l/derived (d/nilf ctob/get-active-theme-paths) tokens-lib)) +(defn token-sets-at-path-all-active + [prefixed-path] + (l/derived + (fn [lib] + (when lib + (ctob/sets-at-path-all-active? lib prefixed-path))) + tokens-lib)) + (def workspace-active-theme-paths-no-hidden (l/derived #(disj % ctob/hidden-token-theme-path) workspace-active-theme-paths)) diff --git a/frontend/src/app/main/ui/components/select.cljs b/frontend/src/app/main/ui/components/select.cljs index 0187499e6..fba040fbf 100644 --- a/frontend/src/app/main/ui/components/select.cljs +++ b/frontend/src/app/main/ui/components/select.cljs @@ -86,6 +86,11 @@ (mf/with-effect [default-value] (swap! state* assoc :current-value default-value)) + (mf/with-effect [is-open?] + (when (and (not= 0 (mf/ref-val dropdown-direction-change*)) (= false is-open?)) + (reset! dropdown-direction* "down") + (mf/set-ref-val! dropdown-direction-change* 0))) + (mf/with-effect [is-open? dropdown-element*] (let [dropdown-element (mf/ref-val dropdown-element*)] (when (and (= 0 (mf/ref-val dropdown-direction-change*)) dropdown-element) diff --git a/frontend/src/app/main/ui/ds.cljs b/frontend/src/app/main/ui/ds.cljs index 19623bffa..b17332ab6 100644 --- a/frontend/src/app/main/ui/ds.cljs +++ b/frontend/src/app/main/ui/ds.cljs @@ -17,6 +17,7 @@ [app.main.ui.ds.foundations.typography :refer [typography-list]] [app.main.ui.ds.foundations.typography.heading :refer [heading*]] [app.main.ui.ds.foundations.typography.text :refer [text*]] + [app.main.ui.ds.foundations.utilities.token.token-status :refer [token-status-icon* token-status-list]] [app.main.ui.ds.layout.tab-switcher :refer [tab-switcher*]] [app.main.ui.ds.notifications.toast :refer [toast*]] [app.main.ui.ds.product.empty-placeholder :refer [empty-placeholder*]] @@ -43,9 +44,11 @@ :Text text* :TabSwitcher tab-switcher* :Toast toast* + :TokenStatusIcon token-status-icon* :Swatch swatch* ;; meta / misc :meta #js {:icons (clj->js (sort icon-list)) + :tokenStatus (clj->js (sort token-status-list)) :svgs (clj->js (sort raw-svg-list)) :typography (clj->js typography-list)} :storybook #js {:StoryGrid sb/story-grid* diff --git a/frontend/src/app/main/ui/ds/buttons/button.cljs b/frontend/src/app/main/ui/ds/buttons/button.cljs index 73af4824e..a7eb02621 100644 --- a/frontend/src/app/main/ui/ds/buttons/button.cljs +++ b/frontend/src/app/main/ui/ds/buttons/button.cljs @@ -17,20 +17,24 @@ [:class {:optional true} :string] [:icon {:optional true} [:and :string [:fn #(contains? icon-list %)]]] + [:on-ref {:optional true} fn?] [:variant {:optional true} [:maybe [:enum "primary" "secondary" "ghost" "destructive"]]]]) (mf/defc button* {::mf/props :obj ::mf/schema schema:button} - [{:keys [variant icon children class] :rest props}] + [{:keys [variant icon children class on-ref] :rest props}] (let [variant (or variant "primary") class (dm/str class " " (stl/css-case :button true :button-primary (= variant "primary") :button-secondary (= variant "secondary") :button-ghost (= variant "ghost") :button-destructive (= variant "destructive"))) - props (mf/spread-props props {:class class})] + props (mf/spread-props props {:class class + :ref (fn [node] + (when on-ref + (on-ref node)))})] [:> "button" props (when icon [:> icon* {:icon-id icon :size "m"}]) [:span {:class (stl/css :label-wrapper)} children]])) \ No newline at end of file diff --git a/frontend/src/app/main/ui/ds/colors.scss b/frontend/src/app/main/ui/ds/colors.scss index 6d0823c93..773ee1afc 100644 --- a/frontend/src/app/main/ui/ds/colors.scss +++ b/frontend/src/app/main/ui/ds/colors.scss @@ -22,6 +22,7 @@ $orange-950: #440806; $red-200: #ffcada; $red-400: #c80857; +$red-500: #ff3277; $red-950: #500124; $pink-400: #ff6fe0; @@ -33,6 +34,16 @@ $purple-700: #6911d4; $purple-600-10: #8c33eb1a; $purple-700-60: #6911d499; +$aqua-200: #ddf7ff; +$aqua-400: #77e1f3; +$aqua-600: #59acbb; +$aqua-800: #1d4464; + +$violet-300: #a7a9ff; +$violet-600: #6c6dad; +$violet-700: #484c74; +$violet-800: #272941; + $blue-200: #bae3fd; $blue-500: #0e9be9; $blue-950: #082c49; @@ -72,6 +83,7 @@ $grayish-red: #bfbfbf; --color-background-warning: #{$orange-200}; --color-accent-error: #{$red-400}; --color-background-error: #{$red-200}; + --color-foreground-error: #{$red-500}; --color-accent-info: #{$blue-500}; --color-background-info: #{$blue-200}; @@ -87,6 +99,11 @@ $grayish-red: #bfbfbf; --color-overlay-default: #{$white-60}; --color-overlay-onboarding: #{$white-90}; --color-canvas: #{$grayish-red}; + + --color-token-background: #{$aqua-200}; + --color-token-border: #{$aqua-400}; + --color-token-accent: #{$aqua-600}; + --color-token-foreground: #{$aqua-800}; } :global(.default) { @@ -104,6 +121,7 @@ $grayish-red: #bfbfbf; --color-background-warning: #{$orange-950}; --color-accent-error: #{$red-400}; --color-background-error: #{$red-950}; + --color-foreground-error: #{$red-500}; --color-accent-info: #{$blue-500}; --color-background-info: #{$blue-950}; @@ -119,4 +137,9 @@ $grayish-red: #bfbfbf; --color-overlay-default: #{$gray-950-60}; --color-overlay-onboarding: #{$gray-950-90}; --color-canvas: #{$grayish-red}; + + --color-token-background: #{$violet-800}; + --color-token-border: #{$violet-700}; + --color-token-accent: #{$violet-600}; + --color-token-foreground: #{$violet-300}; } diff --git a/frontend/src/app/main/ui/ds/controls/input.cljs b/frontend/src/app/main/ui/ds/controls/input.cljs index 5637b287f..279e06f9a 100644 --- a/frontend/src/app/main/ui/ds/controls/input.cljs +++ b/frontend/src/app/main/ui/ds/controls/input.cljs @@ -19,8 +19,7 @@ [:class {:optional true} :string] [:icon {:optional true} [:and :string [:fn #(contains? icon-list %)]]] - [:type {:optional true} :string] - [:ref {:optional true} some?]]) + [:type {:optional true} :string]]) (mf/defc input* {::mf/props :obj diff --git a/frontend/src/app/main/ui/ds/foundations/assets/icon.cljs b/frontend/src/app/main/ui/ds/foundations/assets/icon.cljs index 6bd108a5a..e3b83ab97 100644 --- a/frontend/src/app/main/ui/ds/foundations/assets/icon.cljs +++ b/frontend/src/app/main/ui/ds/foundations/assets/icon.cljs @@ -63,6 +63,7 @@ (def ^:icon-id boolean-flatten "boolean-flatten") (def ^:icon-id boolean-intersection "boolean-intersection") (def ^:icon-id boolean-union "boolean-union") +(def ^:icon-id broken-link "broken-link") (def ^:icon-id bug "bug") (def ^:icon-id character-a "character-a") (def ^:icon-id character-b "character-b") @@ -165,6 +166,7 @@ (def ^:icon-id icon "icon") (def ^:icon-id img "img") (def ^:icon-id info "info") +(def ^:icon-id import-export "import-export") (def ^:icon-id interaction "interaction") (def ^:icon-id join-nodes "join-nodes") (def ^:icon-id justify-content-column-around "justify-content-column-around") diff --git a/frontend/src/app/main/ui/ds/foundations/utilities/token/token_status.cljs b/frontend/src/app/main/ui/ds/foundations/utilities/token/token_status.cljs new file mode 100644 index 000000000..482087f0e --- /dev/null +++ b/frontend/src/app/main/ui/ds/foundations/utilities/token/token_status.cljs @@ -0,0 +1,28 @@ +(ns app.main.ui.ds.foundations.utilities.token.token-status + (:require-macros + [app.common.data.macros :as dm] + [app.main.style :as stl]) + (:require + [app.main.ui.ds.foundations.assets.icon :refer [collect-icons]] + [rumext.v2 :as mf])) + +(def ^:icon-id token-status-partial "token-status-partial") +(def ^:icon-id token-status-full "token-status-full") +(def ^:icon-id token-status-non-applied "token-status-non-applied") + +(def token-status-list "A collection of all status" (collect-icons)) + +(def ^:private schema:token-status-icon + [:map + [:class {:optional true} :string] + [:id [:and :string [:fn #(contains? token-status-list %)]]]]) + +(mf/defc token-status-icon* + {::mf/props :obj + ::mf/schema schema:token-status-icon} + [{:keys [id class] :rest props}] + (let [class (dm/str (or class "") " " (stl/css :token-icon)) + props (mf/spread-props props {:class class :width "14px" :height "14px"}) + offset 0] + [:> "svg" props + [:use {:href (dm/str "#icon-" id) :width "14px" :height "14px" :x offset :y offset}]])) diff --git a/frontend/src/app/main/ui/ds/foundations/utilities/token/token_status.mdx b/frontend/src/app/main/ui/ds/foundations/utilities/token/token_status.mdx new file mode 100644 index 000000000..5d4fe3b59 --- /dev/null +++ b/frontend/src/app/main/ui/ds/foundations/utilities/token/token_status.mdx @@ -0,0 +1,31 @@ +import { Canvas, Meta } from '@storybook/blocks'; +import * as TokenStatusIconStories from "./token_status.stories" + + + +# Token status icons + +## Technical notes + +There are some SVG that are not regular icons, and that are only +meant to be used on token components. + +They represent the applied status of a token over a shape. + +The assets are located in the `frontend/resources/images/icons` folder. + +### Using asset IDs + +For convenience, icons IDs are available in the component namespace. + +```clj +(ns app.main.ui.foo + (:require + [app.main.ui.ds.foundations.utilities.token.token-status :refer [token-status-icon*] :as ts])) +``` + +```clj +[:> token-status-icon* + {:id ts/token-status-partial + :class (stl/css :token-pill-icon)}] +``` diff --git a/frontend/src/app/main/ui/ds/foundations/utilities/token/token_status.scss b/frontend/src/app/main/ui/ds/foundations/utilities/token/token_status.scss new file mode 100644 index 000000000..207b2236a --- /dev/null +++ b/frontend/src/app/main/ui/ds/foundations/utilities/token/token_status.scss @@ -0,0 +1,10 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. +// +// Copyright (c) KALEIDOS INC + +.token-icon { + fill: currentColor; + stroke: none; +} diff --git a/frontend/src/app/main/ui/ds/foundations/utilities/token/token_status.stories.jsx b/frontend/src/app/main/ui/ds/foundations/utilities/token/token_status.stories.jsx new file mode 100644 index 000000000..84cce010c --- /dev/null +++ b/frontend/src/app/main/ui/ds/foundations/utilities/token/token_status.stories.jsx @@ -0,0 +1,23 @@ +import * as React from "react"; +import Components from "@target/components"; + +const { TokenStatusIcon } = Components; +const { tokenStatus } = Components.meta; + +export default { + title: "Foundations/Utilities/TokenStatus", + component: TokenStatusIcon, + argTypes: { + id: { + options: tokenStatus, + control: { type: "select" }, + }, + }, + render: ({ ...args }) => , +}; + +export const Default = { + args: { + id: "token-status-full", + }, +}; diff --git a/frontend/src/app/main/ui/ds/utilities/swatch.cljs b/frontend/src/app/main/ui/ds/utilities/swatch.cljs index bfce203c8..d8cbd9657 100644 --- a/frontend/src/app/main/ui/ds/utilities/swatch.cljs +++ b/frontend/src/app/main/ui/ds/utilities/swatch.cljs @@ -7,70 +7,77 @@ (ns app.main.ui.ds.utilities.swatch (:require-macros + [app.main.style :as stl]) + (:require + [app.common.data.macros :as dm] + [app.common.json :as json] + [app.common.schema :as sm] + [app.common.types.color :as ct] + [app.config :as cfg] + [app.util.color :as uc] + [app.util.i18n :refer [tr]] [cuerdas.core :as str] [rumext.v2 :as mf])) (def ^:private schema:swatch - [:map - [:background :string] + [:map {:title "SchemaSwatch"} + [:background {:optional true} ct/schema:color] [:class {:optional true} :string] - [:format {:optional true} [:enum "square" "rounded"]] [:size {:optional true} [:enum "small" "medium"]] [:active {:optional true} :boolean] [:on-click {:optional true} fn?]]) -(def hex-regex #"^#(?:[0-9a-fA-F]{3}){1,2}$") -(def rgb-regex #"^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$") -(def hsl-regex #"^hsl\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%\)$") -(def hsla-regex #"^hsla\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%,\s*(0|1|0?\.\d+)\)$") -(def rgba-regex #"^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(0|1|0?\.\d+)\)$") +(defn- color-title + [color-item] + (let [name (:name color-item) + path (:path color-item) + path-and-name (if path (str path " / " name) name) + gradient (:gradient color-item) + image (:image color-item) + color (:color color-item)] -(defn- gradient? [background] - (or - (str/starts-with? background "linear-gradient") - (str/starts-with? background "radial-gradient"))) + (if (some? name) + (cond + (some? color) + (str/ffmt "% (%)" path-and-name color) -(defn- color-solid? [background] - (boolean - (or (re-matches hex-regex background) - (or (re-matches hsl-regex background) - (re-matches rgb-regex background))))) + (some? gradient) + (str/ffmt "% (%)" path-and-name (uc/gradient-type->string (:type gradient))) -(defn- color-opacity? [background] - (boolean - (or (re-matches hsla-regex background) - (re-matches rgba-regex background)))) + (some? image) + (str/ffmt "% (%)" path-and-name (tr "media.image")) -(defn- extract-color-and-opacity [background] - (cond - (re-matches rgba-regex background) - (let [[_ r g b a] (re-matches rgba-regex background)] - {:color (dm/str "rgb(" r ", " g ", " b ")") - :opacity (js/parseFloat a)}) + :else + path-and-name) - (re-matches hsla-regex background) - (let [[_ h s l a] (re-matches hsla-regex background)] - {:color (dm/str "hsl(" h ", " s "%, " l "%)") - :opacity (js/parseFloat a)}) + (cond + (some? color) + color - :else - {:color background - :opacity 1.0})) + (some? gradient) + (uc/gradient-type->string (:type gradient)) + + (some? image) + (tr "media.image"))))) (mf/defc swatch* {::mf/props :obj - ::mf/schema schema:swatch} - [{:keys [background on-click format size active class] + ::mf/schema (sm/schema schema:swatch)} + [{:keys [background on-click size active class] :rest props}] - (let [element-type (if on-click "button" "div") - button-type (if on-click "button" nil) - format (or format "square") + (let [background (if (object? background) (json/->clj background) background) + read-only? (nil? on-click) + id? (some? (:id background)) + element-type (if read-only? "div" "button") + button-type (if (not read-only?) "button" nil) size (or size "small") active (or active false) - {:keys [color opacity]} (extract-color-and-opacity background) + gradient (:gradient background) + image (:image background) + format (if id? "rounded" "square") class (dm/str class " " (stl/css-case :swatch true :small (= size "small") @@ -79,25 +86,26 @@ :active (= active true) :interactive (= element-type "button") :rounded (= format "rounded"))) - props (mf/spread-props props {:class class :on-click on-click :type button-type})] + props (mf/spread-props props {:class class + :on-click on-click + :type button-type + :title (color-title background)})] [:> element-type props (cond - (color-solid? background) - [:span {:class (stl/css :swatch-solid) - :style {:background background}}] - (color-opacity? background) - [:span {:class (stl/css :swatch-opacity)} - [:span {:class (stl/css :swatch-solid-side) - :style {:background color}}] - [:span {:class (stl/css :swatch-opacity-side) - :style {:background color :opacity opacity}}]] - - (gradient? background) + (some? gradient) [:span {:class (stl/css :swatch-gradient) - :style {:background-image (str background ", repeating-conic-gradient(lightgray 0% 25%, white 0% 50%)")}}] + :style {:background-image (str gradient ", repeating-conic-gradient(lightgray 0% 25%, white 0% 50%)")}}] + + (some? image) + (let [uri (cfg/resolve-file-media image)] + [:span {:class (stl/css :swatch-image) + :style {:background-image (str/ffmt "url(%)" uri)}}]) :else - [:span {:class (stl/css :swatch-image) - :style {:background-image (str "url('" background "'), repeating-conic-gradient(lightgray 0% 25%, white 0% 50%)")}}])])) + [:span {:class (stl/css :swatch-opacity)} + [:span {:class (stl/css :swatch-solid-side) + :style {:background (uc/color->background (assoc background :opacity 1))}}] + [:span {:class (stl/css :swatch-opacity-side) + :style {:background (uc/color->background background)}}]])])) diff --git a/frontend/src/app/main/ui/ds/utilities/swatch.mdx b/frontend/src/app/main/ui/ds/utilities/swatch.mdx index a091a4e32..bef929f07 100644 --- a/frontend/src/app/main/ui/ds/utilities/swatch.mdx +++ b/frontend/src/app/main/ui/ds/utilities/swatch.mdx @@ -7,56 +7,47 @@ import * as SwatchStories from "./swatch.stories"; Swatches are elements that display a color, gradient or image. They can sometimes trigger an action. +## Background Property + +A swatch component can receive several props. The `background` prop is the most important and must be an object. Depending on the value of the background property we will get different variants of the component. + ## Variants -**Color** (`"color"`), displays a solid color. It can take a hexadecimal, an rgb or an rgba. +If the background prop has a hex `color` value it will display a full swatch with a solid color -**WithOpacity** (`"color"`), displays a solid color on one side and the same color with its opacity applied on the other side. It can take a hexadecimal, an rgb or an rgba. +If the background prop has a hex `color` value and an opacity value it will display a full swatch with a solid color on one side and the same color with the opacity applied on the other side. (default opacity: 1) -**Gradient** (`"gradient"`), displays a gradient. A gradient should be a `linear-gradient` or a `conic-gradient`. - - - -**Image** (`"image"`) the swatch could display any image. - - - -**Active** (`"active"`) displays the swatch as active while an interface related action is happening. - - - -**Size** (`"size"`) shows a bigger or smaller swatch. Accepts `small` and `medium` (_default_) sizes. +This component can take a size property to set the size of the swatch. In this case we can set it to `small` (default size: `medium`) -**Format** (`"format"`) displays a square or rounded swatch. Accepts `square` (_default_) and `rounded` sizes. +With the `active` property, we can display the element as being active - + + +The element can also be interactive, and execute an external function. Typically, it launches the color picker. To make it an interactive button, it accepts an onClick function. + + + +> Due to technical issues regarding the transformation between Clojurescript and Javascript, we are unable to display: + + - Swatches with gradients + - Library Swatches + - Swatches with images ## Technical Notes -### Background - -The `swatch*` component accepts a `background` prop, which must be: - -- An hexadecimal (e.g. `#996633`) -- An RGB (e.g. `rgb(125, 125, 0)`) -- An RGBA (e.g. `rgba(125, 125, 0, 0.3)`) -- A linear gradient (e.g. `linear-gradient(to right, blue, pink)`) -- A conic gradient (e.g. `conic-gradient(red, orange, yellow, green, blue)`) -- An image (e.g. `url(https://placecats.com/100/100)`) - ### onClick -> Note: If the swatch is interactive, an `aria-label` is required. More on the `Accessibility` section. +> Note: If the swatch is interactive, an `aria-label` is required. See the `Accessibility` section for more information. -The swatch button accepts an onClick prop that expect a function on the parent context. +The swatch button accepts an onClick prop that expects a function on the parent context. It should be useful for launching other tools as a color picker. -It runs when the user clics on the swatch, or presses enter or space while focusing it. +It is executed when the user clicks on the swatch, or presses Enter or Spacebar while focused. ### Accessibility diff --git a/frontend/src/app/main/ui/ds/utilities/swatch.stories.jsx b/frontend/src/app/main/ui/ds/utilities/swatch.stories.jsx index 165b7c599..08f0e3d07 100644 --- a/frontend/src/app/main/ui/ds/utilities/swatch.stories.jsx +++ b/frontend/src/app/main/ui/ds/utilities/swatch.stories.jsx @@ -15,11 +15,7 @@ export default { component: Swatch, argTypes: { background: { - control: { type: "text" }, - }, - format: { - control: "select", - options: ["square", "rounded"], + control: "object", }, size: { control: "select", @@ -30,8 +26,7 @@ export default { }, }, args: { - background: "#663399", - format: "square", + background: { color: "#7efff5" }, size: "medium", active: false, }, @@ -42,28 +37,52 @@ export const Default = {}; export const WithOpacity = { args: { - background: "rgba(255, 0, 0, 0.5)", + background: { + color: "#7efff5", + opacity: 0.5, + }, }, }; -export const LinearGradient = { - args: { - background: "linear-gradient(to right, transparent, mistyrose)", - }, -}; +// These stories are disabled because the gradient and the UUID variants cannot be translated from cljs into JS +// When the repo is updated to use the new version of rumext, these stories should be re-enabled and tested +// +// export const LinearGradient = { +// args: { +// background: { +// gradient: { +// type: "linear", +// startX: 0, +// startY: 0, +// endX: 1, +// endY: 0, +// width: 1, +// stops: [ +// { +// color: "#fabada", +// opacity: 1, +// offset: 0, +// }, +// { +// color: "#cc0000", +// opacity: 0.5, +// offset: 1, +// }, +// ], +// }, +// }, +// }, +// }; -export const Image = { - args: { - background: "images/form/never-used.png", - size: "medium", - }, -}; - -export const Rounded = { - args: { - format: "rounded", - }, -}; +// export const Rounded = { +// args: { +// background: { +// id: crypto.randomUUID(), +// color: "#7efff5", +// opacity: 0.5, +// }, +// }, +// }; export const Small = { args: { @@ -74,7 +93,6 @@ export const Small = { export const Active = { args: { active: true, - background: "#CC00CC", }, }; diff --git a/frontend/src/app/main/ui/workspace/sidebar/assets/common.cljs b/frontend/src/app/main/ui/workspace/sidebar/assets/common.cljs index 20f4bdafa..353ef6b59 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/assets/common.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/assets/common.cljs @@ -25,7 +25,7 @@ [app.main.ui.components.context-menu-a11y :refer [context-menu*]] [app.main.ui.components.title-bar :refer [title-bar]] [app.main.ui.context :as ctx] - [app.main.ui.icons :as i] + [app.main.ui.ds.foundations.assets.icon :refer [icon*]] [app.util.array :as array] [app.util.dom :as dom] [app.util.dom.dnd :as dnd] @@ -119,18 +119,17 @@ :left (:left state) :options options}]) -(mf/defc section-icon - {::mf/wrap-props false} - [{:keys [section]}] +(defn section-icon + [section] (case section - :colors i/drop-icon - :components i/component - :typographies i/text-palette - i/add)) + :colors "drop" + :components "component" + :typographies "text-palette" + "add")) (mf/defc asset-section {::mf/wrap-props false} - [{:keys [children file-id title section assets-count icon open?]}] + [{:keys [children file-id title section assets-count icon open? on-click]}] (let [children (-> (array/normalize-to-array children) (array/without-nils)) @@ -151,7 +150,7 @@ (mf/html [:span {:class (stl/css :title-name)} [:span {:class (stl/css :section-icon)} - [:& (or icon section-icon) {:section section}]] + [:> icon* {:id (or icon (section-icon section)) :size "s"}]] [:span {:class (stl/css :section-name)} title] @@ -160,17 +159,20 @@ [:div {:class (stl/css-case :asset-section true :opened (and (< 0 assets-count) - open?))} + open?)) + :on-click on-click} [:& title-bar {:collapsable (< 0 assets-count) :collapsed (not open?) :all-clickable true :on-collapsed on-collapsed :add-icon-gap (= 0 assets-count) - :class (stl/css-case :title-spacing open?) :title title} buttons] - (when ^boolean open? content)])) + (when ^boolean (and (< 0 assets-count) + open?) + [:div {:class (stl/css-case :title-spacing open?)} + content])])) (mf/defc asset-section-block {::mf/wrap-props false} diff --git a/frontend/src/app/main/ui/workspace/sidebar/assets/common.scss b/frontend/src/app/main/ui/workspace/sidebar/assets/common.scss index bbc0c7d70..14ae8aa10 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/assets/common.scss +++ b/frontend/src/app/main/ui/workspace/sidebar/assets/common.scss @@ -39,7 +39,7 @@ } .title-spacing { - margin-bottom: $s-4; + padding-block-start: $s-4; } .asset-section.opened { diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/border_radius.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/border_radius.cljs index 7809c8568..d39917b1d 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/border_radius.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/border_radius.cljs @@ -7,7 +7,10 @@ [app.main.ui.components.numeric-input :refer [numeric-input*]] [app.main.ui.ds.buttons.icon-button :refer [icon-button*]] [app.main.ui.ds.foundations.assets.icon :refer [icon*]] + [app.main.ui.hooks :as hooks] [app.util.i18n :as i18n :refer [tr]] + [beicon.v2.core :as rx] + [potok.v2.core :as ptk] [rumext.v2 :as mf])) (defn all-equal? @@ -58,7 +61,19 @@ on-radius-r1-change #(on-radius-4-change % :r1) on-radius-r2-change #(on-radius-4-change % :r2) on-radius-r3-change #(on-radius-4-change % :r3) - on-radius-r4-change #(on-radius-4-change % :r4)] + on-radius-r4-change #(on-radius-4-change % :r4) + + expand-stream + (mf/with-memo [] + (->> st/stream + (rx/filter (ptk/type? :expand-border-radius))))] + + (hooks/use-stream + expand-stream + #(reset! radius-expanded* true)) + + (mf/with-effect [ids] + (reset! radius-expanded* false)) [:div {:class (stl/css :radius)} (if (not radius-expanded) @@ -117,6 +132,6 @@ :variant "ghost" :on-click toggle-radius-mode :aria-label (if radius-expanded - (tr "workspace.options.radius.all-corners") - (tr "workspace.options.radius.single-corners")) - :icon "corner-radius"}]])) \ No newline at end of file + (tr "workspace.options.radius.hide-all-corners") + (tr "workspace.options.radius.show-single-corners")) + :icon "corner-radius"}]])) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/measures.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/measures.cljs index 32f31027d..c23bc4307 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/measures.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/measures.cljs @@ -282,7 +282,6 @@ (st/emit! (udw/trigger-bounding-box-cloaking ids) (udw/increase-rotation ids value))))) - on-width-change #(on-size-change % :width) on-height-change #(on-size-change % :height) on-pos-x-change #(on-position-change % :x) diff --git a/frontend/src/app/main/ui/workspace/tokens/changes.cljs b/frontend/src/app/main/ui/workspace/tokens/changes.cljs index c5b6b790b..163e9f068 100644 --- a/frontend/src/app/main/ui/workspace/tokens/changes.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/changes.cljs @@ -16,6 +16,7 @@ [app.main.data.workspace.state-helpers :as wsh] [app.main.data.workspace.transforms :as dwt] [app.main.data.workspace.undo :as dwu] + [app.main.store :as st] [app.main.ui.workspace.tokens.style-dictionary :as sd] [app.main.ui.workspace.tokens.tinycolor :as tinycolor] [app.main.ui.workspace.tokens.token :as wtt] @@ -95,11 +96,25 @@ (when (ctsr/can-get-border-radius? shape) (ctsr/set-radius-to-all-corners shape value))) {:reg-objects? true + :ignore-touched true + :attrs ctt/border-radius-keys})) + +(defn update-shape-radius-single-corner [value shape-ids attributes] + ;; NOTE: This key should be namespaced on data tokens, but these events are not there. + (st/emit! (ptk/data-event :expand-border-radius)) + (dwsh/update-shapes shape-ids + (fn [shape] + (when (ctsr/can-get-border-radius? shape) + (ctsr/set-radius-to-single-corner shape (first attributes) value))) + {:reg-objects? true + :ignore-touched true :attrs ctt/border-radius-keys})) (defn update-opacity [value shape-ids] (when (<= 0 value 1) - (dwsh/update-shapes shape-ids #(assoc % :opacity value)))) + (dwsh/update-shapes shape-ids + #(assoc % :opacity value) + {:ignore-touched true}))) (defn update-rotation [value shape-ids] (ptk/reify ::update-shape-rotation @@ -107,15 +122,7 @@ (watch [_ _ _] (rx/of (udw/trigger-bounding-box-cloaking shape-ids) - (udw/increase-rotation shape-ids value))))) - -(defn update-shape-radius-single-corner [value shape-ids attributes] - (dwsh/update-shapes shape-ids - (fn [shape] - (when (ctsr/can-get-border-radius? shape) - (ctsr/set-radius-to-single-corner shape (first attributes) value))) - {:reg-objects? true - :attrs ctt/border-radius-keys})) + (udw/increase-rotation shape-ids value nil :ignore-touched true))))) (defn update-stroke-width [value shape-ids] @@ -124,14 +131,15 @@ (when (seq (:strokes shape)) (assoc-in shape [:strokes 0 :stroke-width] value))) {:reg-objects? true + :ignore-touched true :attrs [:strokes]})) (defn update-color [f value shape-ids] - (let [color (some->> value - (tinycolor/valid-color) - (tinycolor/->hex) - (str "#"))] - (f shape-ids {:color color} 0))) + (when-let [color (some->> value + (tinycolor/valid-color) + (tinycolor/->hex) + (str "#"))] + (f shape-ids {:color color} 0 {:ignore-touched true}))) (defn update-fill [value shape-ids] @@ -141,13 +149,21 @@ [value shape-ids] (update-color wdc/change-stroke value shape-ids)) +(defn update-fill-stroke [value shape-ids attributes] + (ptk/reify ::update-fill-stroke + ptk/WatchEvent + (watch [_ _ _] + (rx/of + (when (:fill attributes) (update-fill value shape-ids)) + (when (:stroke-color attributes) (update-stroke-color value shape-ids)))))) + (defn update-shape-dimensions [value shape-ids attributes] (ptk/reify ::update-shape-dimensions ptk/WatchEvent (watch [_ _ _] (rx/of - (when (:width attributes) (dwt/update-dimensions shape-ids :width value)) - (when (:height attributes) (dwt/update-dimensions shape-ids :height value)))))) + (when (:width attributes) (dwt/update-dimensions shape-ids :width value {:ignore-touched true})) + (when (:height attributes) (dwt/update-dimensions shape-ids :height value {:ignore-touched true})))))) (defn- attributes->layout-gap [attributes value] (let [layout-gap (-> (set/intersection attributes #{:column-gap :row-gap}) @@ -155,7 +171,9 @@ {:layout-gap layout-gap})) (defn update-layout-padding [value shape-ids attrs] - (dwsl/update-layout shape-ids {:layout-padding (zipmap attrs (repeat value))})) + (dwsl/update-layout shape-ids + {:layout-padding (zipmap attrs (repeat value))} + {:ignore-touched true})) (defn update-layout-spacing [value shape-ids attributes] (ptk/reify ::update-layout-spacing @@ -167,7 +185,9 @@ (map :id))) layout-attributes (attributes->layout-gap attributes value)] (rx/of - (dwsl/update-layout layout-shape-ids layout-attributes)))))) + (dwsl/update-layout layout-shape-ids + layout-attributes + {:ignore-touched true})))))) (defn update-shape-position [value shape-ids attributes] (ptk/reify ::update-shape-position @@ -185,4 +205,4 @@ :layout-item-max-w value :layout-item-max-h value} (select-keys attributes))] - (dwsl/update-layout-child shape-ids props))))) + (dwsl/update-layout-child shape-ids props {:ignore-touched true}))))) diff --git a/frontend/src/app/main/ui/workspace/tokens/common.scss b/frontend/src/app/main/ui/workspace/tokens/common.scss index 668db73af..bb067e683 100644 --- a/frontend/src/app/main/ui/workspace/tokens/common.scss +++ b/frontend/src/app/main/ui/workspace/tokens/common.scss @@ -6,6 +6,22 @@ @import "refactor/common-refactor.scss"; +.input { + @extend .input-element; +} + +.labeled-input { + @extend .input-element; + .label { + width: auto; + text-wrap: nowrap; + } +} + +.labeled-input-error { + border: 1px solid var(--status-color-error-500) !important; +} + .button { @extend .button-primary; } diff --git a/frontend/src/app/main/ui/workspace/tokens/context_menu.cljs b/frontend/src/app/main/ui/workspace/tokens/context_menu.cljs index 722296c00..6f350c593 100644 --- a/frontend/src/app/main/ui/workspace/tokens/context_menu.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/context_menu.cljs @@ -8,17 +8,19 @@ (:require-macros [app.main.style :as stl]) (:require [app.common.data :as d] + [app.common.data.macros :as dm] [app.common.types.tokens-lib :as ctob] [app.main.data.modal :as modal] [app.main.data.tokens :as dt] [app.main.refs :as refs] [app.main.store :as st] [app.main.ui.components.dropdown :refer [dropdown]] - [app.main.ui.icons :as i] + [app.main.ui.ds.foundations.assets.icon :refer [icon*]] [app.main.ui.workspace.tokens.changes :as wtch] [app.main.ui.workspace.tokens.token :as wtt] [app.main.ui.workspace.tokens.token-types :as wtty] [app.util.dom :as dom] + [app.util.i18n :refer [tr]] [app.util.timers :as timers] [okulary.core :as l] [rumext.v2 :as mf])) @@ -58,7 +60,7 @@ all-action (let [props {:attributes attributes :token token :shape-ids shape-ids}] - {:title "All" + {:title (tr "labels.all") :selected? all-selected? :action #(if all-selected? (st/emit! (wtch/unapply-token props)) @@ -96,7 +98,7 @@ vertical-padding-selected? (and (not all-selected?) (every? selected-pred vertical-attributes)) - padding-items [{:title "All" + padding-items [{:title (tr "labels.all") :selected? all-selected? :action (fn [] (let [props {:attributes all-padding-attrs @@ -195,22 +197,20 @@ :stroke-width stroke-width :dimensions (fn [context-data] (concat - [{:title "Spacing" :submenu :spacing} - {:title "Sizing" :submenu :sizing} + [{:title "Sizing" :submenu :sizing} + {:title "Spacing" :submenu :spacing} :separator {:title "Border Radius" :submenu :border-radius}] + [:separator] (stroke-width context-data) [:separator] (generic-attribute-actions #{:x} "X" (assoc context-data :on-update-shape wtch/update-shape-position)) (generic-attribute-actions #{:y} "Y" (assoc context-data :on-update-shape wtch/update-shape-position))))})) -(defn default-actions [{:keys [token selected-token-set-id]}] +(defn default-actions [{:keys [token selected-token-set-path]}] (let [{:keys [modal]} (wtty/get-token-properties token)] - [{:title "Delete Token" - :action #(st/emit! (dt/delete-token (ctob/set-path->set-name selected-token-set-id) (:name token)))} - {:title "Duplicate Token" - :action #(st/emit! (dt/duplicate-token (:name token)))} - {:title "Edit Token" + [{:title (tr "workspace.token.edit") + :no-selectable true :action (fn [event] (let [{:keys [key fields]} modal] (st/emit! dt/hide-token-context-menu) @@ -220,8 +220,16 @@ :position :right :fields fields :action "edit" - :selected-token-set-id selected-token-set-id - :token token})))}])) + :selected-token-set-path selected-token-set-path + :token token})))} + {:title (tr "workspace.token.duplicate") + :no-selectable true + :action #(st/emit! (dt/duplicate-token (:name token)))} + {:title (tr "workspace.token.delete") + :no-selectable true + :action #(st/emit! (-> selected-token-set-path + ctob/prefixed-set-path-string->set-name-string + (dt/delete-token (:name token))))}])) (defn selection-actions [{:keys [type token] :as context-data}] (let [with-actions (get shape-attribute-actions-map (or type (:type token))) @@ -231,6 +239,12 @@ (when (seq attribute-actions) [:separator]) (default-actions context-data)))) +(defn submenu-actions-selection-actions [{:keys [type token] :as context-data}] + (let [with-actions (get shape-attribute-actions-map (or type (:type token))) + attribute-actions (if with-actions (with-actions context-data) [])] + (concat + attribute-actions))) + ;; Components ------------------------------------------------------------------ (def tokens-menu-ref @@ -243,98 +257,146 @@ (mf/defc menu-entry {::mf/props :obj} - [{:keys [title value on-click selected? children submenu-offset]}] + [{:keys [title value on-click selected? children submenu-offset submenu-direction no-selectable]}] (let [submenu-ref (mf/use-ref nil) hovering? (mf/use-ref false) on-pointer-enter - (mf/use-callback + (mf/use-fn (fn [] (mf/set-ref-val! hovering? true) (when-let [submenu-node (mf/ref-val submenu-ref)] (dom/set-css-property! submenu-node "display" "block")))) + on-pointer-leave - (mf/use-callback + (mf/use-fn (fn [] (mf/set-ref-val! hovering? false) (when-let [submenu-node (mf/ref-val submenu-ref)] (timers/schedule 50 #(when-not (mf/ref-val hovering?) (dom/set-css-property! submenu-node "display" "none")))))) + set-dom-node - (mf/use-callback + (mf/use-fn (fn [dom] (let [submenu-node (mf/ref-val submenu-ref)] - (when (and (some? dom) (some? submenu-node)) - (dom/set-css-property! submenu-node "top" (str (.-offsetTop dom) "px"))))))] - [:li - {:class (stl/css :context-menu-item) - :ref set-dom-node - :data-value value - :on-click on-click - :on-pointer-enter on-pointer-enter - :on-pointer-leave on-pointer-leave} + (when (and (some? dom) (some? submenu-node) (= submenu-direction "up")) + (dom/set-css-property! submenu-node "top" "unset")) + (when (and (some? dom) (some? submenu-node) (= submenu-direction "down")) + (dom/set-css-property! submenu-node "top" (dm/str (.-offsetTop dom) "px"))))))] + + (mf/use-effect + (mf/deps submenu-direction) + (fn [] + (let [submenu-node (mf/ref-val submenu-ref)] + (when (= submenu-direction "up") + (dom/set-css-property! submenu-node "top" "unset"))))) + + [:li {:class (stl/css :context-menu-item) + :ref set-dom-node + :data-value value + :on-click on-click + :on-pointer-enter on-pointer-enter + :on-pointer-leave on-pointer-leave} (when selected? - [:span {:class (stl/css :icon-wrapper)} - [:span {:class (stl/css :selected-icon)} i/tick]]) - [:span {:class (stl/css :title)} title] + [:> icon* {:id "tick" :size "s" :class (stl/css :icon-wrapper)}]) + [:span {:class (stl/css-case :item-text true + :item-with-icon-space (and + (not selected?) + (not no-selectable)))} + title] (when children [:* - [:span {:class (stl/css :submenu-icon)} i/arrow] + [:> icon* {:id "arrow" :size "s"}] [:ul {:class (stl/css :token-context-submenu) + :data-direction submenu-direction :ref submenu-ref + ;; Under review: This distances are arbitrary, + ;; https://tree.taiga.io/project/penpot/task/9627 :style {:display "none" - :top 0 - :left (str submenu-offset "px")} + :--dist (if (= submenu-direction "down") + "-80px" + "80px") + :left (dm/str submenu-offset "px")} :on-context-menu prevent-default} children]])])) (mf/defc menu-tree - [{:keys [selected-shapes] :as context-data}] + [{:keys [selected-shapes submenu-offset submenu-direction type] :as context-data}] (let [entries (if (seq selected-shapes) - (selection-actions context-data) + (if (some? type) + (submenu-actions-selection-actions context-data) + (selection-actions context-data)) (default-actions context-data))] - (for [[index {:keys [title action selected? submenu] :as entry}] (d/enumerate entries)] - [:* {:key (str title " " index)} + (for [[index {:keys [title action selected? submenu no-selectable] :as entry}] (d/enumerate entries)] + [:* {:key (dm/str title " " index)} (cond (= :separator entry) [:li {:class (stl/css :separator)}] submenu [:& menu-entry {:title title - :submenu-offset (:submenu-offset context-data)} + :no-selectable true + :submenu-direction submenu-direction + :submenu-offset submenu-offset} [:& menu-tree (assoc context-data :type submenu)]] :else [:& menu-entry {:title title :on-click action + :no-selectable no-selectable :selected? selected?}])]))) (mf/defc token-context-menu-tree - [{:keys [width] :as mdata}] + [{:keys [width direction] :as mdata}] (let [objects (mf/deref refs/workspace-page-objects) selected (mf/deref refs/selected-shapes) selected-shapes (into [] (keep (d/getf objects)) selected) token-name (:token-name mdata) token (mf/deref (refs/workspace-selected-token-set-token token-name)) - selected-token-set-id (mf/deref refs/workspace-selected-token-set-id)] + selected-token-set-path (mf/deref refs/workspace-selected-token-set-path)] [:ul {:class (stl/css :context-list)} [:& menu-tree {:submenu-offset width + :submenu-direction direction :token token - :selected-token-set-id selected-token-set-id + :selected-token-set-path selected-token-set-path :selected-shapes selected-shapes}]])) (mf/defc token-context-menu [] - (let [mdata (mf/deref tokens-menu-ref) - top (+ (get-in mdata [:position :y]) 5) - left (+ (get-in mdata [:position :x]) 5) - width (mf/use-state 0) - dropdown-ref (mf/use-ref)] + (let [mdata (mf/deref tokens-menu-ref) + is-open? (boolean mdata) + width (mf/use-state 0) + dropdown-ref (mf/use-ref) + dropdown-direction* (mf/use-state "down") + dropdown-direction (deref dropdown-direction*) + dropdown-direction-change* (mf/use-ref 0) + top (+ (get-in mdata [:position :y]) 5) + left (+ (get-in mdata [:position :x]) 5)] + (mf/use-effect - (mf/deps mdata) + (mf/deps is-open?) (fn [] (when-let [node (mf/ref-val dropdown-ref)] (reset! width (.-offsetWidth node))))) - [:& dropdown {:show (boolean mdata) + + (mf/with-effect [is-open?] + (when (and (not= 0 (mf/ref-val dropdown-direction-change*)) (= false is-open?)) + (reset! dropdown-direction* "down") + (mf/set-ref-val! dropdown-direction-change* 0))) + + (mf/with-effect [is-open? dropdown-ref] + (let [dropdown-element (mf/ref-val dropdown-ref)] + (when (and (= 0 (mf/ref-val dropdown-direction-change*)) dropdown-element) + (let [is-outside? (dom/is-element-outside? dropdown-element)] + (reset! dropdown-direction* (if is-outside? "up" "down")) + (mf/set-ref-val! dropdown-direction-change* (inc (mf/ref-val dropdown-direction-change*))))))) + + [:& dropdown {:show is-open? :on-close #(st/emit! dt/hide-token-context-menu)} [:div {:class (stl/css :token-context-menu) :ref dropdown-ref - :style {:top top :left left} + :data-direction dropdown-direction + :style {:--bottom (if (= dropdown-direction "up") + "40px" + "unset") + :--top (dm/str top "px") + :left (dm/str left "px")} :on-context-menu prevent-default} (when mdata - [:& token-context-menu-tree (assoc mdata :offset @width)])]])) + [:& token-context-menu-tree (assoc mdata :width @width :direction dropdown-direction)])]])) diff --git a/frontend/src/app/main/ui/workspace/tokens/context_menu.scss b/frontend/src/app/main/ui/workspace/tokens/context_menu.scss index c1d6cc573..2d3aeab92 100644 --- a/frontend/src/app/main/ui/workspace/tokens/context_menu.scss +++ b/frontend/src/app/main/ui/workspace/tokens/context_menu.scss @@ -4,6 +4,7 @@ // // Copyright (c) KALEIDOS INC +@use "../../ds/typography.scss" as *; @import "refactor/common-refactor.scss"; .token-context-menu { @@ -11,6 +12,14 @@ z-index: $z-index-4; } +.token-context-menu[data-direction="up"] { + bottom: var(--bottom); +} + +.token-context-menu[data-direction="down"] { + top: var(--top); +} + .context-list, .token-context-submenu { @include menuShadow; @@ -18,15 +27,18 @@ width: $s-240; padding: $s-4; border-radius: $br-8; - border: $s-2 solid var(--panel-border-color); - background-color: var(--menu-background-color); + border: $s-2 solid var(--color-background-quaternary); + background-color: var(--color-background-tertiary); max-height: 100vh; overflow-y: auto; +} - li { - @include bodySmallTypography; - color: var(--menu-foreground-color); - } +.token-context-submenu[data-direction="up"] { + bottom: var(--dist); +} + +.token-context-submenu[data-direction="down"] { + top: var(--dist); } .token-context-submenu { @@ -36,68 +48,46 @@ } .separator { - @include bodySmallTypography; margin: $s-6; border-block-start: $s-1 solid var(--panel-border-color); } .context-menu-item { + --context-menu-item-bg-color: none; + --context-menu-item-fg-color: var(--color-foreground-primary); + --context-menu-item-border-color: none; + @include use-typography("body-small"); display: flex; align-items: center; height: $s-28; width: 100%; - padding: $s-6; + padding: $s-8; border-radius: $br-8; + color: var(--context-menu-item-fg-color); + background-color: var(--context-menu-item-bg-color); + border: $s-1 solid var(--context-menu-item-border-color); cursor: pointer; - - .title { - flex-grow: 1; - @include bodySmallTypography; - color: var(--menu-foreground-color); - margin-left: calc(($s-32 + $s-28) / 2); - } - - .icon-wrapper { - display: grid; - grid-template-columns: 1fr 1fr; - } - - .icon-wrapper + .title { - margin-left: $s-6; - } - - .selected-icon { - svg { - @extend .button-icon-small; - stroke: var(--menu-foreground-color); - } - } - - .submenu-icon { - margin-left: $s-2; - svg { - @extend .button-icon-small; - stroke: var(--menu-foreground-color); - } - } - &:hover { - background-color: var(--menu-background-color-hover); - .title { - color: var(--menu-foreground-color-hover); - } - .shortcut { - color: var(--menu-shortcut-foreground-color-hover); - } + --context-menu-item-bg-color: var(--color-background-quaternary); } &:focus { - border: 1px solid var(--menu-border-color-focus); - background-color: var(--menu-background-color-focus); + --context-menu-item-bg-color: var(--menu-background-color-focus); + --context-menu-item-border-color: var(--color-background-tertiary); } - &[disabled] { - pointer-events: none; - opacity: 0.6; + &[aria-selected="true"] { + --context-menu-item-bg-color: var(--color-background-quaternary); } } + +.item-text { + flex-grow: 1; +} + +.item-with-icon-space { + padding-left: $s-20; +} +.icon-wrapper { + margin-right: $s-4; +} diff --git a/frontend/src/app/main/ui/workspace/tokens/form.cljs b/frontend/src/app/main/ui/workspace/tokens/form.cljs index fcb34661d..69e63ddf3 100644 --- a/frontend/src/app/main/ui/workspace/tokens/form.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/form.cljs @@ -9,7 +9,6 @@ (:require [app.common.colors :as c] [app.common.data :as d] - [app.common.data.macros :as dm] [app.common.types.tokens-lib :as ctob] [app.main.data.modal :as modal] [app.main.data.tokens :as dt] @@ -191,10 +190,10 @@ Token names should only contain letters and digits separated by . characters.")} empty-message? (or (nil? result-or-errors) (wte/has-error-code? :error/empty-input errors)) message (cond - empty-message? (dm/str (tr "workspace.token.resolved-value") "-") + empty-message? (tr "workspace.token.resolved-value" "-") errors (->> (wte/humanize-errors errors) (str/join "\n")) - :else (dm/str (tr "workspace.token.resolved-value") result-or-errors))] + :else (tr "workspace.token.resolved-value" result-or-errors))] [:> text* {:as "p" :typography "body-small" :class (stl/css-case :resolved-value true @@ -204,7 +203,7 @@ Token names should only contain letters and digits separated by . characters.")} (mf/defc form {::mf/wrap-props false} - [{:keys [token token-type action selected-token-set-id]}] + [{:keys [token token-type action selected-token-set-path]}] (let [token (or token {:type token-type}) token-properties (wtty/get-token-properties token) color? (wtt/color-token? token) @@ -221,6 +220,12 @@ Token names should only contain letters and digits separated by . characters.")} (-> (ctob/tokens-tree selected-set-tokens) ;; Allow setting editing token to it's own path (d/dissoc-in token-path)))) + cancel-ref (mf/use-ref nil) + + on-cancel-ref + (mf/use-fn + (fn [node] + (mf/set-ref-val! cancel-ref node))) ;; Name touched-name? (mf/use-state false) @@ -234,6 +239,17 @@ Token names should only contain letters and digits separated by . characters.")} :tokens-tree selected-set-tokens-tree})] (m/explain schema (finalize-name value))))) + on-blur-name + (mf/use-fn + (mf/deps cancel-ref) + (fn [e] + (let [node (dom/get-related-target e) + on-cancel-btn (= node (mf/ref-val cancel-ref))] + (when-not on-cancel-btn + (let [value (dom/get-target-val e) + errors (validate-name value)] + (reset! name-errors errors)))))) + on-update-name-debounced (mf/use-fn (uf/debounce (fn [e] @@ -283,6 +299,11 @@ Token names should only contain letters and digits separated by . characters.")} (set! (.-value (mf/ref-val value-input-ref)) hex-value) (on-update-value-debounced hex-value))) + on-display-colorpicker (mf/use-fn + (mf/deps color-ramp-open?) + (fn [] + (swap! color-ramp-open? not))) + value-error? (seq (:errors @token-resolve-result)) valid-value-field? (and (not value-error?) @@ -315,6 +336,7 @@ Token names should only contain letters and digits separated by . characters.")} (mf/deps validate-name validate-descripion token resolved-tokens) (fn [e] (dom/prevent-default e) + (mf/set-ref-val! cancel-ref nil) ;; We have to re-validate the current form values before submitting ;; because the validation is asynchronous/debounced ;; and the user might have edited a valid form to make it invalid, @@ -343,20 +365,21 @@ Token names should only contain letters and digits separated by . characters.")} (modal/hide!)))))))) on-delete-token (mf/use-fn - (mf/deps selected-token-set-id) + (mf/deps selected-token-set-path) (fn [e] (dom/prevent-default e) (modal/hide!) - (st/emit! (dt/delete-token (ctob/set-path->set-name selected-token-set-id) (:name token))))) + (st/emit! (dt/delete-token (ctob/prefixed-set-path-string->set-name-string selected-token-set-path) (:name token))))) on-cancel (mf/use-fn (fn [e] + (mf/set-ref-val! cancel-ref nil) (dom/prevent-default e) (modal/hide!)))] - [:form {:class (stl/css :form-wrapper) - :on-submit on-submit} + [:form {:class (stl/css :form-wrapper) + :on-submit on-submit} [:div {:class (stl/css :token-rows)} [:> heading* {:level 2 :typography "headline-medium" :class (stl/css :form-modal-title)} (if (= action "edit") @@ -372,7 +395,7 @@ Token names should only contain letters and digits separated by . characters.")} :auto-focus true :label (tr "workspace.token.token-name") :default-value @name-ref - :on-blur on-update-name + :on-blur on-blur-name :on-change on-update-name}]) (for [error (->> (:errors @name-errors) @@ -395,7 +418,7 @@ Token names should only contain letters and digits separated by . characters.")} :on-blur on-update-value} (when color? [:> input-token-color-bullet* - {:color @color :on-click #(swap! color-ramp-open? not)}])] + {:color @color :on-click on-display-colorpicker}])] (when @color-ramp-open? [:& ramp {:color (some-> (or @token-resolve-result (:value token)) (tinycolor/valid-color)) @@ -427,6 +450,8 @@ Token names should only contain letters and digits separated by . characters.")} (tr "labels.delete")]) [:> button* {:on-click on-cancel :type "button" + :on-ref on-cancel-ref + :id "token-modal-cancel" :variant "secondary"} (tr "labels.cancel")] [:> button* {:type "submit" diff --git a/frontend/src/app/main/ui/workspace/tokens/modals.cljs b/frontend/src/app/main/ui/workspace/tokens/modals.cljs index a34ccfe61..3b2dcccdc 100644 --- a/frontend/src/app/main/ui/workspace/tokens/modals.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/modals.cljs @@ -42,13 +42,14 @@ (mf/defc token-update-create-modal {::mf/wrap-props false} - [{:keys [x y position token token-type action selected-token-set-id] :as _args}] + [{:keys [x y position token token-type action selected-token-set-path] :as _args}] (let [wrapper-style (use-viewport-position-style x y position) close-modal (mf/use-fn (fn [] (modal/hide!)))] [:div {:class (stl/css :token-modal-wrapper) - :style wrapper-style} + :style wrapper-style + :data-testid "token-update-create-modal"} [:> icon-button* {:on-click close-modal :class (stl/css :close-btn) :icon i/close @@ -56,7 +57,7 @@ :aria-label (tr "labels.close")}] [:& form {:token token :action action - :selected-token-set-id selected-token-set-id + :selected-token-set-path selected-token-set-path :token-type token-type}]])) ;; Modals ---------------------------------------------------------------------- diff --git a/frontend/src/app/main/ui/workspace/tokens/modals/themes.cljs b/frontend/src/app/main/ui/workspace/tokens/modals/themes.cljs index b40762495..342b1e3d4 100644 --- a/frontend/src/app/main/ui/workspace/tokens/modals/themes.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/modals/themes.cljs @@ -173,8 +173,6 @@ (set! (.-value (mf/ref-val group-input-ref)) value) (on-update-group value)) :on-close on-close-dropdown}]) - ;; TODO: This span should be remove when labeled-input is updated - [:span {:class (stl/css :labeled-input-label)} "Theme group"] [:& labeled-input {:label "Group" :input-props {:ref group-input-ref :default-value (:group theme) @@ -188,8 +186,6 @@ (on-toggle-dropdown))} [:> icon* {:icon-id "arrow-down"}]]))}]] [:div {:class (stl/css :group-input-wrapper)} - ;; TODO: This span should be remove when labeled-input is updated - [:span {:class (stl/css :labeled-input-label)} "Theme"] [:& labeled-input {:label "Theme" :input-props {:default-value (:name theme) :on-change (comp on-update-name dom/get-target-val)}}]]])) @@ -254,36 +250,41 @@ [{:keys [state set-state]}] (let [{:keys [theme-path]} @state [_ theme-group theme-name] theme-path + ordered-token-sets (mf/deref refs/workspace-ordered-token-sets) token-sets (mf/deref refs/workspace-token-sets-tree) theme (mf/deref (refs/workspace-token-theme theme-group theme-name)) + theme-state (mf/use-state theme) + lib (-> (ctob/make-tokens-lib) + (ctob/add-theme @theme-state) + (ctob/add-sets ordered-token-sets) + (ctob/activate-theme (:group @theme-state) (:name @theme-state))) + + ;; Form / Modal handlers on-back #(set-state (constantly {:type :themes-overview})) on-submit #(st/emit! (wdt/update-token-theme [(:group theme) (:name theme)] %)) {:keys [dropdown-open? _on-open-dropdown on-close-dropdown on-toggle-dropdown]} (wtco/use-dropdown-open-state) - theme-state (mf/use-state theme) disabled? (-> (:name @theme-state) (str/trim) (str/empty?)) - token-set-active? (mf/use-callback - (mf/deps theme-state) - (fn [set-name] - (get-in @theme-state [:sets set-name]))) - on-toggle-token-set (mf/use-callback - (mf/deps theme-state) - (fn [set-name] - (swap! theme-state #(ctob/toggle-set % set-name)))) - on-change-field (fn [field value] - (swap! theme-state #(assoc % field value))) - on-save-form (mf/use-callback - (mf/deps theme-state on-submit) - (fn [e] - (dom/prevent-default e) - (let [theme (-> @theme-state - (update :name str/trim) - (update :group str/trim) - (update :description str/trim))] - (when-not (str/empty? (:name theme)) - (on-submit theme))) - (on-back))) + + on-change-field + (mf/use-fn + (fn [field value] + (swap! theme-state #(assoc % field value)))) + + on-save-form + (mf/use-callback + (mf/deps theme-state on-submit) + (fn [e] + (dom/prevent-default e) + (let [theme (-> @theme-state + (update :name str/trim) + (update :group str/trim) + (update :description str/trim))] + (when-not (str/empty? (:name theme)) + (on-submit theme))) + (on-back))) + close-modal (mf/use-fn (fn [e] @@ -295,13 +296,39 @@ (mf/deps theme on-back) (fn [] (st/emit! (wdt/delete-token-theme (:group theme) (:name theme))) - (on-back)))] + (on-back))) + + ;; Sets tree handlers + token-set-group-active? + (mf/use-callback + (mf/deps theme-state) + (fn [prefixed-path] + (ctob/sets-at-path-all-active? lib prefixed-path))) + + token-set-active? + (mf/use-callback + (mf/deps theme-state) + (fn [set-name] + (get-in @theme-state [:sets set-name]))) + + on-toggle-token-set + (mf/use-callback + (mf/deps theme-state) + (fn [set-name] + (swap! theme-state #(ctob/toggle-set % set-name)))) + + on-click-token-set + (mf/use-callback + (mf/deps on-toggle-token-set) + (fn [prefixed-set-path-str] + (let [set-name (ctob/prefixed-set-path-string->set-name-string prefixed-set-path-str)] + (on-toggle-token-set set-name))))] [:div {:class (stl/css :themes-modal-wrapper)} [:> heading* {:level 2 :typography "headline-medium" :class (stl/css :themes-modal-title)} (tr "workspace.token.edit-theme-title")] - [:form {:on-submit on-save-form} + [:form {:on-submit on-save-form :class (stl/css :edit-theme-form)} [:div {:class (stl/css :edit-theme-wrapper)} [:button {:on-click on-back :class (stl/css :back-btn) @@ -322,7 +349,8 @@ {:token-sets token-sets :token-set-selected? (constantly false) :token-set-active? token-set-active? - :on-select on-toggle-token-set + :token-set-group-active? token-set-group-active? + :on-select on-click-token-set :on-toggle-token-set on-toggle-token-set :origin "theme-modal" :context sets-context/static-context}]] diff --git a/frontend/src/app/main/ui/workspace/tokens/modals/themes.scss b/frontend/src/app/main/ui/workspace/tokens/modals/themes.scss index 0b6058a23..a3bb43803 100644 --- a/frontend/src/app/main/ui/workspace/tokens/modals/themes.scss +++ b/frontend/src/app/main/ui/workspace/tokens/modals/themes.scss @@ -12,10 +12,12 @@ .modal-dialog { @extend .modal-container-base; - display: grid; - grid-template-rows: auto 1fr auto; + + display: flex; + flex-direction: column; width: 100%; - max-width: $s-468; + max-width: $s-512; + max-height: $s-720; user-select: none; } @@ -32,6 +34,12 @@ display: flex; flex-direction: column; gap: $s-24; + overflow: auto; +} + +.edit-theme-form { + display: flex; + overflow-y: auto; } .themes-modal-title { @@ -101,6 +109,8 @@ .theme-group-label { color: var(--color-foreground-secondary); + margin: 0 0 $s-12 0; + padding: 0; } .group-title { @@ -114,12 +124,14 @@ display: flex; flex-direction: column; gap: $s-6; + margin: 0; } .theme-group-wrapper { display: flex; flex-direction: column; - gap: $s-8; + overflow-y: auto; + gap: $s-32; } .theme-row { @@ -146,7 +158,6 @@ } .sets-count-button { - text-transform: lowercase; padding: $s-6; padding-left: $s-12; } @@ -166,7 +177,7 @@ .sets-list-wrapper { border: 1px solid color-mix(in hsl, var(--color-foreground-secondary) 30%, transparent); border-radius: $s-8; - overflow: hidden; + overflow-y: auto; } .sets-count-empty-button { diff --git a/frontend/src/app/main/ui/workspace/tokens/sets.cljs b/frontend/src/app/main/ui/workspace/tokens/sets.cljs index 0c3eb6928..8baaa0555 100644 --- a/frontend/src/app/main/ui/workspace/tokens/sets.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/sets.cljs @@ -7,6 +7,7 @@ (ns app.main.ui.workspace.tokens.sets (:require-macros [app.main.style :as stl]) (:require + [app.common.data.macros :as dm] [app.common.types.tokens-lib :as ctob] [app.main.data.tokens :as wdt] [app.main.refs :as refs] @@ -24,12 +25,24 @@ (defn on-toggle-token-set-click [token-set-name] (st/emit! (wdt/toggle-token-set {:token-set-name token-set-name}))) +(defn on-toggle-token-set-group-click [prefixed-path-str] + (st/emit! (wdt/toggle-token-set-group {:prefixed-path-str prefixed-path-str}))) + (defn on-select-token-set-click [tree-path] - (st/emit! (wdt/set-selected-token-set-id tree-path))) + (st/emit! (wdt/set-selected-token-set-path tree-path))) (defn on-update-token-set [set-name token-set] (st/emit! (wdt/update-token-set set-name token-set))) +(defn on-update-token-set-group [from-prefixed-path-str to-path-str] + (st/emit! + (wdt/rename-token-set-group + (ctob/prefixed-set-path-string->set-name-string from-prefixed-path-str) + (-> (ctob/prefixed-set-path-string->set-path from-prefixed-path-str) + (butlast) + (ctob/join-set-path) + (ctob/join-set-path-str to-path-str))))) + (defn on-create-token-set [_ token-set] (st/emit! (wdt/create-token-set token-set))) @@ -59,17 +72,28 @@ :auto-focus true :default-value default-value}])) -(mf/defc sets-tree-set-group - [{:keys [label tree-depth tree-path selected? collapsed? on-select editing? on-edit on-edit-reset on-edit-submit]}] - (let [editing?' (editing? tree-path) - on-click - (mf/use-fn - (mf/deps editing? tree-path) - (fn [event] - (dom/stop-propagation event) - (when-not (editing? tree-path) - (on-select tree-path)))) +(mf/defc checkbox + [{:keys [checked aria-label on-click]}] + (let [all? (true? checked) + mixed? (= checked "mixed") + checked? (or all? mixed?)] + [:div {:role "checkbox" + :aria-checked (dm/str checked) + :tab-index 0 + :class (stl/css-case :checkbox-style true + :checkbox-checked-style checked?) + :on-click on-click} + (when checked? + [:> icon* + {:aria-label aria-label + :class (stl/css :check-icon) + :size "s" + :id (if mixed? ic/remove ic/tick)}])])) +(mf/defc sets-tree-set-group + [{:keys [label tree-depth tree-path active? selected? collapsed? editing? on-toggle on-edit on-edit-reset on-edit-submit]}] + (let [editing?' (editing? tree-path) + active?' (active? tree-path) on-context-menu (mf/use-fn (mf/deps editing? tree-path) @@ -80,37 +104,60 @@ (st/emit! (wdt/show-token-set-context-menu {:position (dom/get-client-position event) - :tree-path tree-path})))))] - [:div {;; :ref dref - :role "button" + :prefixed-set-path tree-path}))))) + on-collapse-click + (mf/use-fn + (fn [event] + (dom/stop-propagation event) + (swap! collapsed? not))) + on-double-click + (mf/use-fn + (mf/deps tree-path) + #(on-edit tree-path)) + on-checkbox-click + (mf/use-fn + (mf/deps on-toggle tree-path) + #(on-toggle tree-path)) + on-edit-submit' + (mf/use-fn + (mf/deps tree-path on-edit-submit) + #(on-edit-submit tree-path %))] + [:div {:role "button" + :data-testid "tokens-set-group-item" :style {"--tree-depth" tree-depth} :class (stl/css-case :set-item-container true + :set-item-group true :selected-set selected?) - :on-click on-click - :on-context-menu on-context-menu - :on-double-click #(on-edit tree-path)} + :on-context-menu on-context-menu} [:> icon-button* - {:on-click (fn [event] - (.stopPropagation event) - (swap! collapsed? not)) + {:class (stl/css :set-item-group-collapse-button) + :on-click on-collapse-click :aria-label (tr "labels.collapse") :icon (if @collapsed? "arrow-right" "arrow-down") :variant "action"}] - [:> icon* {:icon-id "group" - :class (stl/css :icon)}] (if editing?' [:& editing-label {:default-value label :on-cancel on-edit-reset :on-create on-edit-reset - :on-submit #(on-edit-submit)}] - [:div {:class (stl/css :set-name)} label])])) + :on-submit on-edit-submit'}] + [:* + [:div {:class (stl/css :set-name) + :on-double-click on-double-click} + label] + [:& checkbox + {:on-click on-checkbox-click + :checked (case active?' + :all true + :partial "mixed" + :none false) + :arial-label (tr "workspace.token.select-set")}]])])) (mf/defc sets-tree-set [{:keys [set label tree-depth tree-path selected? on-select active? on-toggle editing? on-edit on-edit-reset on-edit-submit]}] (let [set-name (.-name set) editing?' (editing? tree-path) - active?' (active? set-name) + active?' (some? (active? set-name)) on-click (mf/use-fn (mf/deps editing?' tree-path) @@ -118,7 +165,6 @@ (dom/stop-propagation event) (when-not editing?' (on-select tree-path)))) - on-context-menu (mf/use-fn (mf/deps editing?' tree-path) @@ -129,44 +175,66 @@ (st/emit! (wdt/show-token-set-context-menu {:position (dom/get-client-position event) - :tree-path tree-path})))))] - [:div {;; :ref dref - :role "button" + :prefixed-set-path tree-path}))))) + on-double-click (mf/use-fn + (mf/deps tree-path) + #(on-edit tree-path)) + on-checkbox-click (mf/use-fn + (mf/deps set-name) + (fn [event] + (dom/stop-propagation event) + (on-toggle set-name))) + on-edit-submit' (mf/use-fn + (mf/deps set on-edit-submit) + #(on-edit-submit set-name (ctob/update-name set %)))] + [:div {:role "button" + :data-testid "tokens-set-item" :style {"--tree-depth" tree-depth} :class (stl/css-case :set-item-container true :selected-set selected?) :on-click on-click - :on-double-click #(on-edit tree-path) - :on-context-menu on-context-menu} - [:> icon* {:icon-id "document" - :class (stl/css-case :icon true - :root-icon (not tree-depth))}] + :on-context-menu on-context-menu + :aria-checked active?'} + [:> icon* + {:icon-id "document" + :class (stl/css-case :icon true + :root-icon (not tree-depth))}] (if editing?' [:& editing-label {:default-value label :on-cancel on-edit-reset :on-create on-edit-reset - :on-submit #(on-edit-submit set-name (ctob/update-name set %))}] + :on-submit on-edit-submit'}] [:* - [:div {:class (stl/css :set-name)} label] - [:button {:on-click (fn [event] - (dom/stop-propagation event) - (on-toggle set-name)) - :class (stl/css-case :checkbox-style true - :checkbox-checked-style active?')} - (when active?' - [:> icon* {:aria-label (tr "workspace.token.select-set") - :class (stl/css :check-icon) - :size "s" - :icon-id ic/tick}])]])])) + [:div {:class (stl/css :set-name) + :on-double-click on-double-click} + label] + [:& checkbox + {:on-click on-checkbox-click + :arial-label (tr "workspace.token.select-set") + :checked active?'}]])])) (mf/defc sets-tree - [{:keys [set-path set-node tree-depth tree-path on-select selected? on-toggle active? editing? on-edit on-edit-reset on-edit-submit] + [{:keys [active? + group-active? + editing? + on-edit + on-edit-reset + on-edit-submit-set + on-edit-submit-group + on-select + on-toggle-set + on-toggle-set-group + selected? + set-node + set-path + tree-depth + tree-path] :or {tree-depth 0} :as props}] - (let [[set-prefix set-path'] (some-> set-path (ctob/split-set-prefix)) + (let [[set-path-prefix set-fname] (some-> set-path (ctob/split-set-str-path-prefix)) set? (instance? ctob/TokenSet set-node) - set-group? (= ctob/set-group-prefix set-prefix) + set-group? (= ctob/set-group-prefix set-path-prefix) root? (= tree-depth 0) collapsed? (mf/use-state false) children? (and @@ -181,29 +249,31 @@ :active? active? :selected? (selected? tree-path) :on-select on-select - :label set-path' + :label set-fname :tree-path (or tree-path set-path) :tree-depth tree-depth :editing? editing? - :on-toggle on-toggle + :on-toggle on-toggle-set :on-edit on-edit :on-edit-reset on-edit-reset - :on-edit-submit on-edit-submit}] + :on-edit-submit on-edit-submit-set}] set-group? [:& sets-tree-set-group {:selected? (selected? tree-path) + :active? group-active? :on-select on-select - :label set-path' + :label set-fname :collapsed? collapsed? :tree-path (or tree-path set-path) :tree-depth tree-depth :editing? editing? + :on-toggle on-toggle-set-group :on-edit on-edit :on-edit-reset on-edit-reset - :on-edit-submit on-edit-submit}]) + :on-edit-submit on-edit-submit-group}]) (when children? (for [[set-path set-node] set-node - :let [tree-path' (str (when tree-path (str tree-path "/")) set-path)]] + :let [tree-path' (ctob/join-set-path-str tree-path set-path)]] [:& sets-tree {:key tree-path' :set-path set-path @@ -212,29 +282,34 @@ :tree-path tree-path' :on-select on-select :selected? selected? - :on-toggle on-toggle + :on-toggle-set on-toggle-set + :on-toggle-set-group on-toggle-set-group :active? active? + :group-active? group-active? :editing? editing? :on-edit on-edit :on-edit-reset on-edit-reset - :on-edit-submit on-edit-submit}]))])) + :on-edit-submit-set on-edit-submit-set + :on-edit-submit-group on-update-token-set-group}]))])) (mf/defc controlled-sets-list [{:keys [token-sets on-update-token-set + on-update-token-set-group token-set-selected? token-set-active? + token-set-group-active? on-create-token-set on-toggle-token-set + on-toggle-token-set-group origin on-select context] :as _props}] (let [{:keys [editing? new? on-edit on-reset] :as ctx} (or context (sets-context/use-context))] - [:ul {:class (stl/css :sets-list)} - (if (and - (= origin "theme-modal") - (empty? token-sets)) + [:fieldset {:class (stl/css :sets-list)} + (if (and (= origin "theme-modal") + (empty? token-sets)) [:> text* {:as "span" :typography "body-small" :class (stl/css :empty-state-message-sets)} (tr "workspace.token.no-sets-create")] (if (and (= origin "theme-modal") @@ -247,11 +322,14 @@ :selected? token-set-selected? :on-select on-select :active? token-set-active? - :on-toggle on-toggle-token-set + :group-active? token-set-group-active? + :on-toggle-set on-toggle-token-set + :on-toggle-set-group on-toggle-token-set-group :editing? editing? :on-edit on-edit :on-edit-reset on-reset - :on-edit-submit on-update-token-set}] + :on-edit-submit-set on-update-token-set + :on-edit-submit-group on-update-token-set-group}] (when new? [:& sets-tree-set {:set (ctob/make-token-set :name "") @@ -267,22 +345,28 @@ (mf/defc sets-list [{:keys []}] (let [token-sets (mf/deref refs/workspace-token-sets-tree) - selected-token-set-id (mf/deref refs/workspace-selected-token-set-id) + selected-token-set-path (mf/deref refs/workspace-selected-token-set-path) token-set-selected? (mf/use-fn - (mf/deps token-sets selected-token-set-id) + (mf/deps token-sets selected-token-set-path) (fn [tree-path] - (= tree-path selected-token-set-id))) + (= tree-path selected-token-set-path))) active-token-set-names (mf/deref refs/workspace-active-set-names) token-set-active? (mf/use-fn (mf/deps active-token-set-names) (fn [set-name] - (get active-token-set-names set-name)))] + (get active-token-set-names set-name))) + token-set-group-active? (mf/use-fn + (fn [prefixed-path] + @(refs/token-sets-at-path-all-active prefixed-path)))] [:& controlled-sets-list {:token-sets token-sets :token-set-selected? token-set-selected? :token-set-active? token-set-active? + :token-set-group-active? token-set-group-active? :on-select on-select-token-set-click :origin "set-panel" :on-toggle-token-set on-toggle-token-set-click + :on-toggle-token-set-group on-toggle-token-set-group-click :on-update-token-set on-update-token-set + :on-update-token-set-group on-update-token-set-group :on-create-token-set on-create-token-set}])) diff --git a/frontend/src/app/main/ui/workspace/tokens/sets.scss b/frontend/src/app/main/ui/workspace/tokens/sets.scss index 10c7c83f0..a0a84192f 100644 --- a/frontend/src/app/main/ui/workspace/tokens/sets.scss +++ b/frontend/src/app/main/ui/workspace/tokens/sets.scss @@ -34,6 +34,14 @@ } } +.set-item-group { + cursor: unset; +} + +.set-item-group-collapse-button { + cursor: pointer; +} + .set-name { @include textEllipsis; flex-grow: 1; diff --git a/frontend/src/app/main/ui/workspace/tokens/sets_context_menu.cljs b/frontend/src/app/main/ui/workspace/tokens/sets_context_menu.cljs index 4fb37428a..cf3c1c412 100644 --- a/frontend/src/app/main/ui/workspace/tokens/sets_context_menu.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/sets_context_menu.cljs @@ -7,6 +7,7 @@ (ns app.main.ui.workspace.tokens.sets-context-menu (:require-macros [app.main.style :as stl]) (:require + [app.common.types.tokens-lib :as ctob] [app.main.data.tokens :as wdt] [app.main.refs :as refs] [app.main.store :as st] @@ -35,11 +36,13 @@ [:span {:class (stl/css :title)} title]]) (mf/defc menu - [{:keys [tree-path]}] + [{:keys [prefixed-set-path]}] (let [{:keys [on-edit]} (sets-context/use-context) - edit-name (mf/use-fn #(on-edit tree-path)) - delete-set (mf/use-fn #(st/emit! (wdt/delete-token-set-path tree-path)))] + edit-name (mf/use-fn #(on-edit prefixed-set-path)) + delete-set (mf/use-fn #(st/emit! (wdt/delete-token-set-path prefixed-set-path)))] [:ul {:class (stl/css :context-list)} + (when (ctob/prefixed-set-path-final-group? prefixed-set-path) + [:& menu-entry {:title "Add set to this group" :on-click js/console.log}]) [:& menu-entry {:title (tr "labels.rename") :on-click edit-name}] [:& menu-entry {:title (tr "labels.delete") :on-click delete-set}]])) @@ -61,4 +64,4 @@ :ref dropdown-ref :style {:top top :left left} :on-context-menu prevent-default} - [:& menu {:tree-path (:tree-path mdata)}]]])) + [:& menu {:prefixed-set-path (:prefixed-set-path mdata)}]]])) diff --git a/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs b/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs index 8fcbab432..b516fc806 100644 --- a/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs @@ -14,7 +14,6 @@ [app.main.data.tokens :as dt] [app.main.refs :as refs] [app.main.store :as st] - [app.main.ui.components.color-bullet :refer [color-bullet]] [app.main.ui.components.dropdown-menu :refer [dropdown-menu dropdown-menu-item*]] [app.main.ui.components.title-bar :refer [title-bar]] [app.main.ui.ds.buttons.button :refer [button*]] @@ -22,7 +21,6 @@ [app.main.ui.ds.foundations.typography.text :refer [text*]] [app.main.ui.hooks :as h] [app.main.ui.hooks.resize :refer [use-resize-hook]] - [app.main.ui.icons :as i] [app.main.ui.workspace.sidebar.assets.common :as cmm] [app.main.ui.workspace.tokens.changes :as wtch] [app.main.ui.workspace.tokens.context-menu :refer [token-context-menu]] @@ -33,12 +31,12 @@ [app.main.ui.workspace.tokens.style-dictionary :as sd] [app.main.ui.workspace.tokens.theme-select :refer [theme-select]] [app.main.ui.workspace.tokens.token :as wtt] + [app.main.ui.workspace.tokens.token-pill :refer [token-pill]] [app.main.ui.workspace.tokens.token-types :as wtty] [app.util.dom :as dom] [app.util.i18n :refer [tr]] [app.util.webapi :as wapi] [beicon.v2.core :as rx] - [cuerdas.core :as str] [okulary.core :as l] [rumext.v2 :as mf] [shadow.resource])) @@ -46,54 +44,31 @@ (def lens:token-type-open-status (l/derived (l/in [:workspace-tokens :open-status]) st/state)) -(def ^:private download-icon - (i/icon-xref :download (stl/css :download-icon))) - ;; Components ------------------------------------------------------------------ -(mf/defc token-pill - {::mf/wrap-props false} - [{:keys [on-click token theme-token highlighted? on-context-menu]}] - (let [{:keys [name value resolved-value errors]} token - errors? (and (seq errors) (seq (:errors theme-token)))] - [:button - {:class (stl/css-case :token-pill true - :token-pill-highlighted highlighted? - :token-pill-invalid errors?) - :title (cond - errors? (sd/humanize-errors token) - :else (->> [(str "Token: " name) - (str (tr "workspace.token.original-value") value) - (str (tr "workspace.token.resolved-value") resolved-value)] - (str/join "\n"))) - :on-click on-click - :on-context-menu on-context-menu - :disabled errors?} - (when-let [color (if (seq (ctob/find-token-value-references (:value token))) - (wtt/resolved-value-hex theme-token) - (wtt/resolved-value-hex token))] - [:& color-bullet {:color color - :mini true}]) - name])) - (mf/defc token-section-icon {::mf/wrap-props false} [{:keys [type]}] (case type - :border-radius i/corner-radius - :numeric [:span {:class (stl/css :section-text-icon)} "123"] - :color i/drop-icon - :boolean i/boolean-difference - :opacity [:span {:class (stl/css :section-text-icon)} "%"] - :rotation i/rotation - :spacing i/padding-extended - :string i/text-mixed - :stroke-width i/stroke-size - :typography i/text - ;; TODO: Add diagonal icon here when it's available - :dimensions [:div {:style {:rotate "45deg"}} i/constraint-horizontal] - :sizing [:div {:style {:rotate "45deg"}} i/constraint-horizontal] - i/add)) + :border-radius "corner-radius" + :color "drop" + :boolean "boolean-difference" + :opacity "percentage" + :rotation "rotation" + :spacing "padding-extended" + :string "text-mixed" + :stroke-width "stroke-size" + :typography "text" + :dimensions "expand" + :sizing "expand" + "add")) + +(defn attribute-actions [token selected-shapes attributes] + (let [ids-by-attributes (wtt/shapes-ids-by-applied-attributes token selected-shapes attributes) + shape-ids (into #{} (map :id selected-shapes))] + {:all-selected? (wtt/shapes-applied-all? ids-by-attributes shape-ids attributes) + :shape-ids shape-ids + :selected-pred #(seq (% ids-by-attributes))})) (mf/defc token-component [{:keys [type tokens selected-shapes token-type-props active-theme-tokens]}] @@ -105,9 +80,10 @@ (fn [event token] (dom/prevent-default event) (dom/stop-propagation event) - (st/emit! (dt/show-token-context-menu {:type :token - :position (dom/get-client-position event) - :token-name (:name token)})))) + (st/emit! (dt/show-token-context-menu + {:type :token + :position (dom/get-client-position event) + :token-name (:name token)})))) on-toggle-open-click (mf/use-fn (mf/deps open? tokens) @@ -137,28 +113,37 @@ :token-type-props token-type-props}))))) tokens-count (count tokens)] [:div {:on-click on-toggle-open-click} - [:& cmm/asset-section {:icon (mf/fnc icon-wrapper [] - [:div {:class (stl/css :section-icon)} - [:& token-section-icon {:type type}]]) + [:& cmm/asset-section {:icon (token-section-icon type) :title title :assets-count tokens-count :open? open?} [:& cmm/asset-section-block {:role :title-button} - [:button {:class (stl/css :action-button) - :on-click on-popover-open-click} - i/add]] + [:> icon-button* {:on-click on-popover-open-click + :variant "ghost" + :icon "add" + :aria-label (str "Add token: " title)}]] (when open? [:& cmm/asset-section-block {:role :content} [:div {:class (stl/css :token-pills-wrapper)} (for [token (sort-by :name tokens)] - (let [theme-token (get active-theme-tokens (wtt/token-identifier token))] + (let [theme-token (get active-theme-tokens (wtt/token-identifier token)) + multiple-selection (< 1 (count selected-shapes)) + full-applied (:all-selected? (attribute-actions token selected-shapes (or all-attributes attributes))) + applied (wtt/shapes-token-applied? token selected-shapes (or all-attributes attributes)) + on-token-click (fn [e] + (on-token-pill-click e token)) + on-context-menu (fn [e] (on-context-menu e token))] [:& token-pill {:key (:name token) :token token :theme-token theme-token - :highlighted? (wtt/shapes-token-applied? token selected-shapes (or all-attributes attributes)) - :on-click #(on-token-pill-click % token) - :on-context-menu #(on-context-menu % token)}]))]])]])) + :half-applied (or (and applied multiple-selection) + (and applied (not full-applied))) + :full-applied (if multiple-selection + false + applied) + :on-click on-token-click + :on-context-menu on-context-menu}]))]])]])) (defn sorted-token-groups "Separate token-types into groups of `:empty` or `:filled` depending if tokens exist for that type. @@ -235,16 +220,13 @@ on-open (mf/use-fn #(reset! open? true))] [:& sets-context/provider {} [:& sets-context-menu] - [:article {:class (stl/css :sets-section-wrapper) + [:article {:data-testid "token-themes-sets-sidebar" + :class (stl/css :sets-section-wrapper) :style {"--resize-height" (str resize-height "px")}} [:div {:class (stl/css :sets-sidebar)} [:& themes-header] [:div {:class (stl/css :sidebar-header)} - [:& title-bar {:collapsable true - :collapsed (not @open?) - :all-clickable true - :title (tr "labels.sets") - :on-collapsed #(swap! open? not)} + [:& title-bar {:title (tr "labels.sets")} [:& add-set-button {:on-open on-open :style "header"}]]] [:& theme-sets-list {:on-open on-open}]]]])) @@ -259,30 +241,24 @@ active-theme-tokens (sd/use-active-theme-sets-tokens) tokens (sd/use-resolved-workspace-tokens) - token-groups (mf/with-memo [tokens] - (sorted-token-groups tokens))] + + selected-token-set-tokens (mf/deref refs/workspace-selected-token-set-tokens) + + token-groups (mf/with-memo [tokens selected-token-set-tokens] + (-> (select-keys tokens (keys selected-token-set-tokens)) + (sorted-token-groups)))] [:* [:& token-context-menu] [:& title-bar {:all-clickable true :title "TOKENS"}] - [:div.assets-bar - (for [{:keys [token-key token-type-props tokens]} (concat (:filled token-groups) - (:empty token-groups))] - [:& token-component {:key token-key - :type token-key - :selected-shapes selected-shapes - :active-theme-tokens active-theme-tokens - :tokens tokens - :token-type-props token-type-props}])]])) - -(mf/defc json-import-button [] - (let [] - [:div - - [:button {:class (stl/css :download-json-button) - :on-click #(.click (js/document.getElementById "file-input"))} - download-icon - "Import JSON"]])) + (for [{:keys [token-key token-type-props tokens]} (concat (:filled token-groups) + (:empty token-groups))] + [:& token-component {:key token-key + :type token-key + :selected-shapes selected-shapes + :active-theme-tokens active-theme-tokens + :tokens tokens + :token-type-props token-type-props}])])) (mf/defc import-export-button {::mf/wrap-props false} @@ -303,6 +279,10 @@ (reset! show-menu* false))) input-ref (mf/use-ref) + on-option-click + (mf/use-fn + #(.click (mf/ref-val input-ref))) + on-import (fn [event] (let [file (-> event .-target .-files (aget 0))] @@ -318,12 +298,13 @@ :timeout 9000}))))) (set! (.-value (mf/ref-val input-ref)) ""))) on-export (fn [] - (let [tokens-blob (some-> (deref refs/tokens-lib) + (let [tokens-json (some-> (deref refs/tokens-lib) (ctob/encode-dtcg) (clj->js) - (js/JSON.stringify nil 2) - (wapi/create-blob "application/json"))] - (dom/trigger-download "tokens.json" tokens-blob)))] + (js/JSON.stringify nil 2))] + (->> (wapi/create-blob (or tokens-json "{}") "application/json") + (dom/trigger-download "tokens.json"))))] + [:div {:class (stl/css :import-export-button-wrapper)} [:input {:type "file" :ref input-ref @@ -331,20 +312,20 @@ :id "file-input" :accept ".json" :on-change on-import}] - [:button {:class (stl/css :import-export-button) - :on-click open-menu} - download-icon - "Tokens"] + [:> button* {:on-click open-menu + :icon "import-export" + :variant "secondary"} + (tr "workspace.token.tools")] [:& dropdown-menu {:show show-menu? :on-close close-menu :list-class (stl/css :import-export-menu)} [:> dropdown-menu-item* {:class (stl/css :import-export-menu-item) - :on-click #(.click (mf/ref-val input-ref))} - "Import"] + :on-click on-option-click} + (tr "labels.import")] [:> dropdown-menu-item* {:class (stl/css :import-export-menu-item) :on-click on-export} - "Export"]]])) + (tr "labels.export")]]])) (mf/defc tokens-sidebar-tab {::mf/wrap [mf/memo] diff --git a/frontend/src/app/main/ui/workspace/tokens/sidebar.scss b/frontend/src/app/main/ui/workspace/tokens/sidebar.scss index 023534ac2..1241b2a67 100644 --- a/frontend/src/app/main/ui/workspace/tokens/sidebar.scss +++ b/frontend/src/app/main/ui/workspace/tokens/sidebar.scss @@ -39,8 +39,8 @@ } .themes-header { + @include use-typography("headline-small"); display: block; - @include headlineSmallTypography; margin-bottom: $s-8; padding-left: $s-8; color: var(--title-foreground-color); @@ -80,25 +80,6 @@ flex-wrap: wrap; } -.token-pill { - @extend .button-secondary; - gap: $s-8; - padding: $s-4 $s-8; - border-radius: $br-6; - font-size: $fs-14; - - &.token-pill-highlighted { - color: var(--button-primary-foreground-color-rest); - background: var(--button-primary-background-color-rest); - } - - &.token-pill-invalid { - background-color: var(--button-secondary-background-color-rest); - color: var(--status-color-error-500); - opacity: 0.8; - } -} - .section-text-icon { font-size: $fs-12; width: 16px; @@ -119,8 +100,7 @@ flex-direction: row; align-items: end; justify-content: end; - padding: $s-16; - margin-top: $s-8; + padding: $s-8; background-color: var(--color-background-primary); box-shadow: var(--el-shadow-dark); } @@ -129,16 +109,13 @@ @extend .button-secondary; display: flex; align-items: center; + justify-content: end; padding: $s-6 $s-8; text-transform: uppercase; gap: $s-8; + background-color: var(--color-background-primary); - .download-icon { - @extend .button-icon; - stroke: var(--icon-foreground); - width: 20px; - height: 20px; - } + box-shadow: var(--el-shadow-dark); } .import-export-menu { @@ -153,23 +130,8 @@ .import-export-menu-item { @extend .menu-item-base; cursor: pointer; - .open-arrow { - @include flexCenter; - svg { - @extend .button-icon; - stroke: var(--icon-foreground); - } - } &:hover { color: var(--menu-foreground-color-hover); - .open-arrow { - svg { - stroke: var(--menu-foreground-color-hover); - } - } - .shortcut-key { - color: var(--menu-shortcut-foreground-color-hover); - } } } diff --git a/frontend/src/app/main/ui/workspace/tokens/style_dictionary.cljs b/frontend/src/app/main/ui/workspace/tokens/style_dictionary.cljs index e2c77d007..25da4fbbb 100644 --- a/frontend/src/app/main/ui/workspace/tokens/style_dictionary.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/style_dictionary.cljs @@ -252,8 +252,10 @@ @tokens-state)) (defn use-resolved-workspace-tokens [] - (-> (mf/deref refs/workspace-selected-token-set-tokens) - (use-resolved-tokens))) + (let [active-theme-tokens (mf/deref refs/workspace-active-theme-sets-tokens) + selected-token-set-tokens (mf/deref refs/workspace-selected-token-set-tokens) + prefer-selected-token-set-tokens (merge active-theme-tokens selected-token-set-tokens)] + (use-resolved-tokens prefer-selected-token-set-tokens))) (defn use-active-theme-sets-tokens [] (-> (mf/deref refs/workspace-active-theme-sets-tokens) diff --git a/frontend/src/app/main/ui/workspace/tokens/token.cljs b/frontend/src/app/main/ui/workspace/tokens/token.cljs index 215f9ca51..3fd66ed7a 100644 --- a/frontend/src/app/main/ui/workspace/tokens/token.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/token.cljs @@ -47,12 +47,12 @@ (= (token-identifier token) id))) (defn token-applied? - "Test if `token` is applied to a `shape` with at least one of the one of the given `token-attributes`." + "Test if `token` is applied to a `shape` with at least one of the given `token-attributes`." [token shape token-attributes] (some #(token-attribute-applied? token shape %) token-attributes)) (defn shapes-token-applied? - "Test if `token` is applied to to any of `shapes` with at least one of the one of the given `token-attributes`." + "Test if `token` is applied to to any of `shapes` with at least one of the given `token-attributes`." [token shapes token-attributes] (some #(token-applied? token % token-attributes) shapes)) diff --git a/frontend/src/app/main/ui/workspace/tokens/token_pill.cljs b/frontend/src/app/main/ui/workspace/tokens/token_pill.cljs new file mode 100644 index 000000000..92217edf2 --- /dev/null +++ b/frontend/src/app/main/ui/workspace/tokens/token_pill.cljs @@ -0,0 +1,59 @@ +(ns app.main.ui.workspace.tokens.token-pill + (:require-macros [app.main.style :as stl]) + (:require + [app.common.types.tokens-lib :as ctob] + [app.main.ui.components.color-bullet :refer [color-bullet]] + [app.main.ui.ds.foundations.assets.icon :refer [icon*]] + [app.main.ui.ds.foundations.utilities.token.token-status :refer [token-status-icon*]] + [app.main.ui.workspace.tokens.style-dictionary :as sd] + [app.main.ui.workspace.tokens.token :as wtt] + [app.util.i18n :refer [tr]] + [cuerdas.core :as str] + [rumext.v2 :as mf])) + +(mf/defc token-pill + {::mf/wrap-props false} + [{:keys [on-click token theme-token full-applied on-context-menu half-applied]}] + (let [{:keys [name value resolved-value errors]} token + errors? (or (nil? theme-token) (and (seq errors) (seq (:errors theme-token)))) + + color (when (seq (ctob/find-token-value-references value)) + (wtt/resolved-value-hex theme-token)) + + color (or color (wtt/resolved-value-hex token)) + + token-status-id (cond + half-applied + "token-status-partial" + full-applied + "token-status-full" + :else + "token-status-non-applied")] + [:button {:class (stl/css-case :token-pill true + :token-pill-applied (or half-applied full-applied) + :token-pill-invalid errors? + :token-pill-invalid-applied (and full-applied errors?)) + :type "button" + :title (cond + errors? (sd/humanize-errors token) + :else (->> [(str "Token: " name) + (tr "workspace.token.original-value" value) + (tr "workspace.token.resolved-value" resolved-value)] + (str/join "\n"))) + :on-click on-click + :on-context-menu on-context-menu + :disabled errors?} + (cond + color + [:& color-bullet {:color color + :mini true}] + errors? + [:> icon* + {:id "broken-link" + :class (stl/css :token-pill-icon)}] + + :else + [:> token-status-icon* + {:id token-status-id + :class (stl/css :token-pill-icon)}]) + name])) \ No newline at end of file diff --git a/frontend/src/app/main/ui/workspace/tokens/token_pill.scss b/frontend/src/app/main/ui/workspace/tokens/token_pill.scss new file mode 100644 index 000000000..3d39b8dac --- /dev/null +++ b/frontend/src/app/main/ui/workspace/tokens/token_pill.scss @@ -0,0 +1,106 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. +// +// Copyright (c) KALEIDOS INC + +@use "../../ds/typography.scss" as *; +@import "refactor/common-refactor.scss"; +@import "./common.scss"; + +.token-pill { + --token-pill-background: var(--color-background-tertiary); + --token-pill-foreground: var(--color-foreground-secondary); + --token-pill-border: var(--color-background-tertiary); + --token-pill-outline: none; + --token-pill-accent: var(--color-background-quaternary); + + @include use-typography("code-font"); + border: none; + background: none; + cursor: pointer; + display: grid; + grid-template-columns: auto 1fr; + align-items: center; + gap: $s-6; + border: $s-1 solid var(--token-pill-border); + outline: $s-2 solid var(--token-pill-outline); + height: $s-24; + border-radius: $br-8; + padding: $s-2 $s-8 $s-2 $s-4; + color: var(--token-pill-foreground); + background: var(--token-pill-background); + + &:hover { + --token-pill-background: var(--color-token-background); + --token-pill-foreground: var(--color-foreground-primary); + --token-pill-border: var(--color-token-background); + --token-pill-outline: none; + --token-pill-accent: var(--color-background-quaternary); + } + + &:focus-visible { + --token-pill-outline: var(--color-background-primary); + --token-pill-border: var(--color-accent-primary); + outline-offset: -3px; + } + + &:disabled { + --token-pill-background: var(--color-background-primary); + --token-pill-foreground: var(--color-foreground-secondary); + --token-pill-border: var(--color-background-tertiary); + --token-pill-outline: none; + --token-pill-accent: var(--color-background-tertiary); + } +} + +.token-pill-applied { + --token-pill-background: var(--color-token-background); + --token-pill-foreground: var(--color-token-foreground); + --token-pill-border: var(--color-token-border); + --token-pill-accent: var(--color-token-accent); + + &:hover { + --token-pill-background: var(--color-token-background); + --token-pill-foreground: var(--color-foreground-primary); + --token-pill-border: var(--color-token-foreground); + --token-pill-accent: var(--color-token-accent); + } + + &:focus-visible { + --token-pill-background: var(--color-token-background); + --token-pill-foreground: var(--color-token-foreground); + --token-pill-outline: var(--color-accent-primary); + --token-pill-border: var(--color-token-background); + --token-pill-accent: var(--color-token-accent); + } + + &:disabled { + --token-pill-background: var(--color-background-primary); + --token-pill-foreground: var(--color-token-foreground); + --token-pill-border: var(--color-token-accent); + --token-pill-outline: none; + --token-pill-accent: var(--color-token-accent); + } +} + +.token-pill-invalid, +.token-pill-invalid-applied { + --token-pill-background: var(--color-background-tertiary); + --token-pill-foreground: var(--color-foreground-error); + --token-pill-border: var(--color-background-tertiary); + --token-pill-accent: var(--color-foreground-error); + + &:hover, + &:focus-visible, + &:disabled { + --token-pill-background: var(--color-background-tertiary); + --token-pill-foreground: var(--color-foreground-error); + --token-pill-border: var(--color-background-tertiary); + --token-pill-accent: var(--color-foreground-error); + } +} + +.token-pill-icon { + color: var(--token-pill-accent); +} diff --git a/frontend/src/app/main/ui/workspace/tokens/token_set.cljs b/frontend/src/app/main/ui/workspace/tokens/token_set.cljs index 380a6b997..9a38202d8 100644 --- a/frontend/src/app/main/ui/workspace/tokens/token_set.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/token_set.cljs @@ -36,15 +36,15 @@ ;; === Set selection -(defn get-selected-token-set-id [state] - (or (get-in state [:workspace-local :selected-token-set-id]) +(defn get-selected-token-set-path [state] + (or (get-in state [:workspace-local :selected-token-set-path]) (some-> (get-workspace-tokens-lib state) (ctob/get-sets) (first) - (ctob/get-set-path)))) + (ctob/get-set-prefixed-path-string)))) (defn get-selected-token-set-node [state] - (when-let [path (some-> (get-selected-token-set-id state) + (when-let [path (some-> (get-selected-token-set-path state) (ctob/split-token-set-path))] (some-> (get-workspace-tokens-lib state) (ctob/get-in-set-tree path)))) @@ -66,5 +66,5 @@ (defn token-group-selected? [state] (some? (get-selected-token-set-group state))) -(defn assoc-selected-token-set-id [state id] - (assoc-in state [:workspace-local :selected-token-set-id] id)) +(defn assoc-selected-token-set-path [state id] + (assoc-in state [:workspace-local :selected-token-set-path] id)) diff --git a/frontend/src/app/main/ui/workspace/tokens/token_types.cljs b/frontend/src/app/main/ui/workspace/tokens/token_types.cljs index b8247a288..f5979add4 100644 --- a/frontend/src/app/main/ui/workspace/tokens/token_types.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/token_types.cljs @@ -23,8 +23,9 @@ :color {:title "Color" - :attributes ctt/color-keys - :on-update-shape wtch/update-fill + :attributes #{:fill} + :all-attributes ctt/color-keys + :on-update-shape wtch/update-fill-stroke :modal {:key :tokens/color :fields [{:label "Color" :key :color}]}} diff --git a/frontend/src/app/main/ui/workspace/tokens/update.cljs b/frontend/src/app/main/ui/workspace/tokens/update.cljs index e220a07d5..ffe23f261 100644 --- a/frontend/src/app/main/ui/workspace/tokens/update.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/update.cljs @@ -2,8 +2,8 @@ (:require [app.common.types.token :as ctt] [app.main.data.workspace.shape-layout :as dwsl] + [app.main.data.workspace.state-helpers :as wsh] [app.main.data.workspace.undo :as dwu] - [app.main.refs :as refs] [app.main.ui.workspace.tokens.changes :as wtch] [app.main.ui.workspace.tokens.style-dictionary :as wtsd] [app.main.ui.workspace.tokens.token-set :as wtts] @@ -17,10 +17,8 @@ (def filter-existing-values? false) (def attributes->shape-update - {#{:r1 :r2 :r3 :r4} wtch/update-shape-radius-single-corner - #_(fn [v ids _] (wtch/update-shape-radius-all v ids)) - #{:fill} wtch/update-fill - #{:stroke-color} wtch/update-stroke-color + {#{:r1 :r2 :r3 :r4} wtch/update-shape-radius-all + ctt/color-keys wtch/update-fill-stroke ctt/stroke-width-keys wtch/update-stroke-width ctt/sizing-keys wtch/update-shape-dimensions ctt/opacity-keys wtch/update-opacity @@ -108,8 +106,8 @@ update-infos))) shapes-update-info)) -(defn update-tokens [resolved-tokens] - (->> @refs/workspace-page-objects +(defn update-tokens [state resolved-tokens] + (->> (wsh/lookup-page-objects state) (collect-shapes-update-info resolved-tokens) (actionize-shapes-update-info))) @@ -127,5 +125,5 @@ (let [undo-id (js/Symbol)] (rx/concat (rx/of (dwu/start-undo-transaction undo-id)) - (update-tokens sd-tokens) + (update-tokens state sd-tokens) (rx/of (dwu/commit-undo-transaction undo-id)))))))))) diff --git a/frontend/src/app/util/dom.cljs b/frontend/src/app/util/dom.cljs index 4257e8c36..2d3b6c0b9 100644 --- a/frontend/src/app/util/dom.cljs +++ b/frontend/src/app/util/dom.cljs @@ -135,6 +135,12 @@ (when (some? event) (.-target event))) +(defn get-related-target + "Extract the related target from a blur or focus event instance." + [^js event] + (when (some? event) + (.-relatedTarget event))) + (defn select-target "Extract the target from event instance and select it" [^js event] diff --git a/frontend/src/app/worker.cljs b/frontend/src/app/worker.cljs index 502e3d67e..213d20ae2 100644 --- a/frontend/src/app/worker.cljs +++ b/frontend/src/app/worker.cljs @@ -168,7 +168,6 @@ (.removeEventListener js/self "message" on-message)) (defn ^:dev/after-load start [] - [] (set! process-message-sub (subscribe-buffer-messages)) (.addEventListener js/self "message" on-message)) diff --git a/frontend/test/frontend_tests/basic_shapes_test.cljs b/frontend/test/frontend_tests/basic_shapes_test.cljs index 301773837..158ca488c 100644 --- a/frontend/test/frontend_tests/basic_shapes_test.cljs +++ b/frontend/test/frontend_tests/basic_shapes_test.cljs @@ -79,4 +79,4 @@ ;; ==== Check (println stroke') (t/is (some? shape1')) - (t/is (= (:stroke-alignment stroke') :center)))))))) \ No newline at end of file + (t/is (= (:stroke-alignment stroke') :inner)))))))) diff --git a/frontend/test/frontend_tests/helpers/state.cljs b/frontend/test/frontend_tests/helpers/state.cljs index 068a6cce9..4027ccf29 100644 --- a/frontend/test/frontend_tests/helpers/state.cljs +++ b/frontend/test/frontend_tests/helpers/state.cljs @@ -57,7 +57,7 @@ (fn [cause] (js/console.log "[error]:" cause)) (fn [_] - (js/console.log "[complete]")))) + #_(js/console.debug "[complete]")))) (doseq [event events] (ptk/emit! store event)) diff --git a/frontend/test/frontend_tests/logic/components_and_tokens.cljs b/frontend/test/frontend_tests/logic/components_and_tokens.cljs new file mode 100644 index 000000000..d561a75e7 --- /dev/null +++ b/frontend/test/frontend_tests/logic/components_and_tokens.cljs @@ -0,0 +1,426 @@ +;; This Source Code Form is subject to the terms of the Mozilla Public +;; License, v. 2.0. If a copy of the MPL was not distributed with this +;; file, You can obtain one at http://mozilla.org/MPL/2.0/. +;; +;; Copyright (c) KALEIDOS INC +(ns frontend-tests.logic.components-and-tokens + (:require + [app.common.geom.point :as geom] + [app.common.math :as mth] + [app.common.test-helpers.components :as cthc] + [app.common.test-helpers.compositions :as ctho] + [app.common.test-helpers.files :as cthf] + [app.common.test-helpers.ids-map :as cthi] + [app.common.test-helpers.shapes :as cths] + [app.common.test-helpers.tokens :as ctht] + [app.common.types.tokens-lib :as ctob] + [app.main.data.tokens :as dt] + [app.main.data.workspace.libraries :as dwl] + [app.main.data.workspace.selection :as dws] + [app.main.data.workspace.state-helpers :as wsh] + [app.main.ui.workspace.tokens.changes :as wtch] + [app.main.ui.workspace.tokens.update :as wtu] + [cljs.test :as t :include-macros true] + [frontend-tests.helpers.pages :as thp] + [frontend-tests.helpers.state :as ths] + [frontend-tests.tokens.helpers.state :as tohs] + [frontend-tests.tokens.helpers.tokens :as toht])) + +(t/use-fixtures :each + {:before thp/reset-idmap!}) + +(defn- setup-base-file + [] + (-> (cthf/sample-file :file1) + (ctht/add-tokens-lib) + (ctht/update-tokens-lib #(-> % + (ctob/add-set (ctob/make-token-set :name "test-token-set")) + (ctob/add-theme (ctob/make-token-theme :name "test-theme" + :sets #{"test-token-set"})) + (ctob/set-active-themes #{"/test-theme"}) + (ctob/add-token-in-set "test-token-set" + (ctob/make-token :name "test-token-1" + :type :border-radius + :value 25)) + (ctob/add-token-in-set "test-token-set" + (ctob/make-token :name "test-token-2" + :type :border-radius + :value 50)) + (ctob/add-token-in-set "test-token-set" + (ctob/make-token :name "test-token-3" + :type :border-radius + :value 75)))) + (ctho/add-frame :frame1) + (ctht/apply-token-to-shape :frame1 "test-token-1" [:r1 :r2 :r3 :r4] [:r1 :r2 :r3 :r4] 25))) + +(defn- setup-file-with-main + [] + (-> (setup-base-file) + (cthc/make-component :component1 :frame1))) + +(defn- setup-file-with-copy + [] + (-> (setup-file-with-main) + (cthc/instantiate-component :component1 :c-frame1))) + +(t/deftest create-component-with-token + (t/async + done + (let [;; ==== Setup + file (setup-base-file) + store (ths/setup-store file) + + ;; ==== Action + events + [(dws/select-shape (cthi/id :frame1)) + (dwl/add-component)]] + + (ths/run-store + store done events + (fn [new-state] + (let [;; ==== Get + file' (ths/get-file-from-store new-state) + frame1' (cths/get-shape file' :frame1) + tokens-frame1' (:applied-tokens frame1')] + + ;; ==== Check + (t/is (= (count tokens-frame1') 4)) + (t/is (= (get tokens-frame1' :r1) "test-token-1")) + (t/is (= (get tokens-frame1' :r2) "test-token-1")) + (t/is (= (get tokens-frame1' :r3) "test-token-1")) + (t/is (= (get tokens-frame1' :r4) "test-token-1")) + (t/is (= (get frame1' :r1) 25)) + (t/is (= (get frame1' :r2) 25)) + (t/is (= (get frame1' :r3) 25)) + (t/is (= (get frame1' :r4) 25)))))))) + +(t/deftest create-copy-with-token + (t/async + done + (let [;; ==== Setup + file (setup-file-with-main) + store (ths/setup-store file) + + ;; ==== Action + events + [(dwl/instantiate-component (:id file) + (cthi/id :component1) + (geom/point 0 0))]] + + (ths/run-store + store done events + (fn [new-state] + (let [;; ==== Get + selected (wsh/lookup-selected new-state) + c-frame1' (wsh/lookup-shape new-state (first selected)) + tokens-frame1' (:applied-tokens c-frame1')] + + ;; ==== Check + (t/is (= (count tokens-frame1') 4)) + (t/is (= (get tokens-frame1' :r1) "test-token-1")) + (t/is (= (get tokens-frame1' :r2) "test-token-1")) + (t/is (= (get tokens-frame1' :r3) "test-token-1")) + (t/is (= (get tokens-frame1' :r4) "test-token-1")) + (t/is (= (get c-frame1' :r1) 25)) + (t/is (= (get c-frame1' :r2) 25)) + (t/is (= (get c-frame1' :r3) 25)) + (t/is (= (get c-frame1' :r4) 25)))))))) + +(t/deftest change-token-in-main + (t/async + done + (let [;; ==== Setup + file (setup-file-with-copy) + store (ths/setup-store file) + + ;; ==== Action + events [(wtch/apply-token {:shape-ids [(cthi/id :frame1)] + :attributes #{:r1 :r2 :r3 :r4} + :token (toht/get-token file "test-token-2") + :on-update-shape wtch/update-shape-radius-all})] + + step2 (fn [_] + (let [events2 [(dwl/sync-file (:id file) (:id file))]] + (ths/run-store + store done events2 + (fn [new-state] + (let [;; ==== Get + file' (ths/get-file-from-store new-state) + c-frame1' (cths/get-shape file' :c-frame1) + tokens-frame1' (:applied-tokens c-frame1')] + + ;; ==== Check + (t/is (= (count tokens-frame1') 4)) + (t/is (= (get tokens-frame1' :r1) "test-token-2")) + (t/is (= (get tokens-frame1' :r2) "test-token-2")) + (t/is (= (get tokens-frame1' :r3) "test-token-2")) + (t/is (= (get tokens-frame1' :r4) "test-token-2")) + (t/is (= (get c-frame1' :r1) 50)) + (t/is (= (get c-frame1' :r2) 50)) + (t/is (= (get c-frame1' :r3) 50)) + (t/is (= (get c-frame1' :r4) 50)))))))] + + (tohs/run-store-async + store step2 events identity)))) + +(t/deftest remove-token-in-main + (t/async + done + (let [;; ==== Setup + file (setup-file-with-copy) + store (ths/setup-store file) + + ;; ==== Action + events [(wtch/unapply-token {:shape-ids [(cthi/id :frame1)] + :attributes #{:r1 :r2 :r3 :r4} + :token (toht/get-token file "test-token-1")})] + + step2 (fn [_] + (let [events2 [(dwl/sync-file (:id file) (:id file))]] + (ths/run-store + store done events2 + (fn [new-state] + (let [;; ==== Get + file' (ths/get-file-from-store new-state) + c-frame1' (cths/get-shape file' :c-frame1) + tokens-frame1' (:applied-tokens c-frame1')] + + ;; ==== Check + (t/is (= (count tokens-frame1') 0)) + (t/is (= (get c-frame1' :r1) 25)) + (t/is (= (get c-frame1' :r2) 25)) + (t/is (= (get c-frame1' :r3) 25)) + (t/is (= (get c-frame1' :r4) 25)))))))] + + (tohs/run-store-async + store step2 events identity)))) + +(t/deftest modify-token + (t/async + done + (let [;; ==== Setup + file (setup-file-with-copy) + store (ths/setup-store file) + + ;; ==== Action + events [(dt/update-create-token {:token (ctob/make-token :name "test-token-1" + :type :border-radius + :value 66) + :prev-token-name "test-token-1"})] + + step2 (fn [_] + (let [events2 [(wtu/update-workspace-tokens) + (dwl/sync-file (:id file) (:id file))]] + (tohs/run-store-async + store done events2 + (fn [new-state] + (let [;; ==== Get + file' (ths/get-file-from-store new-state) + c-frame1' (cths/get-shape file' :c-frame1) + tokens-frame1' (:applied-tokens c-frame1')] + + ;; ==== Check + (t/is (= (count tokens-frame1') 4)) + (t/is (= (get tokens-frame1' :r1) "test-token-1")) + (t/is (= (get tokens-frame1' :r2) "test-token-1")) + (t/is (= (get tokens-frame1' :r3) "test-token-1")) + (t/is (= (get tokens-frame1' :r4) "test-token-1")) + (t/is (= (get c-frame1' :r1) 66)) + (t/is (= (get c-frame1' :r2) 66)) + (t/is (= (get c-frame1' :r3) 66)) + (t/is (= (get c-frame1' :r4) 66)))))))] + + (tohs/run-store-async + store step2 events identity)))) + +(t/deftest change-token-in-copy-then-change-main + (t/async + done + (let [;; ==== Setup + file (setup-file-with-copy) + store (ths/setup-store file) + + ;; ==== Action + events [(wtch/apply-token {:shape-ids [(cthi/id :c-frame1)] + :attributes #{:r1 :r2 :r3 :r4} + :token (toht/get-token file "test-token-2") + :on-update-shape wtch/update-shape-radius-all}) + (wtch/apply-token {:shape-ids [(cthi/id :frame1)] + :attributes #{:r1 :r2 :r3 :r4} + :token (toht/get-token file "test-token-3") + :on-update-shape wtch/update-shape-radius-all})] + + step2 (fn [_] + (let [events2 [(dwl/sync-file (:id file) (:id file))]] + (ths/run-store + store done events2 + (fn [new-state] + (let [;; ==== Get + file' (ths/get-file-from-store new-state) + c-frame1' (cths/get-shape file' :c-frame1) + tokens-frame1' (:applied-tokens c-frame1')] + + ;; ==== Check + (t/is (= (count tokens-frame1') 4)) + (t/is (= (get tokens-frame1' :r1) "test-token-2")) + (t/is (= (get tokens-frame1' :r2) "test-token-2")) + (t/is (= (get tokens-frame1' :r3) "test-token-2")) + (t/is (= (get tokens-frame1' :r4) "test-token-2")) + (t/is (= (get c-frame1' :r1) 50)) + (t/is (= (get c-frame1' :r2) 50)) + (t/is (= (get c-frame1' :r3) 50)) + (t/is (= (get c-frame1' :r4) 50)))))))] + + (tohs/run-store-async + store step2 events identity)))) + +(t/deftest remove-token-in-copy-then-change-main + (t/async + done + (let [;; ==== Setup + file (setup-file-with-copy) + store (ths/setup-store file) + + ;; ==== Action + events [(wtch/unapply-token {:shape-ids [(cthi/id :c-frame1)] + :attributes #{:r1 :r2 :r3 :r4} + :token (toht/get-token file "test-token-1")}) + (wtch/apply-token {:shape-ids [(cthi/id :frame1)] + :attributes #{:r1 :r2 :r3 :r4} + :token (toht/get-token file "test-token-3") + :on-update-shape wtch/update-shape-radius-all})] + + step2 (fn [_] + (let [events2 [(dwl/sync-file (:id file) (:id file))]] + (ths/run-store + store done events2 + (fn [new-state] + (let [;; ==== Get + file' (ths/get-file-from-store new-state) + c-frame1' (cths/get-shape file' :c-frame1) + tokens-frame1' (:applied-tokens c-frame1')] + + ;; ==== Check + (t/is (= (count tokens-frame1') 0)) + (t/is (= (get c-frame1' :r1) 25)) + (t/is (= (get c-frame1' :r2) 25)) + (t/is (= (get c-frame1' :r3) 25)) + (t/is (= (get c-frame1' :r4) 25)))))))] + + (tohs/run-store-async + store step2 events identity)))) + +(t/deftest modify-token-all-types + (t/async + done + (let [;; ==== Setup + file (-> (cthf/sample-file :file1) + (ctht/add-tokens-lib) + (ctht/update-tokens-lib #(-> % + (ctob/add-set (ctob/make-token-set :name "test-token-set")) + (ctob/add-theme (ctob/make-token-theme :name "test-theme" + :sets #{"test-token-set"})) + (ctob/set-active-themes #{"/test-theme"}) + (ctob/add-token-in-set "test-token-set" + (ctob/make-token :name "token-radius" + :type :border-radius + :value 10)) + (ctob/add-token-in-set "test-token-set" + (ctob/make-token :name "token-rotation" + :type :rotation + :value 30)) + (ctob/add-token-in-set "test-token-set" + (ctob/make-token :name "token-opacity" + :type :opacity + :value 0.7)) + (ctob/add-token-in-set "test-token-set" + (ctob/make-token :name "token-stroke-width" + :type :stroke-width + :value 2)) + (ctob/add-token-in-set "test-token-set" + (ctob/make-token :name "token-color" + :type :color + :value "#00ff00")) + (ctob/add-token-in-set "test-token-set" + (ctob/make-token :name "token-dimensions" + :type :dimensions + :value 100)))) + (ctho/add-frame :frame1) + (ctht/apply-token-to-shape :frame1 "token-radius" [:r1 :r2 :r3 :r4] [:r1 :r2 :r3 :r4] 10) + (ctht/apply-token-to-shape :frame1 "token-rotation" [:rotation] [:rotation] 30) + (ctht/apply-token-to-shape :frame1 "token-opacity" [:opacity] [:opacity] 0.7) + (ctht/apply-token-to-shape :frame1 "token-stroke-width" [:stroke-width] [:stroke-width] 2) + (ctht/apply-token-to-shape :frame1 "token-color" [:stroke-color] [:stroke-color] "#00ff00") + (ctht/apply-token-to-shape :frame1 "token-color" [:fill] [:fill] "#00ff00") + (ctht/apply-token-to-shape :frame1 "token-dimensions" [:width :height] [:width :height] 100) + (cthc/make-component :component1 :frame1) + (cthc/instantiate-component :component1 :c-frame1)) + store (ths/setup-store file) + + ;; ==== Action + events [(dt/update-create-token {:token (ctob/make-token :name "token-radius" + :type :border-radius + :value 30) + :prev-token-name "token-radius"}) + (dt/update-create-token {:token (ctob/make-token :name "token-rotation" + :type :rotation + :value 45) + :prev-token-name "token-rotation"}) + (dt/update-create-token {:token (ctob/make-token :name "token-opacity" + :type :opacity + :value 0.9) + :prev-token-name "token-opacity"}) + (dt/update-create-token {:token (ctob/make-token :name "token-stroke-width" + :type :stroke-width + :value 8) + :prev-token-name "token-stroke-width"}) + (dt/update-create-token {:token (ctob/make-token :name "token-color" + :type :color + :value "#ff0000") + :prev-token-name "token-color"}) + (dt/update-create-token {:token (ctob/make-token :name "token-dimensions" + :type :dimensions + :value 200) + :prev-token-name "token-dimensions"})] + + step2 (fn [_] + (let [events2 [(wtu/update-workspace-tokens) + (dwl/sync-file (:id file) (:id file))]] + (tohs/run-store-async + store done events2 + (fn [new-state] + (let [;; ==== Get + file' (ths/get-file-from-store new-state) + frame1' (cths/get-shape file' :frame1) + c-frame1' (cths/get-shape file' :c-frame1) + tokens-frame1' (:applied-tokens c-frame1')] + + ;; ==== Check + (t/is (= (count tokens-frame1') 11)) + (t/is (= (get tokens-frame1' :r1) "token-radius")) + (t/is (= (get tokens-frame1' :r2) "token-radius")) + (t/is (= (get tokens-frame1' :r3) "token-radius")) + (t/is (= (get tokens-frame1' :r4) "token-radius")) + (t/is (= (get tokens-frame1' :rotation) "token-rotation")) + (t/is (= (get tokens-frame1' :opacity) "token-opacity")) + (t/is (= (get tokens-frame1' :stroke-width) "token-stroke-width")) + (t/is (= (get tokens-frame1' :stroke-color) "token-color")) + (t/is (= (get tokens-frame1' :fill) "token-color")) + (t/is (= (get tokens-frame1' :width) "token-dimensions")) + (t/is (= (get tokens-frame1' :height) "token-dimensions")) + (t/is (= (get c-frame1' :r1) 30)) + (t/is (= (get c-frame1' :r2) 30)) + (t/is (= (get c-frame1' :r3) 30)) + (t/is (= (get c-frame1' :r4) 30)) + (t/is (= (get c-frame1' :rotation) 45)) + (t/is (= (get c-frame1' :opacity) 0.9)) + (t/is (= (get-in c-frame1' [:strokes 0 :stroke-width]) 8)) + (t/is (= (get-in c-frame1' [:strokes 0 :stroke-color]) "#ff0000")) + (t/is (= (get-in c-frame1' [:fills 0 :fill-color]) "#ff0000")) + (t/is (mth/close? (get c-frame1' :width) 200)) + (t/is (mth/close? (get c-frame1' :height) 200)) + + (t/is (empty? (:touched c-frame1'))))))))] + + (tohs/run-store-async + store step2 events identity)))) \ No newline at end of file diff --git a/frontend/test/frontend_tests/runner.cljs b/frontend/test/frontend_tests/runner.cljs index a42eb7203..bca0112e1 100644 --- a/frontend/test/frontend_tests/runner.cljs +++ b/frontend/test/frontend_tests/runner.cljs @@ -4,6 +4,7 @@ [frontend-tests.basic-shapes-test] [frontend-tests.helpers-shapes-test] [frontend-tests.logic.comp-remove-swap-slots-test] + [frontend-tests.logic.components-and-tokens] [frontend-tests.logic.copying-and-duplicating-test] [frontend-tests.logic.frame-guides-test] [frontend-tests.logic.groups-test] @@ -28,6 +29,7 @@ (t/run-tests 'frontend-tests.helpers-shapes-test 'frontend-tests.logic.comp-remove-swap-slots-test + 'frontend-tests.logic.components-and-tokens 'frontend-tests.logic.copying-and-duplicating-test 'frontend-tests.logic.frame-guides-test 'frontend-tests.logic.groups-test diff --git a/frontend/test/frontend_tests/tokens/helpers/tokens.cljs b/frontend/test/frontend_tests/tokens/helpers/tokens.cljs index 29316a1fa..5bfe1ed70 100644 --- a/frontend/test/frontend_tests/tokens/helpers/tokens.cljs +++ b/frontend/test/frontend_tests/tokens/helpers/tokens.cljs @@ -4,11 +4,6 @@ [app.common.types.tokens-lib :as ctob] [app.main.ui.workspace.tokens.token :as wtt])) -(defn add-token [state label params] - (let [id (thi/new-id! label) - token (assoc params :id id)] - (update-in state [:data :tokens] assoc id token))) - (defn get-token [file name] (some-> (get-in file [:data :tokens-lib]) (ctob/get-active-themes-set-tokens) diff --git a/frontend/test/frontend_tests/tokens/logic/token_actions_test.cljs b/frontend/test/frontend_tests/tokens/logic/token_actions_test.cljs index 1eae92e5f..08376d33f 100644 --- a/frontend/test/frontend_tests/tokens/logic/token_actions_test.cljs +++ b/frontend/test/frontend_tests/tokens/logic/token_actions_test.cljs @@ -122,6 +122,38 @@ (t/testing "while :r4 was kept with borderRadius.sm" (t/is (= (:r4 (:applied-tokens rect-1')) (:name token-sm))))))))))) +(t/deftest test-apply-color + (t/testing "applies color token and updates the shape fill and stroke-color" + (t/async + done + (let [color-token {:name "color.primary" + :value "red" + :type :color} + file (-> (setup-file-with-tokens) + (update-in [:data :tokens-lib] + #(ctob/add-token-in-set % "Set A" (ctob/make-token color-token)))) + store (ths/setup-store file) + rect-1 (cths/get-shape file :rect-1) + events [(wtch/apply-token {:shape-ids [(:id rect-1)] + :attributes #{:color} + :token (toht/get-token file "color.primary") + :on-update-shape wtch/update-fill}) + (wtch/apply-token {:shape-ids [(:id rect-1)] + :attributes #{:stroke-color} + :token (toht/get-token file "color.primary") + :on-update-shape wtch/update-stroke-color})]] + (tohs/run-store-async + store done events + (fn [new-state] + (let [file' (ths/get-file-from-store new-state) + token-target' (toht/get-token file' "rotation.medium") + rect-1' (cths/get-shape file' :rect-1)] + (t/is (some? (:applied-tokens rect-1'))) + (t/is (= (:fill (:applied-tokens rect-1')) (:name token-target'))) + (t/is (= (get-in rect-1' [:fills 0 :fill-color]) "#ff0000")) + (t/is (= (:stroke (:applied-tokens rect-1')) (:name token-target'))) + (t/is (= (get-in rect-1' [:strokes 0 :stroke-color]) "#ff0000"))))))))) + (t/deftest test-apply-dimensions (t/testing "applies dimensions token and updates the shapes width and height" (t/async diff --git a/frontend/translations/en.po b/frontend/translations/en.po index a69ddf28b..14e090feb 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -1756,6 +1756,10 @@ msgstr "Expired" msgid "labels.export" msgstr "Export" +#: src/app/main/ui/exports/assets.cljs:177 +msgid "labels.import" +msgstr "Import" + #: src/app/main/ui/settings/feedback.cljs:48 msgid "labels.feedback-disabled" msgstr "Feedback disabled" @@ -5466,12 +5470,12 @@ msgid "workspace.options.radius-top-right" msgstr "Top right" #: src/app/main/ui/workspace/sidebar/options/menus/measures.cljs:639 -msgid "workspace.options.radius.all-corners" -msgstr "All corners" +msgid "workspace.options.radius.hide-all-corners" +msgstr "Collapse independent radius" #: src/app/main/ui/workspace/sidebar/options/menus/measures.cljs:640 -msgid "workspace.options.radius.single-corners" -msgstr "Independent corners" +msgid "workspace.options.radius.show-single-corners" +msgstr "Show independent radius" #: src/app/main/ui/workspace/sidebar/options/menus/typography.cljs:184 msgid "workspace.options.recent-fonts" @@ -6700,6 +6704,202 @@ msgstr "Open version menu" msgid "workspace.viewport.click-to-close-path" msgstr "Click to close the path" +#: src/app/main/ui/workspace/tokens/form.cljs +msgid "workspace.token.create-token" +msgstr "Create new %s token" + +#: src/app/main/ui/workspace/tokens/form.cljs +msgid "workspace.token.edit-token" +msgstr "Edit token" + +#: src/app/main/ui/workspace/tokens/form.cljs, src/app/main/ui/workspace/tokens/token_pill.cljs +msgid "workspace.token.resolved-value" +msgstr "Resolved value: %s" + +#: src/app/main/ui/workspace/tokens/form.cljs +msgid "workspace.token.token-name" +msgstr "Name" + +#: src/app/main/ui/workspace/tokens/form.cljs +msgid "workspace.token.enter-token-name" +msgstr "Enter %s token name" + +#: src/app/main/ui/workspace/tokens/form.cljs +msgid "workspace.token.token-value" +msgstr "Value" + +#: src/app/main/ui/workspace/tokens/form.cljs +msgid "workspace.token.enter-token-value" +msgstr "Enter token value or alias" + +#: src/app/main/ui/workspace/tokens/form.cljs +msgid "workspace.token.token-description" +msgstr "Description" + +#: src/app/main/ui/workspace/tokens/form.cljs +msgid "workspace.token.enter-token-description" +msgstr "Add a description (optional)" + +#: src/app/main/ui/workspace/tokens/sidebar.cljs +msgid "workspace.token.original-value" +msgstr "Original value: %s" + +#: src/app/main/ui/workspace/tokens/sidebar.cljs +msgid "workspace.token.no-themes" +msgstr "There are no themes." + +#: src/app/main/ui/workspace/tokens/sidebar.cljs +msgid "workspace.token.create-one" +msgstr "Create one." + +#: src/app/main/ui/workspace/tokens/sidebar.cljs +msgid "workspace.token.add set" +msgstr "Add set" + +#: src/app/main/ui/workspace/tokens/sidebar.cljs +msgid "workspace.token.tools" +msgstr "Tools" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.save-theme" +msgstr "Save theme" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.create-theme-title" +msgstr "Create theme" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.edit-theme-title" +msgstr "Edit theme" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.delete-theme-title" +msgstr "Delete theme" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.no-themes-currently" +msgstr "You currently have no themes." + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.create-new-theme" +msgstr "Create your first theme now." + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.new-theme" +msgstr "New theme" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.themes" +msgstr "Themes" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.theme-name" +msgstr "Theme %s" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.no-sets" +msgstr "No sets" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.num-sets" +msgstr "%s sets" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.back-to-themes" +msgstr "Back to theme list" + +#: src/app/main/ui/workspace/tokens/theme_select.cljs +msgid "workspace.token.edit-themes" +msgstr "Edit themes" + +#: src/app/main/ui/workspace/tokens/theme_select.cljs +msgid "workspace.token.no-active-theme" +msgstr "No theme active" + +#: src/app/main/ui/workspace/tokens/theme_select.cljs +msgid "workspace.token.active-themes" +msgstr "%s active themes" + +#: src/app/main/ui/workspace/tokens/sets.cljs +msgid "workspace.token.grouping-set-alert" +msgstr "Token Set grouping is not supported yet." + +#: src/app/main/ui/workspace/tokens/sets.cljs +msgid "workspace.token.select-set" +msgstr "Select set." + +#: src/app/main/ui/workspace/tokens/sets.cljs +msgid "workspace.token.set-selection-theme" +msgstr "Define what token sets should be used as part of this theme option:" + +#: src/app/main/ui/workspace/tokens/sets.cljs +msgid "workspace.token.no-sets-yet" +msgstr "There are no sets yet." + +#: src/app/main/ui/workspace/tokens/sets.cljs +msgid "workspace.token.no-sets-create" +msgstr "There are no sets defined yet. Create one first." + +#: src/app/main/ui/workspace/tokens/context_menu.cljs +msgid "workspace.token.delete" +msgstr "Delete token" + +#: src/app/main/ui/workspace/tokens/context_menu.cljs +msgid "workspace.token.duplicate" +msgstr "Duplicate token" + +#: src/app/main/ui/workspace/tokens/context_menu.cljs +msgid "workspace.token.edit" +msgstr "Edit token" + +msgid "workspace.versions.button.save" +msgstr "Save version" + +msgid "workspace.versions.button.pin" +msgstr "Pin version" + +msgid "workspace.versions.button.restore" +msgstr "Restore version" + +msgid "workspace.versions.empty" +msgstr "There are no versions yet" + +msgid "workspace.versions.autosaved.version" +msgstr "Autosaved %s" + +msgid "workspace.versions.autosaved.entry" +msgstr "%s autosave versions" + +msgid "workspace.versions.loading" +msgstr "Loading..." + +msgid "workspace.versions.filter.label" +msgstr "Versions filter" + +msgid "workspace.versions.filter.all" +msgstr "All versions" + +msgid "workspace.versions.filter.mine" +msgstr "My versions" + +msgid "workspace.versions.filter.user" +msgstr "%s's versions" + +msgid "workspace.versions.restore-warning" +msgstr "Do you want to restore this version?" + +msgid "workspace.versions.snapshot-menu" +msgstr "Open snapshot menu" + +msgid "workspace.versions.version-menu" +msgstr "Open version menu" + +msgid "workspace.versions.expand-snapshot" +msgstr "Expand snapshots" + +msgid "workspace.versions.tab.history" +msgstr "History" + msgid "dashboard.notifications.notifications-saved" msgstr "Notification settings updated" diff --git a/frontend/translations/es.po b/frontend/translations/es.po index df0f5dc8e..bac438273 100644 --- a/frontend/translations/es.po +++ b/frontend/translations/es.po @@ -1761,6 +1761,11 @@ msgstr "Expirada" msgid "labels.export" msgstr "Exportar" + +#: src/app/main/ui/exports/assets.cljs:177 +msgid "labels.import" +msgstr "Importar" + #: src/app/main/ui/settings/feedback.cljs:48 msgid "labels.feedback-disabled" msgstr "El modulo de recepción de opiniones esta deshabilitado" @@ -5461,12 +5466,12 @@ msgid "workspace.options.radius-top-right" msgstr "Arriba derecha" #: src/app/main/ui/workspace/sidebar/options/menus/measures.cljs:639 -msgid "workspace.options.radius.all-corners" -msgstr "Todas las esquinas" +msgid "workspace.options.radius.hide-all-corners" +msgstr "Colapsar radios individuales" -#: src/app/main/ui/workspace/sidebar/options/menus/measures.cljs:640 -msgid "workspace.options.radius.single-corners" -msgstr "Esquinas individuales" +#: src/app/main/ui/workspace/sidebar/options/menus/measures.cljs:639 +msgid "workspace.options.radius.show-single-corners" +msgstr "Mostrar radios individuales" #: src/app/main/ui/workspace/sidebar/options/menus/typography.cljs:184 msgid "workspace.options.recent-fonts" @@ -6323,10 +6328,6 @@ msgstr "%s sets" msgid "workspace.token.original-value" msgstr "Valor original: " -#: src/app/main/ui/workspace/tokens/form.cljs:193, src/app/main/ui/workspace/tokens/form.cljs:196, src/app/main/ui/workspace/tokens/sidebar.cljs:67 -msgid "workspace.token.resolved-value" -msgstr "Valor resuelto: " - #: src/app/main/ui/workspace/tokens/modals/themes.cljs:208 msgid "workspace.token.save-theme" msgstr "Guardar tema" @@ -6650,6 +6651,206 @@ msgstr "Abrir menu de versiones" msgid "workspace.viewport.click-to-close-path" msgstr "Pulsar para cerrar la ruta" +msgid "errors.maximum-invitations-by-request-reached" +msgstr "Se ha alcanzado el número máximo (%s) de correos electrónicos que se pueden invitar en una sola solicitud" + +#: src/app/main/ui/workspace/tokens/form.cljs +msgid "workspace.token.create-token" +msgstr "Crear un token de %s" + +#: src/app/main/ui/workspace/tokens/form.cljs +msgid "workspace.token.edit-token" +msgstr "Editar token" + +#: src/app/main/ui/workspace/tokens/form.cljs ,src/app/main/ui/workspace/tokens/token_pill.cljs +msgid "workspace.token.resolved-value" +msgstr "Valor resuelto: %s" + +#: src/app/main/ui/workspace/tokens/form.cljs +msgid "workspace.token.token-name" +msgstr "Nombre" + +#: src/app/main/ui/workspace/tokens/form.cljs +msgid "workspace.token.enter-token-name" +msgstr "Introduce un nombre para el token %s" + +#: src/app/main/ui/workspace/tokens/form.cljs +msgid "workspace.token.token-value" +msgstr "Valor" + +#: src/app/main/ui/workspace/tokens/form.cljs +msgid "workspace.token.enter-token-value" +msgstr "Introduce un valor o alias" + +#: src/app/main/ui/workspace/tokens/form.cljs +msgid "workspace.token.token-description" +msgstr "Descripción" + +#: src/app/main/ui/workspace/tokens/form.cljs +msgid "workspace.token.enter-token-description" +msgstr "Añade una Descripción (opcional)" + +#: src/app/main/ui/workspace/tokens/sidebar.cljs +msgid "workspace.token.original-value" +msgstr "Valor original: %s" + +#: src/app/main/ui/workspace/tokens/sidebar.cljs +msgid "workspace.token.no-themes" +msgstr "No hay temas." + +#: src/app/main/ui/workspace/tokens/sidebar.cljs +msgid "workspace.token.create-one" +msgstr "Crear uno." + +#: src/app/main/ui/workspace/tokens/sidebar.cljs +msgid "workspace.token.add set" +msgstr "Añadir set" + +#: src/app/main/ui/workspace/tokens/sidebar.cljs +msgid "workspace.token.tools" +msgstr "Herramientas" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.save-theme" +msgstr "Guardar tema" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.create-theme-title" +msgstr "Crear tema" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.edit-theme-title" +msgstr "Editar tema" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.delete-theme-title" +msgstr "Borrar theme" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.no-themes-currently" +msgstr "Actualmente no existen temas." + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.create-new-theme" +msgstr "Crea un nuevo tema ahora." + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.new-theme" +msgstr "Nuevo tema" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.themes" +msgstr "Temas" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.theme-name" +msgstr "Tema %s" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.no-sets" +msgstr "No hay sets" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.num-sets" +msgstr "%s sets" + +#: src/app/main/ui/workspace/tokens/modals/themes.cljs +msgid "workspace.token.back-to-themes" +msgstr "Volver al listado de temas" + +#: src/app/main/ui/workspace/tokens/theme_select.cljs +msgid "workspace.token.edit-themes" +msgstr "Editar temas" + +#: src/app/main/ui/workspace/tokens/theme_select.cljs +msgid "workspace.token.no-active-theme" +msgstr "No hay temas activos" + +#: src/app/main/ui/workspace/tokens/theme_select.cljs +msgid "workspace.token.active-themes" +msgstr "%s temas activos" + +#: src/app/main/ui/workspace/tokens/sets.cljs +msgid "workspace.token.grouping-set-alert" +msgstr "La agrupación de sets aun no está soportada." + +#: src/app/main/ui/workspace/tokens/sets.cljs +msgid "workspace.token.select-set" +msgstr "Selecciona set" + +#: src/app/main/ui/workspace/tokens/sets.cljs +msgid "workspace.token.set-selection-theme" +msgstr "Define que sets de tokens deberian formar parte de este tema:" + +#: src/app/main/ui/workspace/tokens/sets.cljs +msgid "workspace.token.no-sets" +msgstr "Aun no hay sets." + +#: src/app/main/ui/workspace/tokens/sets.cljs +msgid "workspace.create-one" +msgstr "Crea uno." + +#: src/app/main/ui/workspace/tokens/sets.cljs +msgid "workspace.token.no-sets-create" +msgstr "Aun no hay sets definidos. Crea uno primero" + +#: src/app/main/ui/workspace/tokens/context_menu.cljs +msgid "workspace.token.delete" +msgstr "Eliminar token" + +#: src/app/main/ui/workspace/tokens/context_menu.cljs +msgid "workspace.token.duplicate" +msgstr "Duplicar token" + +#: src/app/main/ui/workspace/tokens/context_menu.cljs +msgid "workspace.token.edit" +msgstr "Editar token" + +msgid "workspace.versions.button.save" +msgstr "Guardar versión" + +msgid "workspace.versions.button.pin" +msgstr "Fijar versión" + +msgid "workspace.versions.button.restore" +msgstr "Restaurar versión" + +msgid "workspace.versions.empty" +msgstr "No hay versiones aún" + +msgid "workspace.versions.autosaved.version" +msgstr "Autoguardado %s" + +msgid "workspace.versions.autosaved.entry" +msgstr "%s versiones de autoguardado" + +msgid "workspace.versions.loading" +msgstr "Cargando..." + +msgid "workspace.versions.filter.label" +msgstr "Filtro de versiones" + +msgid "workspace.versions.filter.all" +msgstr "Todas las versiones" + +msgid "workspace.versions.filter.mine" +msgstr "Mis versiones" + +msgid "workspace.versions.filter.user" +msgstr "Versiones de %s" + +msgid "workspace.versions.restore-warning" +msgstr "¿Quieres restaurar esta versión?" + +msgid "workspace.versions.snapshot-menu" +msgstr "Abrir menu de versiones" + +msgid "workspace.versions.version-menu" +msgstr "Abrir menu de versiones" + +msgid "workspace.versions.expand-snapshot" +msgstr "Expandir versiones" + msgid "workspace.versions.tab.history" msgstr "Histórico" diff --git a/frontend/yarn.lock b/frontend/yarn.lock index c9ed1b332..1a3cf06e9 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -4557,7 +4557,7 @@ __metadata: shadow-cljs: "npm:2.28.18" source-map-support: "npm:^0.5.21" storybook: "npm:^8.4.6" - style-dictionary: "npm:4.0.0-prerelease.34" + style-dictionary: "npm:4.0.0-prerelease.36" svg-sprite: "npm:^2.0.4" tdigest: "npm:^0.1.2" tinycolor2: "npm:^1.6.0" @@ -8728,9 +8728,9 @@ __metadata: languageName: node linkType: hard -"style-dictionary@npm:4.0.0-prerelease.34": - version: 4.0.0-prerelease.34 - resolution: "style-dictionary@npm:4.0.0-prerelease.34" +"style-dictionary@npm:4.0.0-prerelease.36": + version: 4.0.0-prerelease.36 + resolution: "style-dictionary@npm:4.0.0-prerelease.36" dependencies: "@bundled-es-modules/deepmerge": "npm:^4.3.1" "@bundled-es-modules/glob": "npm:^10.3.13" @@ -8746,7 +8746,7 @@ __metadata: tinycolor2: "npm:^1.6.0" bin: style-dictionary: bin/style-dictionary.js - checksum: 10c0/775d00c0e6aec7749dd5554c448550bc0793aaff9ab028d61ba219476ffa827d3e11866d326c34a27d3e848156b885e476beaade0909fe6b174a50e857dd5009 + checksum: 10c0/8707b3cced5ee7a858c425b296b53f3b9055f388839ab77ec94f9ed012ca99db43ce28fb540cec1659b92680a2769b1ed24d9af891ea98b9b298895341781f30 languageName: node linkType: hard diff --git a/run-ci.sh b/run-ci.sh new file mode 100755 index 000000000..74f0bcef9 --- /dev/null +++ b/run-ci.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +set -e + +echo "################ test common ################" +cd common +yarn install +yarn run fmt:clj:check +yarn run lint:clj +clojure -M:dev:test +yarn run test +cd .. + +echo "################ test frontend ################" +cd frontend +yarn install +yarn run fmt:clj:check +yarn run fmt:js:check +yarn run lint:scss +yarn run lint:clj +yarn run test +cd .. + +echo "################ test integration ################" +cd frontend +yarn install +yarn run test:e2e -x --workers=4 +cd .. + +echo "################ test backend ################" +cd backend +yarn install +yarn run fmt:clj:check +yarn run lint:clj +clojure -M:dev:test --reporter kaocha.report/documentation +cd .. + +echo "################ test exporter ################" +cd exporter +yarn install +yarn run fmt:clj:check +yarn run lint:clj +cd .. + +echo "################ test render-wasm ################" +cd render-wasm +cargo fmt --check +./test +cd .. +