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

Add rename group option for cohorts #1136

Merged
merged 4 commits into from
Jan 17, 2025
Merged

Add rename group option for cohorts #1136

merged 4 commits into from
Jan 17, 2025

Conversation

dolbeew
Copy link
Collaborator

@dolbeew dolbeew commented Jan 17, 2025

Add Rename Group option to each cohort group section in cohort builder.

Screenshot 2025-01-17 at 3 30 49 PM

First group in screenshot above has a custom name, second group has the default group name.

@@ -321,6 +323,9 @@ function ParticipantsGroupSection(props: {
}}
>
<GridLayout rows height="auto">
{!!props.groupSection.name && (
<Typography sx={{ p: 1 }}>{props.groupSection.name}</Typography>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use variant="body1em" so it stands out a bit more.

@@ -321,6 +323,9 @@ function ParticipantsGroupSection(props: {
}}
>
<GridLayout rows height="auto">
{!!props.groupSection.name && (
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use the sectionName helper in cohort.ts and always display the name. Also move it into the grey above the dropdowns and horizontally align it with them.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nice, didn't see sectionName first time around. I've updated the screenshot in the description after addressing the comments.

@@ -569,6 +574,24 @@ function ParticipantsGroupSection(props: {
boxShadow: (theme) => `inset 0 1px 0 ${theme.palette.divider}`,
}}
>
<Button
Copy link
Collaborator

Choose a reason for hiding this comment

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

Make this an IconButton and put it beside the section name like the cohort rename button.

cols
sx={{
p: 2,
paddingBottom: 0,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd use px: 2, pt:2 instead.

@@ -321,6 +328,35 @@ function ParticipantsGroupSection(props: {
}}
>
<GridLayout rows height="auto">
<GridLayout
cols
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add rowAlign="middle" to line up the button better with the text.

@dolbeew dolbeew merged commit 5b24563 into main Jan 17, 2025
8 checks passed
@dolbeew dolbeew deleted the dolbeew/DT-580 branch January 17, 2025 21:20
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.

2 participants