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(slash): add ChildrenQuestion component #881

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MartinWeb
Copy link
Contributor

Fix #879

Before merging this pull request, we will make a review with @adrien-dos to be sure the component implements the correct UX.

@MartinWeb MartinWeb added enhancement New feature or request agent-slash Component for the agent theme component component needs to be worked on css-package Affects the CSS package design Issue linked to design ux react-package labels Feb 17, 2025
Copy link
Contributor

@GuillaumeKESTEMAN GuillaumeKESTEMAN left a comment

Choose a reason for hiding this comment

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

Je veux bien un screen du composant si possible pour voir ce que ça donne stp 😄

@MartinWeb
Copy link
Contributor Author

Je veux bien un screen du composant si possible pour voir ce que ça donne stp 😄

@GuillaumeKESTEMAN tu peux le voir dans le storybook ici https://67120d087b5afa65f0447b87-cdchcijzzp.chromatic.com/?path=/story/components-form-childrenquestion--playground

@MartinWeb MartinWeb force-pushed the feat/childrenQuestion branch 2 times, most recently from 26ac181 to d3659ec Compare February 17, 2025 08:49
@MartinWeb MartinWeb force-pushed the feat/childrenQuestion branch from d3659ec to de6385d Compare February 17, 2025 09:02
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
50.2% Coverage on New Code (required ≥ 80%)
6.7% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@johnmeunier
Copy link
Contributor

Je suis curieux de voir quels sont les cas d'usage, ca ressemble à des sous questions (conditionnés ?)

@MartinWeb
Copy link
Contributor Author

Je suis curieux de voir quels sont les cas d'usage, ca ressemble à des sous questions (conditionnés ?)

Oui c'est exactement ça, une question qui conditionne l'affichage d'autres questions.
Voilà un exemple sur notre projet
image

return (
<section className={componentClassName}>
<div className={`${componentClassName}-arrow`} />
<section>{content}</section>
Copy link
Contributor

Choose a reason for hiding this comment

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

pourquoi ne pas utiliser le children au lieu de créer une props content ?

return (
<section className={componentClassName}>
<div className={`${componentClassName}-arrow`} />
<section>{content}</section>
Copy link
Contributor

Choose a reason for hiding this comment

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

je ne suis pas certain que 2 section imbriqué comme cela ca valide d'un point de vue a11y.

@JLou
Copy link
Contributor

JLou commented Feb 19, 2025

Je pense que ca devrait plutot s'appeler ChildQuestion ou NestedQuestion ou NestedForm non ?

@JLou
Copy link
Contributor

JLou commented Feb 19, 2025

Peut etre rajouter de la doc sur le usecase avec un screenshot ou une plus grosse story pour mettre du contexte ?

@@ -0,0 +1,12 @@
import "@axa-fr/design-system-slash-css/dist/Form/ChildrenQuestion/ChildrenQuestion.scss";

export const ChildrenQuestion = ({ content }: { content: React.ReactNode }) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

issue: rajouter un className optionnel pour pouvoir surcharger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-slash Component for the agent theme component component needs to be worked on css-package Affects the CSS package design Issue linked to design enhancement New feature or request react-package ux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Slash] Add ChildrenQuestion component
5 participants