Twilio Paste Intellisense should read from actual theme, not hard-coded values #2964
-
Hey team! I'm starting to dive into Paste more and I found the tokenization to be particularly time-consuming to work with, as described by the Twilio Paste Intellisense README. I had to have multiple theme files up next to my component implementation in VS Code to cross-reference the actual values of spacing/color/font tokens. The VS Code extension is a really good starting point to get familiar with what common tokens resolve to, but after some further digging, I realized it's not reading my current theme, which is a custom Evergreen-ish theme in the Segment app. I assume it's providing values for the default Paste theme right now - looking at the implementation, all of those tokens and values are hard-coded into the extension, which obviously makes it easier for the real values to drift from what the extension is saying they are. It would be really awesome for the extension to:
Do we think this is possible with the way the theme(s) are packaged up and exported? I'm happy to help out with this if we think it's feasible to import/reference in the extension code. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
Hi @brandongregoryscott, thanks for the idea. I've brought this back to the team and someone will reach out shortly to follow up. Cheers! |
Beta Was this translation helpful? Give feedback.
-
I spoke with the team and we think this would be a great improvement to the extension! We encourage you to open a PR to contribute the improvement and our team can hop in to review it. It would also be good to connect with @gkassym who initially contributed the extension to Paste. Let us know if you have any other questions. Thanks for helping to make Paste better! |
Beta Was this translation helpful? Give feedback.
-
Are we OK losing the comments that are currently available in the extension? i.e. when you have hover The token objects exported in I was thinking we could also update the Paste doc site to provide deep-links to each token on this listing page: https://paste.twilio.design/tokens/list, so we could programmatically add links for each, i.e. https://paste.twilio.design/tokens/list#color-background I opened up a PR with the changes for 1 & 2 here: #2980 |
Beta Was this translation helpful? Give feedback.
-
Another improvement we could add is rendering a little box with the fill color (SendGrid theme used in these screenshots, I believe): |
Beta Was this translation helpful? Give feedback.
-
Update: these changes have been finalized and are now a part of our repo! Thanks so much @brandongregoryscott and @gkassym! 🎉 |
Beta Was this translation helpful? Give feedback.
Update: these changes have been finalized and are now a part of our repo! Thanks so much @brandongregoryscott and @gkassym! 🎉