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

💄(frontend) replace to cunningham Datepicker #2359

Merged
merged 3 commits into from
Aug 29, 2023

Conversation

AntoLC
Copy link
Contributor

@AntoLC AntoLC commented Aug 1, 2023

Purpose

Replace the Grommet Datepicker with the Cunningham Datepicker.

Proposal

Description...

  • 💄(frontend) replace to cunningham Datepicker
Marsha.1.webm

@AntoLC
Copy link
Contributor Author

AntoLC commented Aug 1, 2023

We will keep the dev from this conversation in this PR.
#2297 (comment)

@AntoLC AntoLC force-pushed the feature/anthony/cunningham-datepicker branch from 69b51d8 to 405eddd Compare August 2, 2023 13:30
@AntoLC
Copy link
Contributor Author

AntoLC commented Aug 3, 2023

We will keep the dev from this conversation in this PR. #2297 (comment)

A PR has been submitted. If and when released, we will be able to merge this PR to master with the new version of @openfun/cunningham-react.

@AntoLC AntoLC force-pushed the feature/anthony/cunningham-datepicker branch from 405eddd to f7a521e Compare August 3, 2023 14:02
@AntoLC AntoLC force-pushed the feature/anthony/cunningham-datepicker branch 5 times, most recently from a3b5ca4 to 8be954b Compare August 28, 2023 14:51
@AntoLC AntoLC marked this pull request as ready for review August 28, 2023 15:18
@AntoLC AntoLC requested review from lunika and polyhb August 28, 2023 15:18
* locale `en-CA` is used to convert the date in the format YYYY-MM-DD
*/
const local_new_retention_date = new_retention_date
? new Date(new_retention_date).toLocaleDateString('en-CA')
Copy link
Member

@lunika lunika Aug 29, 2023

Choose a reason for hiding this comment

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

Why using en-CA? We never use this locale in the application. Why not en-US ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The api want this pattern YYYY-MM-DD, so it is a trick to convert to the correct pattern.
en-US has this pattern DD/MM/YYYY, while en-CA has this one YYYY-MM-DD.

Anyway I had a problem during my tests with this way, so I changed it in the next commit:
8be954b#diff-cf30b5417dce67ce54bc983a20ab8a5e92150251f67c5f0209d08e351ac96ab8R68-R72

Copy link
Member

Choose a reason for hiding this comment

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

In that case you should not rely on a locale but use the toFormat of luxon https://moment.github.io/luxon/#/formatting?id=toformat

Copy link
Contributor Author

@AntoLC AntoLC Aug 29, 2023

Choose a reason for hiding this comment

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

fullWidth
label={intl.formatMessage(messages.startingAtDateTextLabel)}
locale={intl.locale}
maxValue={DateTime.local().plus({ years: 1 }).toISO() as string}
Copy link
Member

Choose a reason for hiding this comment

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

I don't remember why we choose to block to 1 year but IMO there is no reason to do that. You can remove it.

Copy link
Contributor Author

@AntoLC AntoLC Aug 29, 2023

Choose a reason for hiding this comment

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

import { useState } from 'react';
import {
Classroom,
RetentionDate as CommunRetentionDate,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
RetentionDate as CommunRetentionDate,
RetentionDate as CommonRetentionDate,

Copy link
Contributor Author

@AntoLC AntoLC Aug 29, 2023

Choose a reason for hiding this comment

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

@AntoLC AntoLC force-pushed the feature/anthony/cunningham-datepicker branch from c731e89 to 5f743a5 Compare August 29, 2023 09:03
Upgrade to cunningham@1.0.0, which includes an auto positionning of the
datepicker depend of the place available.
@AntoLC AntoLC force-pushed the feature/anthony/cunningham-datepicker branch from 5f743a5 to 4e1ef7a Compare August 29, 2023 09:05
@AntoLC AntoLC requested a review from lunika August 29, 2023 09:07
Replace the Grommet Datepicker with the Cunningham Datepicker.
lib_video and lib_classroom have the same widget retention date,
so we create a common widget in lib_components, it helps to develop
and maintain the widget in one place.
@AntoLC AntoLC force-pushed the feature/anthony/cunningham-datepicker branch from f1f1e75 to 485cbd1 Compare August 29, 2023 10:44
@AntoLC AntoLC enabled auto-merge (rebase) August 29, 2023 10:44
@AntoLC AntoLC merged commit abde855 into master Aug 29, 2023
33 of 34 checks passed
@AntoLC AntoLC deleted the feature/anthony/cunningham-datepicker branch August 29, 2023 11:00
lunika added a commit that referenced this pull request Aug 29, 2023
Added

- Create a default playlist for new shibboleth user
- Add Cunningham design system (#2297)
- Lifecycle rule on source bucket to expire uploaded
  object after 21 days.
- Add P2p feature on videojs player
- Webtorrent tracker for P2P video feature
- eslint sort the modules name (#2338)
- Add retention date and s3 lifecycle rules to classroom / video
- Add a command to delete expired classrooms / videos
- Add retention duration on playlist form
- Add retention date widget to video and classroom
- Add a download-video widget directly in the video player
- Configure sentry in the webtorrent application
- Add custom frontend site management
- Manage multiple ingresses
- Manage shibboleth config per site config
- Add a shared media widget directly in the video player
- Add a transcript plugin to the video player
- Add a link to LTI resources to retrieve them in the standalone website
- Add Language Picker in the standalone website (#2366)
- Add xapi statements cache to avoid duplicate statements
- Add variable to override PVC in arnold deployment

Changed

- Upgrade frontend to React 18 (#2280)
- Upgrade to django 4.2
- `DJANGO_STATICFILES_STORAGE` environment variable is replaced by
  `DJANGO_STORAGES_STATICFILES_BACKEND`
- Use alpine for installing mediainfo in lambda docker images
- Add compatibility with docker compose 2
- tslint is replaced by eslint in lti app (#2321)
- refactor videojs id3 tags handling as videojs plugin
- refactor videojs xapi handling as videojs plugin
- upgrade react-query to @tanstack/react-query (v4) (#2340)
- Replace component SortableTable by Cunningham DataGrid (#2311)
- Replace grommet DatePicker by Cunningham DatePicker (#2359)

Fixed

- Video player reset when attributes update (#2300)
- Fix panel closing and resizing on live video player chat (#2310)
- Fix download video button when video is not downloadable
@lunika lunika mentioned this pull request Aug 29, 2023
lunika added a commit that referenced this pull request Aug 30, 2023
Added

- Create a default playlist for new shibboleth user
- Add Cunningham design system (#2297)
- Lifecycle rule on source bucket to expire uploaded
  object after 21 days.
- Add P2p feature on videojs player
- Webtorrent tracker for P2P video feature
- eslint sort the modules name (#2338)
- Add retention date and s3 lifecycle rules to classroom / video
- Add a command to delete expired classrooms / videos
- Add retention duration on playlist form
- Add retention date widget to video and classroom
- Add a download-video widget directly in the video player
- Configure sentry in the webtorrent application
- Add custom frontend site management
- Manage multiple ingresses
- Manage shibboleth config per site config
- Add a shared media widget directly in the video player
- Add a transcript plugin to the video player
- Add a link to LTI resources to retrieve them in the standalone website
- Add Language Picker in the standalone website (#2366)
- Add xapi statements cache to avoid duplicate statements
- Add variable to override PVC in arnold deployment

Changed

- Upgrade frontend to React 18 (#2280)
- Upgrade to django 4.2
- `DJANGO_STATICFILES_STORAGE` environment variable is replaced by
  `DJANGO_STORAGES_STATICFILES_BACKEND`
- Use alpine for installing mediainfo in lambda docker images
- Add compatibility with docker compose 2
- tslint is replaced by eslint in lti app (#2321)
- refactor videojs id3 tags handling as videojs plugin
- refactor videojs xapi handling as videojs plugin
- upgrade react-query to @tanstack/react-query (v4) (#2340)
- Replace component SortableTable by Cunningham DataGrid (#2311)
- Replace grommet DatePicker by Cunningham DatePicker (#2359)

Fixed

- Video player reset when attributes update (#2300)
- Fix panel closing and resizing on live video player chat (#2310)
- Fix download video button when video is not downloadable
lunika added a commit that referenced this pull request Aug 30, 2023
Added

- Create a default playlist for new shibboleth user
- Add Cunningham design system (#2297)
- Lifecycle rule on source bucket to expire uploaded
  object after 21 days.
- Add P2p feature on videojs player
- Webtorrent tracker for P2P video feature
- eslint sort the modules name (#2338)
- Add retention date and s3 lifecycle rules to classroom / video
- Add a command to delete expired classrooms / videos
- Add retention duration on playlist form
- Add retention date widget to video and classroom
- Add a download-video widget directly in the video player
- Configure sentry in the webtorrent application
- Add custom frontend site management
- Manage multiple ingresses
- Manage shibboleth config per site config
- Add a shared media widget directly in the video player
- Add a transcript plugin to the video player
- Add a link to LTI resources to retrieve them in the standalone website
- Add Language Picker in the standalone website (#2366)
- Add xapi statements cache to avoid duplicate statements
- Add variable to override PVC in arnold deployment

Changed

- Upgrade frontend to React 18 (#2280)
- Upgrade to django 4.2
- `DJANGO_STATICFILES_STORAGE` environment variable is replaced by
  `DJANGO_STORAGES_STATICFILES_BACKEND`
- Use alpine for installing mediainfo in lambda docker images
- Add compatibility with docker compose 2
- tslint is replaced by eslint in lti app (#2321)
- refactor videojs id3 tags handling as videojs plugin
- refactor videojs xapi handling as videojs plugin
- upgrade react-query to @tanstack/react-query (v4) (#2340)
- Replace component SortableTable by Cunningham DataGrid (#2311)
- Replace grommet DatePicker by Cunningham DatePicker (#2359)

Fixed

- Video player reset when attributes update (#2300)
- Fix panel closing and resizing on live video player chat (#2310)
- Fix download video button when video is not downloadable
lunika added a commit that referenced this pull request Aug 30, 2023
Added

- Create a default playlist for new shibboleth user
- Add Cunningham design system (#2297)
- Lifecycle rule on source bucket to expire uploaded
  object after 21 days.
- Add P2p feature on videojs player
- Webtorrent tracker for P2P video feature
- eslint sort the modules name (#2338)
- Add retention date and s3 lifecycle rules to classroom / video
- Add a command to delete expired classrooms / videos
- Add retention duration on playlist form
- Add retention date widget to video and classroom
- Add a download-video widget directly in the video player
- Configure sentry in the webtorrent application
- Add custom frontend site management
- Manage multiple ingresses
- Manage shibboleth config per site config
- Add a shared media widget directly in the video player
- Add a transcript plugin to the video player
- Add a link to LTI resources to retrieve them in the standalone website
- Add Language Picker in the standalone website (#2366)
- Add xapi statements cache to avoid duplicate statements
- Add variable to override PVC in arnold deployment

Changed

- Upgrade frontend to React 18 (#2280)
- Upgrade to django 4.2
- `DJANGO_STATICFILES_STORAGE` environment variable is replaced by
  `DJANGO_STORAGES_STATICFILES_BACKEND`
- Use alpine for installing mediainfo in lambda docker images
- Add compatibility with docker compose 2
- tslint is replaced by eslint in lti app (#2321)
- refactor videojs id3 tags handling as videojs plugin
- refactor videojs xapi handling as videojs plugin
- upgrade react-query to @tanstack/react-query (v4) (#2340)
- Replace component SortableTable by Cunningham DataGrid (#2311)
- Replace grommet DatePicker by Cunningham DatePicker (#2359)

Fixed

- Video player reset when attributes update (#2300)
- Fix panel closing and resizing on live video player chat (#2310)
- Fix download video button when video is not downloadable
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.

None yet

2 participants