-
Notifications
You must be signed in to change notification settings - Fork 87
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
Correction et refacto de l'affichage des questions #3427
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for nostalgic-mahavira-52b682 canceled.
|
🚀 La branche est déployée !
|
80f2e3c
to
145d198
Compare
145d198
to
91b7ed8
Compare
export const runSimulateurTest = (simulateur: Simulateur) => { | ||
export const runSimulateurTest = ( | ||
simulateur: Simulateur, | ||
avecCharges = 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.
Comme on risque de multiplier les options, préférer peut-être un objet options
:
export const runSimulateurTest = (
simulateur: Simulateur,
{ avecCharges = false }: RunSimulateurOptions,
beforeAction = () => {}
) => {
ce qui facilite aussi la lecture à l’utilisation en étant explicite :
runSimulateurTest('profession-liberale/medecin', { avecCharges: 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.
Pourquoi ne pas mettre beforeAction
dans les options aussi ?
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, tu as raison, on peut considérer ça comme une option également !
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 tout bon, les questions sont bien revenues sur le simulateur pour artiste-auteur!
@@ -43,9 +47,17 @@ export default function RéductionGénéraleSimulation() { | |||
const [régularisationMethod, setRégularisationMethod] = | |||
useState<RégularisationMethod>('progressive') | |||
|
|||
const firstStepCompletedExceptions = [ |
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 préférerais un truc comme firstStepCompletedRules
ou firstStepCompletedConditions
… là on pose l’idée que l’usage de cette prop doit être exceptionnel, ce qui ne me plait pas, même si c’est vrai pour le moment…
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'accord sur le principe mais l'inconvénient avec Rules
ou Conditions
c'est que c'est moins clair que cela représente "les règles qui ne rentrent pas en compte dans la détermination de la 1ère étape", contrairement à Exceptions
.
Je vais y réfléchir (et demander à une IA d'y réfléchir pour moi 😄)
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.
Mais justement, pour moi ce qu’on envoie c’est juste «les règles à regarder pour savoir si on a fait la première étape» … et si on les envoie pas on a un comportement par défaut … mais elles n’ont pas nécessairement à être exceptionnelles, non ?
@@ -78,7 +78,7 @@ function ExerciceDate() { | |||
<ExerciceDateContainer> | |||
<StyledInputSuggestion> | |||
{[yearN2, yearN1].map((year) => ( | |||
<> | |||
<span key={year}> |
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 suggère <React.Fragment key={year}>
pour ne pas avoir à modifier le DOM.
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 cool, je ne connaissais pas !
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.
<>
est un sucre syntaxique pour <React.Fragment>
…
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 enfin fait le tour et tout relu @liliced … désolé pour le délai 🙏🏾
J’ai mis juste quelques commentaires mineurs !
#3417
Refactorisation du composant
Banner
Simulation
Refactorisation de
SelectSimulationYear
Simulation
Refactorisation de
SimulationPréremplieBanner
Simulation
Refactorisation de
PreviousSimulationBanner
Simulation
Simulation
Ajout d'une variable
exceptions
àfirstStepCompletedSelector
, transmise parSimulation
et remplie au besoin par le simulateur (cessation d'activité, dividendes, indépendant, lodeom et RGCP)Correction de 2 avertissements console (
prop
inconnue et absence dekey
)Ajout de tests sur les simulateurs génériques
Ajout de paramètres aux tests des simulateurs génériques