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

feat(card) : #MAG-114 add board cards #365

Open
wants to merge 11 commits into
base: dev
Choose a base branch
from
Open

feat(card) : #MAG-114 add board cards #365

wants to merge 11 commits into from

Conversation

FlorentMr
Copy link
Contributor

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...)

  • I have detailed the tests to do in my feature/fix in order to prevent consequents regressions (must specify in Checklist tests)
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (API Doc etc...) - (must specify in Description for target version)
  • If it is a consequent feature, I have added thorough tests.
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been added to this project (must specify in Description)

}));
};

const onCloseModal = () => {
Copy link
Contributor

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
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor Author

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">
Copy link
Contributor

Choose a reason for hiding this comment

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

uh?

Copy link
Contributor Author

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
Copy link
Contributor

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> = ({
Copy link
Contributor

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;
Copy link
Contributor

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> = ({
Copy link
Contributor

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 {
Copy link
Contributor

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(() => {
Copy link
Contributor

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 {
Copy link
Contributor

Choose a reason for hiding this comment

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

types...

Copy link
Contributor Author

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> = ({
Copy link
Contributor

Choose a reason for hiding this comment

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

:FC

Comment on lines 15 to 24
<div
style={{
width: "100%",
maxWidth: `${width}px`,
height: `${height}px`,
background: `url(${url}) no-repeat center center`,
backgroundSize: "contain",
pointerEvents: "none",
}}
/>

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é

Florent Mariotti added 2 commits December 20, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants