-
Notifications
You must be signed in to change notification settings - Fork 4
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
Comparateur modifs fedene #1003
Conversation
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.
👍 Bon le composant devient pas mal complexe mais ça a l'air de toujours marcher. 😁
J'ai fait quelques remarques, mais c'est du bonus.
@@ -171,12 +178,12 @@ export const DisclaimerButton: React.FC<React.HTMLAttributes<HTMLDivElement>> = | |||
return ( | |||
<> | |||
<DisclaimerModal /> | |||
<Text size="xs" color="warning" className={className}> | |||
<Icon name="fr-icon-info-line" size="xs" /> Tous les modes de chauffage et de refroidissement ne sont pas interchangeables.{' '} | |||
<p className={cx('fr-text--xs text-warning', className)}> |
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.
RIP Text 🥹
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.
Effectivement, Text avait un fr-mb-0
en dur du coup c'était pas adapté là
const costLowerPercent = Math.max(0, Math.round((costLowerBound / scaleCostMaxValue) * 100)); | ||
const costUpperPercent = Math.min(100, Math.round((costUpperBound / scaleCostMaxValue) * 100)); | ||
const costWidth = costUpperPercent - costLowerPercent; | ||
const graphSectionType: string = name.includes(' individuel') ? 'Chauffage individuel' : 'Chauffage collectif'; |
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 suppose que le individuel
n'est pas une typo ? 🙄
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.
effectivement, j'ai mis un comment du coup
if (graphSectionTitle !== (graphSectionType as string)) { | ||
showSectionTitle = true; | ||
graphSectionTitle = graphSectionType; | ||
} |
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 dirais que le as string est inutile vu que graphSectionType est déjà un string
- graphSectionTitle vaut toujours graphSectionType non ? pas besoin de if. Et
const showSectionTitle = graphSectionTitle !== graphSectionType
a priori
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
- Non, il faut détecter le moment ou le type de chauffage change et l'assigner à graphSectionTitle du coup ton code ne fonctionne pas
<Checkbox | ||
small | ||
options={(['Réseau de chaleur'] satisfies ModeDeChauffage[]).map(createOptionProps)} | ||
state={nearestReseauDeChaleur ? 'success' : 'default'} | ||
className="[&_p]:!mb-0" |
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.
margin bottom 0 important pour tous les p à l'intérieur de la checkbox ? Merci tailwind de faciliter les hacks 😅
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.
Effectivement mais bien pratique avec le DSFR :-)
le raccordement à un réseau de chaleur est pertinent pour les bâtiments à chauffage collectif (gaz ou fioul), mais nécessite des | ||
travaux conséquents et coûteux pour les bâtiments à chauffage individuel. | ||
le passage d'un mode de chauffage individuel à collectif n'est possible que moyennant des travaux conséquents et coûteux (non pris | ||
en compte dans l'outil) |
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.
Ah ouais y'a pas le cout d'installation dans publicodes ? Ca ne prend pas en compte les travaux de voirie ?
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.
Pas vraiment regardé, c'est le texte que Florence m'a donné et revu avec la FEDENE
<div | ||
className="relative overflow-hidden whitespace-nowrap px-2 py-0.5 text-right font-extrabold text-white hover:overflow-visible sm:text-xs md:text-sm" | ||
style={{ flex: maxCostPercent }} | ||
className="relative bg-fcu-purple/10 whitespace-nowrap py-0.5 tracking-tighter text-left font-extrabold text-fcu-purple sm:text-xs md:text-sm flex items-center justify-start" |
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.
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 mis tight
…ichage + harmonieux
cd52c46
to
e40844a
Compare
Suite aux retours reçus, plusieurs modifications
https://trello.com/c/hLgdTT2W/1426-comparateur-modifs-suite-retour-fedene