-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(card) : #MAG-114 add board cards #365
base: dev
Are you sure you want to change the base?
Conversation
})); | ||
}; | ||
|
||
const onCloseModal = () => { |
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.
renommer en handleClose
}; | ||
|
||
return ( | ||
<Modal |
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 la MessageModal d'Alice qui embarque le plus gros du style de nos modales
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.
J'ai repris BoardCreateMagnetMagnetModal qui a sa propre Modal aussi, je verrais pour factoriser avec MessageModal si il faut, mais c'était pour gagner du temps vu qu'elles sont relativement ressemblantes
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.
J'ai essayé de reprendre avec MessageModal, mais comme le style de container principal de la modal n'est pas le même (au niveau de la height et width notamment) l'affichage est tout cassé, ça va demander plus de travail, je vois au retour des vacances si ça prendra beaucoup de temps
return ( | ||
<> | ||
{boards?.length > 0 && ( | ||
<animated.ul className="grid ps-0 list-unstyled mb-24"> |
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.
uh?
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.
C'est de la récupération de code de BoardList pour gagner du temps vu qu'on veut exactement le même affichage (j'aurais pu faire autrement mais j'aurais pris du retard)
export interface BoardListProps { | ||
onDragAndDrop: (board: Board) => void; | ||
searchText: string; | ||
boards: Board[]; // Nouvelle prop |
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.
log
import { ScaledIframeProps } from "./types"; | ||
import { useScaledIframe } from "./useScaledIframe"; | ||
|
||
const ScaledIframe: React.FC<ScaledIframeProps> = ({ |
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.
export ici
); | ||
}; | ||
|
||
export default ScaledIframe; |
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.
elever le default
import { ScaledIframeProps } from "./types"; | ||
import { useScaledIframe } from "./useScaledIframe"; | ||
|
||
const ScaledIframe: React.FC<ScaledIframeProps> = ({ |
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.
FC direct
@@ -0,0 +1,159 @@ | |||
import { useEffect, useRef, useState, useMemo, useCallback } from "react"; | |||
|
|||
interface UseScaledIframeProps { |
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 exporte les types
}); | ||
|
||
// Calculate the iframe scaling to always show the whole page | ||
const calculateScale = useCallback(() => { |
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.
<3
@@ -0,0 +1,26 @@ | |||
import React from "react"; | |||
|
|||
interface UrlBackgroundViewerProps { |
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.
types...
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.
désolé...
height?: number; | ||
} | ||
|
||
export const UrlBackgroundViewer: React.FC<UrlBackgroundViewerProps> = ({ |
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.
:FC
<div | ||
style={{ | ||
width: "100%", | ||
maxWidth: `${width}px`, | ||
height: `${height}px`, | ||
background: `url(${url}) no-repeat center center`, | ||
backgroundSize: "contain", | ||
pointerEvents: "none", | ||
}} | ||
/> |
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.
div c'est démodé
Describe your changes
add board cards with its display in Aperçu and Lecture
Checklist tests
cf tickets et sous tickets
Issue ticket number and link
MAG-114
Checklist before requesting a review (magic string, indentation, comment/documentation...)