Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dashboard): design system tokens #7300

Merged
merged 6 commits into from
Dec 18, 2024
Merged

feat(dashboard): design system tokens #7300

merged 6 commits into from
Dec 18, 2024

Conversation

scopsy
Copy link
Contributor

@scopsy scopsy commented Dec 13, 2024

What changed? Why was the change needed?

  • Added and aligned on all design tokens from Align UI
  • Added missing tailwind classes and typography

Screenshots

Expand for optional sections

Related enterprise PR

Special notes for your reviewer

Copy link

netlify bot commented Dec 13, 2024

Deploy Preview for dev-web-novu ready!

Name Link
🔨 Latest commit 2c37400
🔍 Latest deploy log https://app.netlify.com/sites/dev-web-novu/deploys/6762f168caee5e000892e7f1
😎 Deploy Preview https://deploy-preview-7300.dashboard.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 13, 2024

Deploy Preview for dashboard-v2-novu-staging ready!

Name Link
🔨 Latest commit 2c37400
🔍 Latest deploy log https://app.netlify.com/sites/dashboard-v2-novu-staging/deploys/6762f168308b6500081d5d0e
😎 Deploy Preview https://deploy-preview-7300.dashboard-v2.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@twentyone24 twentyone24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

apps/dashboard/tailwind.config.js Show resolved Hide resolved
--purple-300: 256 88% 64% / 60%;
--purple-200: 256 88% 64% / 40%;
--purple-100: 256 88% 64% / 20%;
--purple-50: 256 88% 64% / 10%;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it a bit weird that some colors have opacity and some not ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tend to agree, @twentyone24 do you think we can make all of the opacity based? Or is it too much effort?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we can make it, then we don't need to define all the tokens in this CSS file. Instead, we will just have "base" colors and generate all the "semantic" ones in the tailwind config. Otherwise still we can simplify the opacity variables by defining them in the tw.

@scopsy scopsy requested a review from LetItRock December 15, 2024 07:45
@desiprisg
Copy link
Contributor

I'm beginning to think that we should not add all of these right now. We started with the mentality that we will be adding on demand. All of these colors are unused. Maybe let's just do the semantic colors?

@scopsy
Copy link
Contributor Author

scopsy commented Dec 16, 2024

@desiprisg what do you mean by semantic colors? you mean removing the sky, and pink, teal and the ones that are unused? @twentyone24 what do you think? IMO, if we have a color on the design system on figma we should also have it here. Otherwise let's remove it from Figma.

@@ -18,7 +35,27 @@
--foreground-900: 226 21% 12%;
--foreground-950: 222 32% 8%;

--primary: 346 73% 50%;
--novu-800: 346 72% 42%;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is Novu color the primary color?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Align doesa separation between the color pallete, and their semantic usage. Novu is the color palette, while primary is the semantic usage of the novu color.

--warning-light: var(--orange-200);
--warning-lighter: var(--orange-50);

--error-dark: var(--red-950);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does Align UI suggest this practice? I am not well-versed in how modern design systems prefer to do this, but I'd avoid overloading CSS with too many semantics. As a pattern, it makes sense when the color needs to be reused in two semantic tokens, for example, error and destructive in our case, but I'd resolve this in the component layer.

That is, on the CSS level, we can define a red var, and then we will define a message that is an error and uses red or a destructive button that also uses red.

Let me know if this sounds reasonable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it is how align works, and destructive actually doesn't exists in align. They just call it error which uses the red color palette. I kept here the current destructive naming during the migration period. It will be removed in favor of the align tokens for errors

lighter: 'hsl(var(--away-lighter))',
},
error: {
DEFAULT: 'hsl(var(--error))',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refer to my previous comment about adding too many tokens and variables on the CSS level.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would highly suggest keeping the align UI based approach, as it will ensure on modification of a color token all relevant components will be updated, in-case we would want to change things like color-feature for example. it is mapped perfectly to what naveen is having on Figma and it will simplify our maintenance for new components assell. As copy-paste from align UI snippets will work out of the box.

@desiprisg
Copy link
Contributor

@desiprisg what do you mean by semantic colors? you mean removing the sky, and pink, teal and the ones that are unused? @twentyone24 what do you think? IMO, if we have a color on the design system on figma we should also have it here. Otherwise let's remove it from Figma.

Yes, I mean add what makes sense for us. Align ui provides 100x what we need, to I don't understand why we need to use the colors in the boilerplate here. It was supposed to be a starting point and we would create our own design system. This never happened.

@twentyone24
Copy link
Collaborator

twentyone24 commented Dec 17, 2024

@desiprisg what do you mean by semantic colors? you mean removing the sky, and pink, teal and the ones that are unused? @twentyone24 what do you think? IMO, if we have a color on the design system on figma we should also have it here. Otherwise let's remove it from Figma.

Makes sense, I agree.
but, we use most of the colors (eg: x-light of all colors) for steps.
we might not use all three variations of a color, but I feel it is OK to have the group if atleast one is used.

@scopsy
Copy link
Contributor Author

scopsy commented Dec 18, 2024

Team, I'm merging this PR as is. To maintain consistency and speed up front-end implementation, let's avoid creating custom patterns when using the Align UI design system. Following their definitions will help us achieve a more uniform UI with less work. I'm currently updating some of our components to align their prop terminology with the design system, ensuring that our Figma screens and code components use similar language. Once I have a proof of concept ready, I'll schedule an engineering session to review it and establish guidelines for modifying design system components and going forward.

@scopsy scopsy merged commit dfe2cdc into next Dec 18, 2024
34 checks passed
@scopsy scopsy deleted the design-system-tokens branch December 18, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants