Skip to content

feat: add public_answers property to questions - #248

Merged
sabinem merged 5 commits into
mainfrom
feat/public-answers
Aug 26, 2026
Merged

feat: add public_answers property to questions#248
sabinem merged 5 commits into
mainfrom
feat/public-answers

Conversation

@Panaetius

@Panaetius Panaetius commented Aug 26, 2026

Copy link
Copy Markdown
Member

Some registration answers are worth sharing. Now an owner picks which.

As an owner, I want to decide question by question which answers the rest of my hackathon can read. My form asks four things: affiliation, T-shirt size, dietary needs, and whether you accept the code of conduct. Three are nobody's business but mine. The first is the most useful thing a participant could know about someone they're about to team up with — and until now only I could see it.

As a participant looking for a team, I got a list of names with a role chip, and a profile that said "Visible to organizers only." I was picking collaborators from a phone book.

Now the owner ticks "Show answers" to participants on the affiliation question and leaves the other three alone. The participant sees ETH Zurich on that profile. The T-shirt size stays where it was.

  • The tick-box stays editable after people have answered — retracting a question you shouldn't have shared is exactly the thing you need to do then.
  • While answering, a shared question says so under the field. That's the moment you decide what to type.
  • Your own profile shows your whole form, with a Shared chip on what's public.
  • Anyone else's profile shows only shared answers — the owner's view too. Their write access would fetch the whole form; not asking for it is the point.

Two bugs fixed along the way: questionEntryFromEnt never copied PublicAnswers, so the flag was writable but always read back false. And the registration form prefilled from an unfiltered answer list keyed by question — another participant's affiliation would have appeared in your form as if you'd typed it.

@Panaetius
Panaetius force-pushed the feat/public-answers branch from a734e3e to c85de25 Compare August 26, 2026 09:47
Panaetius and others added 3 commits August 26, 2026 16:49
`questionEntryFromEnt` never copied the field, so `ListQuestions` and
`hackathon.get` always reported `false` no matter what was stored — the
flag was writable but not readable.
Each question in the form builder gets a "Show answers to participants"
tick-box, and a peer's profile grows a Shared answers section reading what
the event opened up. A shared question says so under the field while you
are answering it, and your own profile chips which of your answers are on
show.

Also fixes a prefill bug the flag introduced: the registration form asked
for answers unfiltered and keyed them by question, so a peer's public
answer overwrote your own draft.
@sabinem
sabinem force-pushed the feat/public-answers branch from c85de25 to 3d30308 Compare August 26, 2026 15:42
The participant profile stays the participant view for everyone: an
organizer opening it sees the shared answers a participant sees, not the
whole form their write access would fetch.
Each question in the form builder gets a "Show answers to participants"
tick-box, and a participant's profile grows a Shared answers section
reading what the event opened up. A shared question says so under the
field while you are answering it, and your own profile chips which of
your answers are on show.

The profile stays the participant view for everyone: an organizer opening
it sees what a participant sees, not the whole form their write access
would fetch.

Also fixes a prefill bug the flag introduced — the registration form asked
for answers unfiltered and keyed them by question, so a peer's public
answer overwrote your own draft — and fills in the seed's h5 form, which
the backend change left without the new field.
@sabinem
sabinem force-pushed the feat/public-answers branch from d2e91cb to 53ef89b Compare August 26, 2026 16:59
@sabinem
sabinem merged commit c1f2b90 into main Aug 26, 2026
2 checks passed
@sabinem
sabinem deleted the feat/public-answers branch August 26, 2026 17:35
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