-
We are currently in the process of moving Billing Console over to Paste. On the Billing overview screen, we have two important pieces of information to display - Current balance and Auto recharge, that we need to use Prototype: https://6jzih.sse.codesandbox.io/ Warning state:
Btw, I tried using colorTextWarning but it didn't look right to me in this context. Quick example 👇 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @andoyle Great news on moving billing console over to Paste! Lots of things to cover on this one. Creating textStarting with the construction of the text itself, it's perfectly acceptable to use the
You can achieve that as you might imagine with Box and/or Text
TokensFor the tokens, you're a bit a head of the game and beating us to our announcement, which admittedly I've dropped the ball on. We have recently switched from a dark/light nomenclature for tokens to strong/weak. This is allows us to better things in light and dark modes which aren't necessarily direct opposites. We've deprecated the old tokens in code with a view to remove them in November-ish time. We've hidden them from the site as we don't want you using them, but we've not updated the Figma library with the new tokens names yet. We got a little thin on Design capacity recently, sorry about that. So, Color usageHaving said all that, there are some problems with using colorized text. Color contrastBoth the warning and success text color tokens do not pass the color contrast requirements for text. The status text color tokens are really only intended for use in icons. We do list out the contrast ratios on certain backgrounds as best we can to inform you of that information https://paste.twilio.design/tokens#text-colors but the naming could be more explicit. Communicating meaning with color aloneNow to the main part. On the whole we try to communicate status with the use of text, iconography and color together. Taking the balance as the first example, difference between a good and bad balance potentially is subjective when you remove the color. To use your mocks (I'm guess the mock data is inaccurate but you'll get my point) I don't know why $39 is better than $2000. I think an improvement you could make here is to pair the balance with a status icon, which takes the color, and leave the the numbers in the base text color. The second example is a little more blurry. Recharge status being enable or disabled is at least more clear because it's not necessarily subjective. The color is supplementary to the meaning of the word. So you could get away with green or red text from a technical perspective, but that wouldn't solve the problem that the success text color doesn't pass color contrast requirements. So again, I think pairing with an icon might be the best solution here too. |
Beta Was this translation helpful? Give feedback.
Hi @andoyle
Great news on moving billing console over to Paste! Lots of things to cover on this one.
Creating text
Starting with the construction of the text itself, it's perfectly acceptable to use the
Text
component here, probably your best option. I love the attention to detail on semantics 🙌🏼 ! In this case I wouldn't suggest using a heading at all, aspan
would be fine. But if you really wanted to go above and beyond, a description list would be best as it's a key value pair.You can achieve that as you might imagine with Box and/or Text
To…