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

Create/Update Dogs Owner #65

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open

Conversation

Dolpheus89
Copy link
Collaborator

  • Ajout de la page DogList pour Owner.
  • Ajout de la page Create/Update (même composant) .
  • La PR étant trop volumineuse, Toastify et la prévisualisation du fileUpload seront ajoutés dans une prochaine PR.
  • Ajout d’options de style pour certains atoms/molecules.
  • Correction du problème de login qui était trop rapide pour le fetch de ME.
  • Mise à jour de l’entité Dog avec le champ info, conforme à la maquette.

@@ -5,6 +5,14 @@
padding: 1.2vh 1.5vw;
}

@mixin dashContentArea($offset : 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

super intéressant le params pour une mixin, bien joué !

@@ -84,4 +85,18 @@ $btn-types: (
background-color: $orange-400;
}
}

&.thin-btn-light {
Copy link
Collaborator

Choose a reason for hiding this comment

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

ok pour moi ce nommage va poser problème. Il y a trois couleurs possibles pour ce bouton dans la maquette : orange, vert et bleu. Et "light" ne me dit pas laquelle je vais avoir des trois. Sur les boutons classiques comme ils sont tous bleus plus ou moins foncés ça passe (même si ça pose déjà des problèmes quand une troisième variation s'ajoute) mais sur des couleurs différentes ça ne me semble pas assez transparent.
Par ailleurs, le bouton est censé être en bas de page sur mobile et ça n'est pas le cas. ET je pense qu'il faut qu'on teste avec plus de deux chiens pour gérer l'overflow.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated

@@ -3,12 +3,16 @@ import "./Form.scss";
import Button from "@/components/_atoms/Button/Button";
import TextInput from "@/components/_atoms/Inputs/TextInput/TextInput";

type FormStyles = "dark-blue" | "beige";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typiquement si il n'y a que deux couleurs ça vaut pas le coup de mettre dark et light ? 😆
En fait je pense toujours au moment où on décide de changer un bleu en vert et où tous nos nommages "bleus" se retrouvent à nommer du vert. Après il suffit de changer le nom de la variable dans tout le projet tu me diras, c'est assez facile. 🤔
Bref ça n'est pas un changement nécessaire, juste une observation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

C'est vrai, j'ai pensé à ce que l'on pourrait ajouter un nouveau style plus tard, mais en réalité, non, cela ne bougera plus.

import { useState } from "react";

const DashSideBar = () => {
const location = useLocation();
const { logout } = useAuth();
const [userRole] = useState<"trainer" | "owner">("trainer");
const { role } = useUser();
const [userRole] = useState<"trainer" | "owner">(role || "trainer");
Copy link
Collaborator

Choose a reason for hiding this comment

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

C'est peut-être de là que vient notre problème de liens, avoir trainer par défaut amène des erreurs si un owner est mal chargé, non ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oui cela avait corrigé le probleme a court termes , mais avec un nouveau login l'erreur se pose de nouveau , je vais voir ca.

@@ -42,6 +42,12 @@ export class Dog {
@Field({ nullable: true })
picture?: string;

@Column({
Copy link
Collaborator

Choose a reason for hiding this comment

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

on lui mettrait pas une petite limite de caractères à ce champ ? 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

Copy link
Collaborator

Choose a reason for hiding this comment

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

T'as updaté picture au lieu de info lol C'était surtout pour info que je pensais à ça 😆

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

haha ta preview montre que picture , mais c'est updated aussi

return {
selectedFile,
setSelectedFile,
handleChange,
Copy link
Collaborator

Choose a reason for hiding this comment

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

si handleChange est amené à être réutilisé dans d'autres pages, alors son nom est trop généraliste, il faut préciser ce qu'on change avec.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated

Copy link
Collaborator

Choose a reason for hiding this comment

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

  • Tous nos forms étaient centrés jusque là, ça n'est pas le cas de celui-ci et ça crée un écart de style.
  • L'image de fond disparait en mobile, c'est voulu ?
  • Le text area est resté étirable en largeur ce qui crée des écarts de style si l'utilisateur s'amuse avec, en longueur pourquoi pas mais en largeur c'est risqué. Par ailleurs, il me semble un peu petit, il pourrait être plus long par défaut pour qu'on voit mieux la différence d'avec un input classique en une ligne.
  • Si le lien "Voir le profil" amène à la modification autant écrire "modifier le profil", non ?

Sinon tout fonctionne à la perfection !

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated pour le text area , le reste ce sera a discuter lundi.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Il faudra qu'on réfléchisse à la gestion des formats d'images, actuallement quand une image a un format qui n'est pas carré, ça ajoute des rebords. Soit on laisse soit on centre l'image 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated, mais pour la suite, ça fera partie de la prévisualisation de l'image dans une autre PR.

Copy link
Collaborator

Choose a reason for hiding this comment

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

C'est le fix pour updater au moment de la connexion ? Ca me fonctionne pas, j'ai encore un "Bonjour !" vide à la première co :(

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated

Copy link
Collaborator

@FlorenceBuchelet FlorenceBuchelet left a comment

Choose a reason for hiding this comment

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

Impréssionante PR avec plein de choses qui font énormément avancer le projet et quelques détails à équilibrer. Bien joué !

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.

2 participants