Commit Graph

494 Commits

Author SHA1 Message Date
jbpenrath
a61e6ec169 📌(deps) pin eslint to version less than 9
Eslint 9 has been recently released but some related dependencies are
not yet compatible (e.g: @typescript-eslint/parser). So we have to pin
this deps awaiting the support by other deps.
2024-04-29 15:38:22 +02:00
renovate[bot]
737c8f4b4d ⬆️(dependencies) update js dependencies 2024-04-29 15:38:22 +02:00
Nathan Vasse
416d5c1d7e 🔖(release) version packages
Bump @openfun/cunningham-react to 2.8.0
2024-04-24 17:34:12 +02:00
Nathan Vasse
91c8935a8a 🐛(react) fix Select mono selected item update label
When we were updating the label from the options array of the selected
item, the field was still showing this old value.

Fixes #316
2024-04-24 17:23:26 +02:00
Nathan Vasse
285cf99681 (react) add closeOnEsc props to Modal
We want to be able to disable closing modals by pressing escape in
some cases.
2024-04-23 14:38:44 +02:00
Nathan Vasse
2916dd2af9 (react) add custom modal portal
In some apps this is mostly needed, for instance: when the
CunninghamProvider is nested in the DOM, we want the modal to still
be displayed on top of anything else, then in those cases we will be
able to define a node directly in the body and tell cunningham to
render modals inside it.
2024-04-23 14:38:44 +02:00
Nathan Vasse
6ebeb116d3 ♻️(react) migrate Modals to react modal
We encoutered an issue where stacked modal backdrop were not rendered
above the modal below. It was caused by the dialog element that is
natively rendered on the top layer regardless where it is create in
the DOM. So we decided to use react modal that provides hand crafted
dialog, and implementing a11y features.

Closes #314
2024-04-23 14:38:44 +02:00
Nathan Vasse
c61b2ac43d (react) introduce large and extra-large new modal sizes
We realized it was missing an in between medium and large existing
modal sizes. The old large now become extra-large.

Closes #313
2024-04-23 14:38:44 +02:00
Nathan Vasse
c81c0eaf43 🔖(release) version packages
Bump @openfun/cunningham-react to 2.7.0
2024-03-28 17:36:03 +01:00
Nathan Vasse
de8c9dace7 🔧(react) remove Misc stories from Storybook sidebar
These files include stories only used from regular documentation,
they have no other purpose so we decided to hide them.
2024-03-28 11:34:44 +01:00
Nathan Vasse
dd1f2be22c 📦️(react) remove public files from build
Those unwanted files were included in the build, thus in the package.

Fixes #308
2024-03-28 11:31:36 +01:00
Nathan Vasse
06fca5b34e ♻️(react) disable animation when Chromatic is running
We need to disable Javascript animation when Chromatic is taking
snapshots in order to avoid having changes detected each time a build
is ran.
2024-03-25 15:40:27 +01:00
Nathan Vasse
9c614953b8 ♻️(react) remove faker usage from stories
Random data in stories was causing Chromatic to detect changes during
each build.
2024-03-25 15:40:27 +01:00
Nathan Vasse
f10e0e2fde (react) add Chromatic support
We need to be able to run some visual testing during our releases,
Chromatic is the best choice for Storybook.
2024-03-25 15:40:27 +01:00
Nathan Vasse
a8ec9fb757 (react) add InputPassword
We had the need to have a built-in password input able to show or
hide the password.

Closes #301
2024-03-21 17:16:39 +01:00
Nathan Vasse
c63aff4861 📝(react) upgrade stories for Storybook 8
The old way of using Canvas is deprecated, we need to migrate all the
stories to the new standard.
2024-03-21 17:00:04 +01:00
Nathan Vasse
1f80674717 📝(doc) upgrade doc for Storybook v8
The Canvas block does not handle free source code anymore, now we need
to put it in a dedicated Story.
2024-03-21 17:00:04 +01:00
Nathan Vasse
112f59dd90 🔧(deps) upgrade Storybook configuration files
This upgrade requires to update the configuration files.
2024-03-21 17:00:04 +01:00
Nathan Vasse
e97e00de03 ⬆️(deps) upgrade to Storybook 8
This upgrade also imply to upgrade the gfm addon.
2024-03-21 17:00:04 +01:00
Nathan Vasse
0ef7684b12 (react) add Tooltip component
This component will allow to provide contextual information on any
DOM node.

Closes #239
2024-03-21 16:14:55 +01:00
Nathan Vasse
b4a6367bce 🐛(react) fix DataGrid selection checkbox rerendering
Each time a row was select or unselect the checkbox was re-triggering
its animation, which looked buggy.

Fixes #37
2024-03-19 14:34:14 +01:00
Nathan Vasse
20f5bb703b ♻️(react) make className standard across components
The className prop was sometimes set onto the nested element and
sometimes on the container element, which was not consistent. Now
we always set the className onto the upmost element.
2024-03-19 14:15:35 +01:00
Nathan Vasse
f398e51db3 (react) add width property to DataGrid columns
Without this feature we needed to override CSS directly in order to
make columns a specific width.

Closes #240
2024-03-18 17:01:01 +01:00
Nathan Vasse
5446d70bca 📝(react) fix RHF login example
This story was broken due to incorrect usage of FormProvider.
2024-03-18 16:48:35 +01:00
Nathan Vasse
25e61c2b4a (react) add enableSorting support on DataGrid
Previously it was only available at column level. This way we will
be able to disable sorting on all columns at once.

Closes #298
2024-03-15 15:47:43 +01:00
Nathan Vasse
8e7300b92c 💄(react) add border-radius transition
This transition was not working, now this provides are smoother effect.

Closes #112
2024-03-13 15:53:59 +01:00
Nathan Vasse
974f139f14 🐛(react) add warning when onSortModelChange is missing
We encountered the case were a user reported that the column were
making cursor pointer but clicking on it was doing nothing. It was
caused by the fact that onSortModelChange was not provided. So in
this case we trigger a warning only if enableSorting is true on one
column at least.
2024-03-12 11:34:20 +01:00
Nathan Vasse
317cab4bad (react) add sorting on custom cells
Previously sorting on custom cells was not possible because they were
considered as "display cells" by React-Table, which is made for actions
columns, which aren't sortable.

Closes #296 #100
2024-03-12 11:34:20 +01:00
renovate[bot]
91a7b2369f ⬆️(dependencies) update js dependencies 2024-03-11 16:29:45 +01:00
Nathan Vasse
30ec253ab0 (react) make Pagination goto input optionnal
Based on a recent request we needed to make it optionnal in order to
have simpler pagination in some cases.

Closes #183
2024-03-08 16:33:54 +01:00
Nathan Vasse
d63c203b21 🚨(react) fix CSS end warning usage
Next.js is warning about the usage of end instead of flex-end during
compilation.

Fixes #291
2024-03-08 15:06:25 +01:00
Nathan Vasse
31fa91e92f (react) add empty placeholder customization props
We want to be able to customize the empty placeholder label, add a
call to action and choose whether we want to display the image as well.

Closes #27
2024-03-06 17:43:29 +01:00
Nathan Vasse
c667d51a11 🔖(release) version packages
Bump @openfun/cunningham-tokens to 2.1.1
Bump @openfun/cunningham-react to 2.6.0
2024-03-04 15:50:15 +01:00
Nathan Vasse
04ab3306e2 (react) add onSearchInputChange callback to searchable select
We want to be able to notify an event when the search term of the
searchable select gets updated.
2024-03-04 14:40:40 +01:00
Nathan Vasse
680365a117 💄(react) make Modal close button sticky
We want to make sure this button is always visible inside scrollable
modals.

Fixes #278
2024-02-28 17:36:32 +01:00
Nathan Vasse
c5e5d9fa85 📝(react) make color prop of Button appear in the doc
This prop color was not appearing in the ArgTypes because it was an override
attribute.

Fixes #235
2024-02-28 17:31:02 +01:00
Nathan Vasse
ce7a3d7c5b 📱(react) improve Modal responsive
The footer of the Modal component was not perfect on mobile, the sided
footer must be on two lines on mobile.
2024-02-28 17:19:32 +01:00
Nathan Vasse
1707ad0b66 📱(demo) make demo responsive
The responsive version of the demo app was buggy, so we need to
make it shiny!

Fixes #275
2024-02-28 17:19:32 +01:00
Nathan Vasse
4fbd75cdcf 🐛(tokens) fix invalid sass with comma
The generated sass from tokens containing commas, like font families was
not valid due to the way maps are made in sass. So we wrap those value
in quotes.
2024-02-28 17:19:32 +01:00
Nathan Vasse
7461626822 📱(react) improve DateRangerPicker responsive
The component was not able to resize properly on narrow screens.
2024-02-28 17:19:32 +01:00
Nathan Vasse
54df5d6c71 💄(react) remove modal content outline on focus
This was giving a strange look n feel, neither improving a11y.
2024-02-28 17:19:32 +01:00
Nathan Vasse
6d1da169e7 ♻️(react) prevent animate usage on some envs
This animate function is not supported by some testing environments,
to prevent any crashes on consumers side we need to first make sure
this function is defined.

Fixes #281
2024-02-28 10:51:47 +01:00
Nathan Vasse
ea39ea09fd 🔖(release) version packages
Bump @openfun/cunningham-react to 2.5.0
Bump cunningham-demo to 2.0.0
2024-02-21 16:43:45 +01:00
Nathan Vasse
a17c805f50 🐛(react) fix closeOnClickOutside not working
Our recent changes to enable the customization of the modal backdrop
caused this prop to not work anymore.
2024-02-21 16:08:23 +01:00
Nathan Vasse
3ef7744083 ♻️(demo) refactor Onboarding modal display
Here is a shorter way to achieve the same result as before.
2024-02-21 14:54:52 +01:00
Nathan Vasse
7f12f4d9b0 🐛(fix) fix body scroll when a modal is opened
It was possible to scroll the body when a modal is opened, it was
cutting the visibility of the modal, and was simply weird.

Fixes #263
2024-02-21 14:54:52 +01:00
Nathan Vasse
e9956829d1 ♻️(demo) remove ready flag
This workaround was used as a workaround because default opened modals
were causing a crash. See #269
2024-02-20 17:21:32 +01:00
Nathan Vasse
266701a733 🐛(react) fix default opened modal
Modal with isOpen=true on first render were causing a crash. With
this approach we make sure the portal node is already rendered.

Fixes #259
2024-02-20 17:21:32 +01:00
renovate[bot]
95a6d6dec7 ⬆️(dependencies) update js dependencies 2024-02-19 17:24:21 +01:00
Nathan Vasse
10c9abf1d2 (demo) add delete confirmation modal
We want to showcase pre built modals in the demo.
2024-02-19 16:48:39 +01:00