Commit Graph

53 Commits

Author SHA1 Message Date
Nathan Vasse
1529a5b5e7 📝(doc) fixing things in doc
During the keynote we saw some things to fix in the documentation.
2023-01-25 10:37:37 +01:00
Nathan Vasse
31d29d8cbf 📝(doc) fixing typo in colors doc
So it has not more typos.
2023-01-23 13:54:02 +01:00
Nathan Vasse
9658979f54 📝(readme) update readme.md to include figma and storybook links
Things are getting nice.
2023-01-20 17:26:06 +01:00
Nathan Vasse
c032e2e951 (react) publish storybook to github pages
In order to make the storybook visible to everyone. Some changes
had to be made to make index.scss compiled with the rest of the
codebase, it had to be imported from preview.js, not directly from
preview.html.
2023-01-20 17:26:06 +01:00
Nathan Vasse
9bd7317796 📝(doc) sort docs in the Storybook's sidebar
Previously the docs order was defined by the default behavior of
Storybook: discovery order. But, in our situation we want the
"Getting Started" part to appear above "Components", and "Doc"
above any other stories. So we needed to create a custom sort callback.
In order to make this storySort callback to be taken into account by Storybook
it was needed to rename the file to preview.js. Strange but .. meh.
2023-01-20 17:00:31 +01:00
Nathan Vasse
dd2a93ffdf 📝(doc) create a global category for Components
This way we ensure that the main categories of the Storybook docs
are well separated, improving readability.
2023-01-20 17:00:31 +01:00
Nathan Vasse
54fd376e91 📝(doc) create docs for utility classes
In order to showcase the utility classes, we needed to create
beautiful tokens-based docs !
2023-01-20 17:00:31 +01:00
Nathan Vasse
b908136224 (tokens) generate css utility classes
These were the missing parts in order to use every design tokens
of Cunningham. Including: spacing, font weight, size, family, and
colors. In order to be really versatile and to allow users to
define new design tokens I had to re-organize the way those tokens
are sub divided in sub objects in cunningham.ts file. That's why
sub division are created for theme.typ.sizes for instance.
2023-01-20 17:00:31 +01:00
Nathan Vasse
3bb74d8594 🔧(demo) update demo app to customize official tokens
Showcase how to customize an official design token.
2023-01-18 11:29:33 +01:00
Nathan Vasse
ba65b195b5 👷(ci) fix symlink to Cunningham when turbo cache is on
Had the situation where the symlink to the cunningham bin was not
created on yarn build due to the fact that the tokens repo was
not updated. The turbo just replayed logs output, but doing this
prevent the symlink to be created from the package.json's build script.
So, in order to make sure that the symlink always exists, I added it
to the CI build job.
2023-01-18 11:29:33 +01:00
Nathan Vasse
b07f9cc869 (react) add danger color to Button
We adding do's and don't to the documentation I realized that the
danger button was really important in some cases even if the style
was not delivered by designers. Example: Delete buttons.
2023-01-18 11:29:33 +01:00
Nathan Vasse
163bb1f9c8 📝(react) add do's and don't to Button doc
Based on the work delivered by designers, we simply replicates those
in the storybook documentation in order to centralize everything
related to the Button component.
2023-01-18 11:29:33 +01:00
Nathan Vasse
05f9252029 (react) add icon to Button
The DS does not offer an icons set yet but it seems important to
already provide a support for external icons in Button.
2023-01-18 11:29:33 +01:00
Nathan Vasse
9fa0ff8ad3 📝(react) add documentation for Button component
Let's leverage the power of Storybook ! Use MDX file to create a
top notch documentation.
2023-01-18 11:29:33 +01:00
Nathan Vasse
7b6d130d7d (react) implement Button with official tokens
Now that we have all the official design tokens we can use them
to build the button component in various colors matching the
design system's ones.
2023-01-18 11:29:33 +01:00
Nathan Vasse
8f5e546f04 ⬆️(react) upgrade package to use official tokens
... and install user-event library. Setting the stage for
the implementation of real tokens in the Button component.
2023-01-18 11:29:33 +01:00
Nathan Vasse
e5c1693454 (tokens) add official default theme tokens
Due to the recent delivery of the design system document from
designers we are now able to define official design tokens.
2023-01-18 11:29:33 +01:00
Nathan Vasse
b0f5b94834 ♻️(tokens) transform cunningham.dist.js to cunningham.ts
As of now configuration file can use the .ts extension so it
seemed more homogeneous as the bin own source code is using
Typescript.
2023-01-18 11:29:33 +01:00
Nathan Vasse
3e10a58482 📝(changelog) update CHANGELOG.md
Update the changelog to match state of art of the repo.
2023-01-11 11:01:56 +01:00
Nathan Vasse
0311ea69d6 📝(tokens) update tokens package doc for ts and js generators
Add example and more details regarding the -g bin's option.
2023-01-11 11:01:56 +01:00
Nathan Vasse
60be194c47 ⬆️(deps) update yarn.lock
Multiple deps were added, so it's the occasion to update yarn.lock
versions to their latest peer deps.
2023-01-11 11:01:56 +01:00
Nathan Vasse
335365f910 🙈(git) update .gitignore file
Vite can sometimes leave compiled js files as scories.
2023-01-11 11:01:56 +01:00
Nathan Vasse
f48dac79c0 🔧(demo) update demo app to ts config file, customize one token
Showcase a situation where we want to customize a component's design token.
2023-01-11 11:01:56 +01:00
Nathan Vasse
be1c9d000b (react) add tokens.ts files handling
These files will be used to define the custom design tokens per components.
They are automatically aggregated by the packages/react/cunningham.ts file,
this is why handling typescript config file was important.
2023-01-11 11:01:56 +01:00
Nathan Vasse
67dd0048d0 ♻️(tokens) expose default tokens in a lib and various config
This allow to use the default tokens from Typescript or Javascript file
of dependents repos. For instance this wîll be used by packages/react
to aggregate components tokens files.
2023-01-11 11:01:56 +01:00
Nathan Vasse
be2f220624 (tokens) mock default tokens in tests
If we don't do that we will have to update all tests each time the
default value of a token is changed.
2023-01-11 11:01:56 +01:00
Nathan Vasse
2457a93ebf (tokens) add the support for Typescript config file
Add the support to load cunningham.ts local config file based on ts-node.
Those files will be loaded as CommonJS to preserve to coherence regarding
the way the cunningham bin is ran by node.
2023-01-11 11:01:56 +01:00
Nathan Vasse
56da7dde48 (tokens) add -cwd, --working-dir options to the bin
This allows to modify the working dir of the bin. This will be
particularly useful when running tests, this is not especially
intended to be vastly used by end-users.
2023-01-11 11:01:56 +01:00
Nathan Vasse
66e6aad84d (tokens) add TS generator and re-organize the repo
Add TS Generator which is a lot based on JS Generator.
2023-01-11 11:01:56 +01:00
Nathan Vasse
2876d29025 (tokens) add JS generator and re-organize the repo
Added JsGenerator which to implied to reorganize a bit the
repo in order to extract generator-specific test into specific
standalone files.
2023-01-11 11:01:56 +01:00
Nathan Vasse
3e98429d04 ♻️(typescript) move tokens sources to absolute import
Relatives import are quite ugly and reduces readability, but
hard to say that Typescript handles it very well for compilation
time, but nothing for runtime. That's why I had to add tsc-alias
to the build script. Please see this issue for more details.
https://github.com/Microsoft/TypeScript/issues/15479
Furthermore, some configuration was needed for Jest to work well.
2023-01-11 11:01:56 +01:00
Nathan Vasse
7a61402d4e 👷(ci) update gitmojis json url
The repostiory containing the list of valid emojis just got transformed
into a monorepo causing the old url to be obsolete.
2023-01-05 15:08:19 +01:00
Nathan Vasse
fa46237e05 ⬆️(dependencies) update yarn.lock
Do a fresh update of the yarn.lock file.
2023-01-05 14:24:28 +01:00
renovate[bot]
8ff8aec39f ⬆️(dependencies) update js dependencies 2023-01-05 14:24:28 +01:00
Nathan Vasse
f47b1a721e 📌(dependencies) pin vitest to 0.25.7
Vitest 0.26.0 was causing crashes during tests. I posted an issue here
https://github.com/vitest-dev/vitest/issues/2531
2022-12-22 10:16:38 +01:00
renovate[bot]
b1b0037cad ⬆️(dependencies) update js dependencies 2022-12-22 10:16:38 +01:00
Nathan Vasse
38b17473ab 📌(renovate) pin chalk to 4.1.2
Chalk 5.x only support ESM but we use CJS for the tokens package.
2022-12-13 10:44:28 +01:00
renovate[bot]
9aa8f89017 ⬆️(dependencies) update js dependencies 2022-12-13 10:44:28 +01:00
Nathan Vasse
0ccb949fa6 📝(readme) fix title
There were characters preventing correct markdown rendering.
2022-12-12 11:13:07 +01:00
Nathan Vasse
d1a4e7611c 📝(global) add README.md
Create a first version of README.md
2022-12-07 17:07:18 +01:00
Nathan Vasse
7ad502c2c7 🔧(global) add CHANGELOG
Create a changelog to track changes across versions.
2022-12-07 17:07:18 +01:00
Nathan Vasse
31fbdfb22e 🔧(renovate) setup renovate.json
Configure renovate to manage dependencies upgrade.
2022-12-07 17:07:18 +01:00
Nathan Vasse
72017cc5a4 👷(circle) setup circle ci
Add circleci configuration. Add jobs and workflows.
2022-12-07 17:07:18 +01:00
Nathan Vasse
77c2188bad 🧱(global) setup Makefile
Setup Makefile with basic tasks using Docker.
2022-12-07 17:07:18 +01:00
Nathan Vasse
3c74bf5249 🧱(docker) setup
Setup Docker files with Node to run workflows.
2022-12-07 17:07:18 +01:00
Nathan Vasse
62c003780b (demo) add app demo
This demo is useful to test in the real usage of the design system as a real
user that will generate its own customized design tokens, implements the design
system's components, etc ...
2022-12-07 17:07:18 +01:00
Nathan Vasse
4beff43ebe (frontend) add storybook to react repo
Add storybook for the react repo, this will make developing components
enjoyable ! It can also serve as a single source of thruth.
2022-12-07 17:07:18 +01:00
Nathan Vasse
75f2617726 (components) add react repo
This repo only contains a Button which is here only for demonstration purpose.
Its purpose is to contain all the future react-based components of the
design system.
2022-12-07 17:07:18 +01:00
Nathan Vasse
32a48e9e46 (bin) add tokens repo
This repo is made for the bin script that generates the tokens files,
at the moment it only generates a css file, but it is designed to be
able to generate any other file format ( Typescript, Javascript for example )
2022-12-07 17:07:18 +01:00
Nathan Vasse
16172e7a00 🔧(compilation) setup tsconfig package
Add a shared package for tsconfigs splitted between node and frontend concerns
to centralize our standards.
2022-12-07 17:07:18 +01:00