Commit Graph

296 Commits

Author SHA1 Message Date
Nathan Vasse
cf542e4fa9 💄(react) fix DatePicker, Select, Input success colors
This is based on recent QA report.
2023-09-11 12:07:49 +02:00
Nathan Vasse
9a349c1556 💄(react) fix Select and Input error colors
This was a feedback from the QA.
2023-09-11 12:07:49 +02:00
Nathan Vasse
1c45b93a85 💄(react) homogenize form fields colors
Based on the QA feedbacks we figured out that form fields were not all
using the exact same greyscale colors.
2023-09-11 12:07:49 +02:00
Nathan Vasse
4c64cb3993 📝(react) add disabled form example
Before it wasn't really handy to see form inputs next to each other
in order to make sure that their style is homogeneous when being
disabled.
2023-09-11 12:07:49 +02:00
Nathan Vasse
94f392e037 💄(react) update DatePicker error color
The QA reported that the colors were not correct.
2023-09-11 12:07:49 +02:00
Nathan Vasse
37772a4b85 💄(react) update DatePicker segments colors
Based on QA feedbacks we just want a background color for the focused
segments.
2023-09-11 12:07:49 +02:00
Nathan Vasse
09e474c8c1 ♻️(react) update Pagination behavior
We want to make the Pagination more intuitive and fluent. Now it displays
the current page all the time, auto select, auto submits on blur.
2023-09-11 12:07:49 +02:00
Nathan Vasse
c90f66f0cd 💄(react) hide input number arrows
During our last meeting regarding the QA the designer told us to remove
the arrows on the number input. We can still change the value with the
keyboard arrows, so it does not cause a11y issues.
2023-09-11 12:07:49 +02:00
Nathan Vasse
21b6d77913 💄(react) fix the css order in storybook
Previously, having the icon file coming after the design system styles
was causing issues: we were not able to set fs-* classes to material-icons
because the priority of the selector was too low.
2023-09-11 12:07:49 +02:00
Nathan Vasse
71dc458ab4 ♻️(react) use nano Button inside DatePicker
Based on the last QA it appears that we were using wrong button size
and icon size ratio. By using the newly created nano size we can make
the code much simpler.
2023-09-11 12:07:49 +02:00
Nathan Vasse
32b8dc0915 💄(react) make DatePicker placeholders uppercase
This was a feedback from the QA.
2023-09-11 12:07:49 +02:00
Nathan Vasse
c0028966f1 (react) add a nano button, proper icon sizes
Previously we had to hack the button in order to display small clickable
icons, like the clear button in the DatePicker. By introducing a new
nano button we can natively achieve that. Also make more homegenous
font size and icon sizes in existing button sizes.
2023-09-11 12:07:49 +02:00
Nathan Vasse
495f7d3731 💄(react) fix DatePicker focus
Based on QA feedback the keyboard focus of the DatePicker was using
the browser default outline ( when navigating with tab key ), this
ensure a consistent style accross different focus modes.
2023-09-11 12:07:49 +02:00
Nathan Vasse
9be1ec52b3 💄(react) make the checkboxes column the smallest
QA feedbacks told us that the checkbox column was too wide, this update
makes it the smallest possible.
2023-09-11 12:07:49 +02:00
Nathan Vasse
cf299d9e2b 💄(react) align actions column items on the right
The design-system guidelines tell that actions button must be aligned
on the right. To make this behavior effortless this feature adds a
special class to actions column to apply the correct css style in order
to achieve that.
2023-09-11 12:07:49 +02:00
Nathan Vasse
4d2a5d1873 💄(react) update DataGrid empty placeholder's ui
The border was not matching the sketches.
2023-09-11 12:07:49 +02:00
Nathan Vasse
7128e7fef7 💄(react) using correct DataGrid header class
Previously the headers of the DataGrid were not aligned with the
correct title class.
2023-09-11 12:07:49 +02:00
Nathan Vasse
6236729ae8 💄(tokens) titles QA feedbacks
QA-based updates to the title classes, the letter-spacing was not
taken into account previously.
2023-09-11 12:07:49 +02:00
Nathan Vasse
4e6e5a2e52 💄(react) fix Button style
QA-based updates to the Button components. It includes global UI updates
to make the Button to match the sketches.
2023-09-11 12:07:49 +02:00
Nathan Vasse
37de4b3d70 🔖(release) version packages
Bump @openfun/cunningham-react to 1.0.2
2023-09-07 09:59:52 +02:00
Nathan Vasse
051c79fd6f ♻️(react) improve props propagation
Before we had to edit input components using Field when adding new props
to the latter.
2023-09-05 11:48:04 +02:00
Nathan Vasse
b530e966ae (react) add textItems to Field
This allow to add bullet points lists below inputs, the best example
is when we want to list multiple errors from form validation.

Fixes #147
2023-09-05 11:48:04 +02:00
Nathan Vasse
468c8161eb 📝(react) add RHF examples
Rework a bit the recent work made on RHF example to make some component
more generic, such as RhfSelect and RhfDatepicker, which is based on a
design using RHF context hooks to provide a seamless integration.

Fixes #144
2023-09-05 11:15:51 +02:00
Nathan Vasse
90a8f559b4 🚨(react) fix stories file warnings
Revert the changes made in the d05e385 commit, it was causing IDE
warnings in stories files about source files that cannot be resolved,
but in reality Storybook really base its config on the local tsconfig.json,
so excluding stories.tsx files was just a ugly temporary fix.
2023-09-05 11:15:51 +02:00
Nathan Vasse
a88aa1a23d 🐛(react) fix isActive console warning
Previously when interacting with a select, the list items
were triggering a warning.
2023-09-05 11:15:51 +02:00
Nathan Vasse
0683047763 🔖(release) version packages
Bump @openfun/cunningham-react to 1.0.1
2023-08-29 16:49:06 +02:00
Nathan Vasse
66c25bcdbd 🏷️(react) export more types
Based on recent developers feedbacks that needed to use props types
in order to wrap the lib's component they were stuck because we were
not exporting all of them.

Fixes #143
2023-08-29 16:26:40 +02:00
jbpenrath
b6e5a876d3 🔖(tokens) major bump to v1.0.0
Major Changes

- The first bunch of components and features are ready,
  the first milestone has been reached
2023-08-21 17:58:14 +02:00
jbpenrath
90faa82245 🔖(react) major bump to v1.0.0
Major Changes

- The first bunch of components and features are ready,
  the first milestone has been reached

Minor Changes

- 9edb976: Position Datepicker popover on top or bottom depending space
available

Patch Changes

- fd7ad8a: Do not apply font-family to all elements with `*` selector
2023-08-21 17:58:14 +02:00
jbpenrath
c89d9dc6df 🚨(react) fix linter warning & errors
With upgrade new linter warning and erros are popped up. So we fix it.
2023-08-21 15:33:50 +02:00
jbpenrath
151382dec2 ⬆️(frontend) migrate to testing-library/jest-dom 6.0.0
The new version of `testing-library/jest-dom` now offers several modules
 to extend vitest interface. We have to update the import path to extend
 vitest dom interface.
2023-08-21 15:33:50 +02:00
renovate[bot]
25b8f696ed ⬆️(dependencies) update js dependencies 2023-08-21 15:33:50 +02:00
Anthony Le Courric
9edb9765db (react) position top datepicker
Position the datepicker on top of the input when the input is
at the bottom of the screen and whenthere is enough space to display
the datepicker on the top.
2023-08-21 12:32:14 +02:00
Anthony Le Courric
6ea8544fed 🔨(project) add json, cjs and js extensions to prettier config
Prettier had some missing extensions in the config, this commit
added them, we then prettified the whole project. We
ignore the `cunningham-tokens` files.
2023-08-21 12:32:14 +02:00
Anthony Le Courric
b46aaa66ed 🚨(packages) fix eslint tsconfig root dir
Eslint extension highlighted some issues with the way we were
importing the tsconfig.json file in the .eslintrc.json file.
By changing the extension to .cjs, we are now able to set
tsconfigRootDir to the root of the package thanks to `dirname`.
It helps eslint to find the correct tsconfig.json file.
2023-08-21 12:32:14 +02:00
Anthony Le Courric
c880222c12 🔧(react) adapt script and config to use the watch mode of vite
If we work from an app perspective, it is nice to have a watch mode
on our packages to see the changes in real time. Better to use the
watch mode of vite (rollup) compare to nodemon because it is faster,
we re-transpile only the files that have changed.
Possility to use the wath mode by polling as well, on a remote machine
the HMR does not work well, the polling mode helps to solve this issue.
2023-08-21 12:32:14 +02:00
Anthony Le Courric
4f4f1682a6 🔧(packages) make scripts cross platform friendly
Some scripts had errors when running on windows.
We now use some cross platform cli tools to be
able to run the scripts on every platform.
2023-08-21 12:32:14 +02:00
jbpenrath
956e6f2367 💚(tokens) fix flaky test
Currently tokens test are flaky. It appears `cleanup` function can raise
 an Error. Locally, we use `runInBand` option to run our tests and all
 is working fine. The mess up could appear when test are running in
 parallel as cleanup can remove file used in other test at any moment.
2023-08-11 17:10:57 +02:00
jbpenrath
944370cc02 🔧(react) enforce to use UTC timezone in our test
Currently, the timezone used in test depends to the local environment
that is weird. So we enforce the use of UTC timezone in our tests.
2023-08-11 17:10:57 +02:00
jbpenrath
fd7ad8a2f2 💄(react) do not apply font-family to all elements with * selector
Currently, `react` package use `*` selector to enforce the font family
to all elements. That is weird as all elements are not able anymore to
inherit their font-family from their parent. In order to enforce the use
 of font-family base by default without breaking the parent inheritance,
  we apply font-family to the body element instead.

Fix #137
2023-08-11 17:10:57 +02:00
jbpenrath
fed31ddbb9 🔖(react) fix release 0.11.1
Patch Changes
- 7de28bc: Fix bug on sass token generation
2023-08-11 09:16:26 +02:00
jbpenrath
e3ee7ac065 🔖(tokens) fix release 0.7.1
Patch Changes
- 7de28bc: Fix bug on sass token generation
2023-08-11 09:16:26 +02:00
jbpenrath
41ddaa5251 🔧(react) chain commands within build script
Currently commands within build script are not chained so if one fail,
all other will run that could lead to mistunderstanding, that all is
working fine when no...
2023-08-10 18:37:15 +02:00
Romain Le Cellier
4eae45c4d9 🐛(react) fix RadioGroup optional prop
since 5dde74c10d RadioGroup style was a
mandatory property.
It should be optional.
2023-08-10 18:37:15 +02:00
Romain Le Cellier
3e1cdbe9d6 🚑️(react) fix unexisting import
Since b72d0d5c90 InputRefType doesn't
exist.
We missed some usage of it that are removed in this fix.
2023-08-10 18:37:15 +02:00
Romain Le Cellier
7de28bcf9b 🐛(tokens) fix generators
When customized tokens have multiple entries like theme and components,
each variable definition needs to end with a ;.
2023-08-10 15:30:32 +02:00
Romain Le Cellier
53bccd111b 🔖(release) version packages
Bump @openfun/cunningham-react to 0.11.0
2023-08-07 17:35:47 +02:00
Romain Le Cellier
5dde74c10d 📝(react) react-hook-form forms Sports examples
Our forms needs to be usable with react-hook-form
2023-08-07 16:25:00 +02:00
Romain Le Cellier
d0941ae0a7 📝(react) react-hook-form forms Login examples
Our forms needs to be usable with react-hook-form
2023-08-07 16:25:00 +02:00
Romain Le Cellier
e3563f85d1 (react) react-hook-form Select example
Our form elements needs to be usable with react-hook-form
2023-08-07 16:25:00 +02:00