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(table): adds single rowselectionmode to table #976

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

ogermain-kronos
Copy link
Contributor


type RowSize = 'small' | 'medium' | 'large';

type UtilityColumnType = 'selection' | 'numbers' | 'expand';

type RowSelectionMode = 'single' | 'multiple';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suite à la discussion ici , je suis allé avec le nom rowSelectionMode, d'une part pour garder row dans le nom, mais aussi parce qu'il y a déjà une constante appelée rowSelection dans la classe.

id={radioBtnId}
data-testid={radioBtnId}
ariaLabel={t('selectRow')}
ariaLabelledBy={ariaLabelledByColumnId ? [radioBtnId, `${row.id}_${ariaLabelledByColumnId}`] : []}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pour l'ariaLabelledBy, on sélectionne la cellule en prenant comme prop l'id de la colonne désirée (l'id de la cellule étant rowId_columnId).

@ogermain-kronos ogermain-kronos marked this pull request as ready for review August 20, 2024 15:29
@ogermain-kronos ogermain-kronos requested a review from a team as a code owner August 20, 2024 15:29
Copy link

Storybook for this build: https://ds.equisoft.io/pr-976/

Copy link

Webapp for this build: https://ds.equisoft.io/pr-976/webapp/

Copy link
Contributor

@LarryMatte LarryMatte left a comment

Choose a reason for hiding this comment

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

Petit commentaire sinon ca semble bon pour moi

packages/react/src/components/table/table.tsx Outdated Show resolved Hide resolved
@maboilard
Copy link

C'est normal que le Radio Button ne soit pas aligné au centre?
Screenshot 2024-08-26 at 9 09 20 AM

Copy link

@maboilard maboilard left a comment

Choose a reason for hiding this comment

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

En comparant avec d'autres features, j'ai réalisé que la hauteur de la row était plus grande (47.5) qu'ailleurs (40.5). Il faudrait alors uniformiser la row en single select à 40.5 svp. C'est pas mal la seule chose que j'ai, après ça va être beau pour moi!
image

maboilard
maboilard previously approved these changes Sep 9, 2024
Copy link
Contributor

@LarryMatte LarryMatte left a comment

Choose a reason for hiding this comment

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

un ti commentaire après je crois qu'on va être good en ce qui me concerne

packages/react/src/components/table/table.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@alexbrillant alexbrillant left a comment

Choose a reason for hiding this comment

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

good job. quelques commentaires optionnels, mais je pense qu'il faudrait au moins discuter pour le breaking change avec selectableRows. perso, je garderais le boolean selectableRows et je mettrais une valeur par défaut pour le selectionMode. probablement multiple vu qu'avant on supportait seulement la sélection multiple.

WilliamsTardif
WilliamsTardif previously approved these changes Sep 14, 2024
Copy link
Contributor

@WilliamsTardif WilliamsTardif left a comment

Choose a reason for hiding this comment

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

Rien d'autre a ajouter pour moi. LGTM.
J'aurais bien aimé découper un peut le component, car il est quand même un peu impossant 😅 . J'imagine qu'une tâche de réfactor pourra être entrepris dans l'avenir pour ça.

Copy link
Contributor

@hebernardEquisoft hebernardEquisoft left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@pylafleur pylafleur left a comment

Choose a reason for hiding this comment

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

Quelques ajouts à ce que les autres ont déjà commenté

packages/react/src/components/table/table.tsx Outdated Show resolved Hide resolved
packages/react/src/components/table/table.tsx Outdated Show resolved Hide resolved
alexbrillant
alexbrillant previously approved these changes Sep 16, 2024
@LarryMatte LarryMatte self-requested a review September 16, 2024 22:55
Copy link
Contributor

@LarryMatte LarryMatte left a comment

Choose a reason for hiding this comment

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

Ça va être good pour moi quand les commentaires de P-Y seront fait

Copy link
Contributor

@pylafleur pylafleur left a comment

Choose a reason for hiding this comment

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

C'est tiguidou!

@ogermain-kronos ogermain-kronos merged commit a7958f4 into master Sep 23, 2024
22 checks passed
@ogermain-kronos ogermain-kronos deleted the dev/DS-1101-atomic-rb branch September 23, 2024 18:48
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.

8 participants