-
Notifications
You must be signed in to change notification settings - Fork 3
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: signalement V1 #919
base: master
Are you sure you want to change the base?
feat: signalement V1 #919
Conversation
7785fd9
to
c0e25fb
Compare
a83eee4
to
2910ec7
Compare
d9b3789
to
8d0ba3d
Compare
6d2234c
to
1a55372
Compare
72507e0
to
6e9e975
Compare
1d5f48b
to
2391693
Compare
8b7c0d8
to
6883370
Compare
Il faudrait ajouter la procédure d'installation de mes-signalement et api-signalement.
|
: `${marker.type}`} | ||
</Text> | ||
return markers | ||
.filter((marker) => !marker.isMapMarker) |
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 n'arrive pas a comprend a quoi sert le isMapMarker et dans quelle cas il est false ?
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 ajouté ce flag pour pouvoir utiliser le même contexte "markers" déjà utilisé dans l'app. Il est à false pour les markers utilisés editable-markers et à true pour ceux des signalements.
components/signalement/signalement-diff/signalement-parcelle-diff.tsx
Outdated
Show resolved
Hide resolved
import { Heading, Pane } from "evergreen-ui"; | ||
import TextDiff from "./text-diff"; | ||
|
||
interface SignalementToponymeDiffCardProps { | ||
title: string; | ||
nom: { | ||
from?: string; | ||
to: string; | ||
}; | ||
backgroundColor?: string; | ||
} | ||
|
||
export function SignalementToponymeDiffCard({ | ||
title, | ||
nom, | ||
backgroundColor, | ||
}: SignalementToponymeDiffCardProps) { | ||
return ( | ||
<Pane | ||
background={backgroundColor || "white"} | ||
padding={8} | ||
borderRadius={8} | ||
marginBottom={8} | ||
width="100%" | ||
> | ||
<Heading is="h3" marginBottom={8}> | ||
{title} | ||
</Heading> | ||
<Pane padding={8} borderRadius={8} className="glass-pane"> | ||
<TextDiff from={nom.from} to={nom.to} /> | ||
</Pane> | ||
</Pane> | ||
); | ||
} |
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 vois pas la différence avec le component SignalementVoieDiffCardProps
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.
Oula bien vu j'ai oublié de mettre les positions et les parcelles pour les toponymes. Je rajoute
components/signalement/signalement-viewer/numero/signalement-viewer-create-numero.tsx
Outdated
Show resolved
Hide resolved
components/signalement/signalement-form/numero/signalement-create-numero.tsx
Outdated
Show resolved
Hide resolved
hooks/fuse.ts
Outdated
if (!fuse) { | ||
return; | ||
} | ||
}, delay); | ||
|
||
if (value) { | ||
const results = fuse.search(value); | ||
setFiltered(results.map((result) => result.item)); | ||
} else { | ||
setFiltered(source); | ||
} | ||
}, [fuse, value, source]); | ||
|
||
const debouncedCallback = useDebouncedCallback( | ||
(value) => setValue(value), | ||
delay | ||
); |
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.
Pour moi ca complexifie le useFuse, je trouve ca beaucoup moins clair si cela fait la même chose
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.
Oui je suis d'accord, j'ai été obligé de faire comme ça pour ajouter la fonctionnalité de filtre par statut / nom sur la page des signalements.
Sans cette modif, ça faisait une boucle infinie avec un useEffect
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 trouve que la couleur des diff est très peu (surtout les nom)
Et parfois je ne comprends juste pas la diff
Il n'y a pas de Synchro en cours
lorsque je met un signalement a jour, est ce normale ?
Lorsque l’on est dans un signalement archivé et que l’on click sur annuler cela ramène a en cours (au lieu de Archivés)
Problème avec les modification de toponyme
Je le trouve bien dans mes-adressses
Et quand je clique dessus j'arrive sur cette page
|
80531e1
to
4346557
Compare
91973fd
to
7baa08d
Compare
@@ -24,7 +23,7 @@ function Breadcrumbs({ | |||
...props | |||
}: BreadcrumbsProps) { | |||
const router = useRouter(); | |||
const { signalements } = useContext(SignalementContext); | |||
const { breadcrumbs } = useContext(LayoutContext); |
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.
Attention avec le merge de la master actuelle, j'ai touché au breadcrumbs pour la navigation
"rgba(244, 228, 219, 1)", | ||
["==", ["feature-state", "diff"], SignalementDiff.NEW], | ||
"rgba(218, 244, 246, 1)", | ||
"rgba(200, 200, 200, 1)", |
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 ne pas utiliser des variable pour les couleur?
Je pinaille beaucoup ^^
@@ -47,6 +50,7 @@ export const SOURCE_TILE_ID = "tiles"; | |||
|
|||
export function MapContextProvider(props: ChildrenProps) { | |||
const [map, setMap] = useState<MaplibreMap | null>(null); | |||
const [showToponymes, setShowToponymes] = useState<boolean>(true); |
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 a quoi sert ce nouveau state, je le vois set null part ?
const [filtered, setFilter] = useFuse(numeros, 200, { | ||
keys: ["numero"], | ||
}); | ||
const [filtered, setFilter] = useFuse(numeros, 200, fuseOptions); |
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.
Attention au merge avec la master (PR sur la navigation)
const { baseLocale, parcelles: selectedParcelles } = | ||
useContext(BalDataContext); | ||
const [showSelectedParcelles, setShowSelectedParcelles] = | ||
useState<boolean>(true); | ||
const [isDiffMode, setIsDiffMode] = useState<boolean>(false); | ||
const [hoveredParcelle, setHoveredParcelle] = useState<{ | ||
id: string; | ||
featureId?: string; | ||
} | null>(null); | ||
const [isParcelleSelectionEnabled, setIsParcelleSelectionEnabled] = | ||
useState<boolean>(false); | ||
const [selectedParcelles, setSelectedParcelles] = useState<string[]>([]); | ||
const [highlightedParcelles, setHighlightedParcelles] = useState<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.
J'ai du mal a comprendre pourquoi renomer selectedParcelles en highlightedParcelles et rajouter showSelectedParcelles ?
De plus tu renome parcelles en selectedParcelles mais c'est bien les parcelles selectionnée de la BAL ?
@@ -33,7 +33,7 @@ export function TokenContextProvider({ | |||
}: TokenContextProviderProps) { | |||
const { getBalToken, addBalAccess } = useContext(LocalStorageContext); | |||
|
|||
const [tokenIsChecking, setTokenIsChecking] = useState<boolean>(false); | |||
const [tokenIsChecking, setTokenIsChecking] = useState<boolean>(true); |
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 faux non, le token n'a encore été checker a l'init, pourquoi on a besoin de l'init a true ?
55cb9a7
to
995d9a0
Compare
Modifications :