Repository navigation
Add sliders as their own interaction - #244
junkerderprovinz wants to merge 1 commit into
Conversation
60f086b to
0bab60d
Compare
|
Ok so for the Slide type this is more information about it, you can adapt the PR: A numeric scale has different semantics:
NamingUse:
“Slider” describes the input control, not the collected information. A future stars, buttons, or emoji Suggested modelscales scale_responses Start with integer values. Enforce:
Store raw responses as the source of truth. Calculate response count, average, and distribution from them. Avoid denormalized counters initially. Integration surfaceA separate interaction matches the repository’s current architecture, but must be wired through every
|
0bab60d to
023095e
Compare
|
@alxlion thanks for the detailed notes. I rebuilt it along them: the slider is its own interaction now, |
c16188c to
ddb7158
Compare
ddb7158 to
1a54c7d
Compare
1a54c7d to
2920a9b
Compare
Attendees answer on a numeric scale with a configurable minimum, maximum and step, and optional labels for both ends. Each attendee answers once, enforced by partial unique indexes, and the value is checked against the stored scale. Count, average, median and distribution are computed from the stored responses and shown to the presenter, on the projected screen, in the report and, if allowed, to attendees who answered. Responses export as CSV with numeric values. Once a slider has answers its range can no longer be changed.
2920a9b to
004ad6d
Compare
Reworks this PR following your review: the slider is no longer a poll type but its own interaction,
Claper.Scales.ScalewithClaper.Scales.ScaleResponse, labelled "Slider" in the UI.Data model
scales: title, min_value, max_value, step, min_label, max_label, enabled, show_results, position, presentation_file_id.scale_responses: scale_id, value, user_id or attendee_identifier, timestamps.Editing after responses
Once a slider has a response, min, max and step can no longer be changed. Title, labels and "show results" can. Changing the range would change what the stored values mean, so the edit is refused with a validation error and the editor shows those fields as locked. The check runs under a row lock against the stored slider, so a response sent at the same moment cannot slip past it.
Integration
Claper.Interactions(count, list, move, enable, disable) and slide reordering.mix gettext.extractalso refreshes the#:references, which is why the catalogue diff is large.Every handler looks the slider up for the current event. Responses are accepted only for an enabled slider of the event and validated against the stored range, whatever the client sends.
Tests cover the changeset rules, one response per user and per attendee, the handler guards (disabled slider, slider of another event, out-of-range and off-step values), the aggregates including the empty case, CSV export, import and duplication without responses, the range lock, and presenter updates.
This is built the same way as #254 and touches the same files, so whichever goes in second I'll rebase.