feat: add design tokens and Container Section Card to Storybook#3744
Conversation
|
You can access the deployment of this PR at https://renku-ci-ui-3744.dev.renku.ch |
41a846c to
93aeed5
Compare
lorenzo-cavazzi
left a comment
There was a problem hiding this comment.
I'm going through this PR and I have two main comments:
- Design tokens: I like the level of detail! That should cover most of the needs of the design team. However, using static strings for the style attributes we wish to capture isn't the best approach. We would need to manually update those strings if we update anything on Bootstrap. We can check the rendered elements instead using
getComputedStyle - Molecules: Great to include more examples and longer descriptions wherever necessary (Cards are a good example) but sections like "Layout & Spacing" or "Typography" seem unnecessary (E.G. we don't need to say that card's background are white, nor that the class
.bg-whiteis applied -- which isn't the case) and hard to maintain in the long run (not extracted automatically).
In the reference pitch there was something about exporting to Figma but I don't see from here how it is done.
| black: { value: "#000000", notes: "" }, | ||
| }, | ||
| text: { | ||
| "text-primary": { value: "#006e58" }, |
There was a problem hiding this comment.
You can get the values using a function like getComputedStyle instead of hardcoding
There was a problem hiding this comment.
Thanks @lorenzo-cavazzi for the review. I agree with your suggestions. I’ve refactored the code to retrieve values using getComputedStyle and removed the unnecessary information from the card component.
86b33ca to
8b43b46
Compare
8b43b46 to
aaedd1e
Compare
lorenzo-cavazzi
left a comment
There was a problem hiding this comment.
Very nice! 👏
Just a couple of small changes before we merge.
| className="p-3 bg-white d-flex flex-column" | ||
| style={{ height: 160 }} | ||
| > | ||
| <CopyRow |
| grayscale: { | ||
| title: " Grayscale", | ||
| type: "color", | ||
| tokens: [ | ||
| "white", | ||
| "light", | ||
| "dark", | ||
| "gray", | ||
| "gray-dark", | ||
| "gray-100", | ||
| "gray-200", | ||
| "gray-300", | ||
| "gray-400", | ||
| "gray-500", | ||
| "gray-600", | ||
| "gray-700", | ||
| "gray-800", | ||
| "gray-900", | ||
| "black", | ||
| ], | ||
| }, |
There was a problem hiding this comment.
I'm not sure we need to show all the gray shades since we generally don't use them directly through classes. I suggest we rename this section to "main colors", leave "white, black, light, dark", remove all the "gray-" variations and add the other main colors (danger, success, info, ...)
| "body-font-weight": "Default font weight", | ||
| "body-line-height": "Default line height for readability", | ||
| }, | ||
| fontSizes: ["fs-1", "fs-2", "fs-3", "fs-4", "fs-5", "fs-6"], |
There was a problem hiding this comment.
| fontSizes: ["fs-1", "fs-2", "fs-3", "fs-4", "fs-5", "fs-6"], | |
| fontSizes: ["fs-1", "fs-2", "fs-3", "fs-4"], |
We can drop 5 and 6 since they are the same size of 3 and 4 and we generally don't use them anymore -- there are leftovers ofc, but most of them are on legacy pages.
|
Thanks for the feedback, @lorenzo-cavazzi I’ve applied your suggestions. |
|
Tearing down the temporary RenkuLab deplyoment for this PR. |



This PR introduces foundational updates to our Storybook:
✅ What's included
Design Tokens: New stories for the following tokens used across our UI:
Container Section Card: First documented component added under the new structure, following improved documentation practices for component stories in Storybook.
📚 Why this matters
We’ve started reorganizing our Storybook to align with the Atomic Design methodology, which the design team also follows. This structure will help improve consistency, reusability, and collaboration between design and development teams.
Our new Storybook structure looks like this:
📌 Next steps / To-dos for upcoming PRs
Data connectorcard spacing (me-2instead ofgap-2).d-flex justify-content-betweeninstead ofms-autoReferences
/deploy
! RESTORE THE PREVIOUS POINTER to
andrea/simplify-dc-formfix #3551