Skip to content

Dion/task/71 eco s15 multiple choice for participants - #80

Open
dionyichia wants to merge 15 commits into
mainfrom
dion/task/71-eco-s15-multiple-choice-for-participants
Open

Dion/task/71 eco s15 multiple choice for participants#80
dionyichia wants to merge 15 commits into
mainfrom
dion/task/71-eco-s15-multiple-choice-for-participants

Conversation

@dionyichia

Copy link
Copy Markdown
Contributor

🦜 What's new in this PR

🦋 Description

Done with functionality and styling of participant flow page.
Integrated Dylan's saved answers onBlur as well.

🦧 Screenshots

Design
image

Answer sent when user clicks away from from the prompt box.
image

Updated rows in Supabase
image

🐸 How to review

open participant flow, type in answers check rows in supabase and check styling.

input some answers and submit and check whether supabase field appears. There should be 1 row per prompt response. If there are multiple rows i.e. checkboxes, there will be 1 prompt response row created per checked box.

🐙 Next steps

  1. Idk about the design for the waiting for others text once user clicks submit. Right now i just replace it
  2. Idk about the design for the progress bar
  3. I think the next page/ next phase is kinda buggy. Not sure whether the next phase number get updated. I don't know if i accidentally broke something.

🐆 Relevant links

Online sources

🐁 Related PRs

CC: @eshabansiya

@vercel

vercel Bot commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ecovet-global Ready Ready Preview, Comment Apr 6, 2026 11:14pm

Comment thread app/participants/components/CheckboxPromptParticipant.tsx Outdated
}
`;

const CheckboxOptionParticipantStyled = styled.div<{ $selected: boolean }>`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can we add some space between all the multiselect questions

Image

so it looks more like the multichoice

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this should be fixed, i changed styles but i cant test it without some templates and prompt options. I am not exactly sure how to add a participant into game and begin testing this. Perhaps we can look through on wednesday?


type Props = {
options: PromptOption[];
value: string[];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe you can make this a Set instead? might be easier to add and remove

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hello! Do you mean to use a Set structure to hold values i.e. the participants responses?

Right now the structure is that if the user clicks an option (be it a selected option or non selected), it makes a new array and replaces parent state with the new copy. If we change to set, we will still have to make a new set and replace the parent state with the new set copy because React state updates should be immutable iirc. Hence im not really sure what benefits changing from string[] to set will bring?

To make it easier for search, adding and removing, I updated the toggle function to use a set structure u mentioned instead for cleaner code but it is still O(n) (same as prev implementation) because it needs to make a copy of the previous values.

image

Let me know if this is what you mean

Comment thread app/participants/components/TextPromptParticipant.tsx Outdated
… style fix for checkboxes, and set struct for onToggle
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.

ECO-S15 Multiple Choice for Participants

3 participants