-
Notifications
You must be signed in to change notification settings - Fork 0
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
Evol/drawer #4
base: evol/lists-and-filters
Are you sure you want to change the base?
Evol/drawer #4
Conversation
background-color: #ffffff; | ||
box-shadow: 0 3px 5px 1px rgba(#000000, .25); | ||
background-color: #fff; | ||
box-shadow: 0 3px 5px 1px rgba(#000, .25); | ||
border-radius: 3px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
T'as pas de variables pour les border-radius ?
return 'full'; | ||
} | ||
|
||
return width < widthMediumScreen ? 60 : defaultSize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return width < widthMediumScreen ? 60 : defaultSize; | |
return width < widthMediumScreen ? largeSize : defaultSize; |
import PlumeAdminTheme from '../../../lib/plume-admin-theme/PlumeAdminTheme'; | ||
|
||
/** | ||
* When a drawer is a all page, there is no state to control its opening / closing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is a whole page* ?
pas compris pourquoi il y aurait pas de state ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
y a pas de state dans le parent pour controler l'ouverture / la fermeture. Donc c'est lui même qui gère son état d'ouverture / fermeture et le parent ne se charge de rien
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dans ce cas, le composant est mal nommé, c'est plutôt fullPageDrawer
ou quelque chose dans le genre
<this.theme.actionButton | ||
iconName="delete" | ||
style={ActionStyle.DANGER} | ||
onClick={confirmDeleteUser.handleConfirmation(() => tryDeleteUser(userId))} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dis moi si je me trompe, mais on passe une fonction ici, alors que dans tous les cas l'action "tryDeleteUser(userId)" est override dans la modale ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
je comprends pas, pourquoi il serait override dans un composant générique ?
const [isDrawerOpened, toggleDrawerOpening] = useToggle(false); | ||
|
||
const uncontrolledClose = () => { | ||
toggleDrawerOpening(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
toggleDrawer tout court non ? je trouve ça bizarre d'appler opening dans close
.save(userToSave) | ||
.then((createdUser) => { | ||
updateUsersAndRoles(); | ||
this.notificationEngine.addSuccess(this.messages.t('message.changes-saved')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
si createdUser est undefined on veut pas de notif de succès non ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ca peut pas arriver, si la création se passe bien il sera renvoyé
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok du coup pas besoin du if juste en dessous
</this.theme.actionButton> | ||
<this.theme.actionButton | ||
style={ActionStyle.DANGER} | ||
onClick={confirmDeleteUser.confirm(() => tryDeleteUser(userId))} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on peut pas renommer tryDeleteUser ? parce que chaque appel api au final c'est un peu un essai qui peut fail
# Conflicts: # templates/admin/assets/scss/_material-override.scss # templates/admin/assets/scss/layouts/_index.scss # templates/admin/src/components/theme/popin/Popin.tsx # templates/admin/src/i18n/translations/Translations.ts # templates/admin/src/i18n/translations/en.ts # templates/admin/src/i18n/translations/fr.ts
border-radius: $border-radius-3; | ||
padding: $spacer-6; | ||
max-width: 600px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi ça ?
@@ -0,0 +1,9 @@ | |||
@use "../variables" as *; | |||
|
|||
:export{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je ne comprends pas bien à quoi sert ce fichier
|
||
export interface DrawerTypeProps extends CommonDrawerProps { | ||
open: boolean, | ||
close: () => void, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je ne comprends pas ces 2 propriétés.
import { DrawerTypeProps } from '../../../lib/plume-admin-theme/drawer/DrawerProps'; | ||
import ActionStyle from '../../../lib/plume-admin-theme/action/ActionStyle'; | ||
|
||
export default function Drawer( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Antoine LL Tu penses qu'on peut reprendre des choses du slider de la VEL ?
// Returns width percentage of drawer | ||
const drawerSize = () => { | ||
const defaultSize = 40; | ||
const largeSize = 60; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A sortir de la fonction pour ne pas redéfinir les valeurs à chaque fois
title: string, | ||
children: React.ReactNode, | ||
size?: number | string, | ||
sizedByWidth?: boolean, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Qu'est ce que ça veut dire ?
import PlumeAdminTheme from '../../../lib/plume-admin-theme/PlumeAdminTheme'; | ||
|
||
/** | ||
* When a drawer is a all page, there is no state to control its opening / closing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dans ce cas, le composant est mal nommé, c'est plutôt fullPageDrawer
ou quelque chose dans le genre
return ( | ||
<NativeSelect | ||
<TextField |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi TextField et pas Select ?
@@ -19,16 +21,19 @@ export function Popin({ | |||
} | |||
|
|||
export function PopinCloseWithoutSaving( | |||
{ confirmCloseWithoutSaving, closeWithoutSavingAction }: PopinCloseWithoutSavingProps, | |||
{ title, confirmCloseWithoutSaving, closeWithoutSavingAction }: PopinCloseWithoutSavingProps, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Le titre doit être optionnel
}; | ||
|
||
export type PopinCloseWithoutSavingProps = { | ||
title: string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optionnel
No description provided.