Add a slider (0–100) form-field type, and use it for the evaluation - #2462
Open
maebeale wants to merge 6 commits into
Open
Add a slider (0–100) form-field type, and use it for the evaluation#2462maebeale wants to merge 6 commits into
maebeale wants to merge 6 commits into
Conversation
maebeale
marked this pull request as ready for review
August 31, 2026 20:40
maebeale
force-pushed
the
maebeale/annual-evaluation-form-seed
branch
2 times, most recently
from
September 1, 2026 03:23
ad6bc32 to
38667bc
Compare
This was referenced Sep 1, 2026
maebeale
force-pushed
the
maebeale/annual-evaluation-form-seed
branch
2 times, most recently
from
September 1, 2026 17:14
1573dc5 to
1e37221
Compare
maebeale
force-pushed
the
maebeale/annual-evaluation-form-seed
branch
2 times, most recently
from
September 1, 2026 19:39
159a190 to
a79cc70
Compare
The annual evaluation asks many "what percentage…" questions that read best as a drag-to-set slider. The form builder had no numeric/slider input, so add one as a first-class answer type the seed and admins can use. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Dragging shows the picked number in a bubble above the handle instead of a separate number input; the value is written to a hidden field. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The slider answer type had no seeded example, so there was nothing to eyeball the widget or its submitted-answer display against without hand-building a form. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Integer() accepts base prefixes and underscore separators, so a hand-crafted "0x40" passed the range check and was stored verbatim; match the strict-digits rule integer fields already use. The feature entry and controller index still described the number box that the value bubble replaced. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Now that the slider answer type exists, make the annual evaluation's percentage questions sliders (the yearly-reach counts stay number fields), and teach the results rollup to treat sliders as percentages: - FormResponseAggregator: sliders join number fields as numeric questions, and a slider report is flagged `percent` so the card headlines the average with a % and draws a 0-100 fill bar. - Seed: percentage questions become sliders via an ae_slider! helper; counts keep ae_number!. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maebeale
force-pushed
the
maebeale/annual-evaluation-form-seed
branch
from
September 1, 2026 19:41
a79cc70 to
8b774a7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 suggested review level: 3 Read 📖 new answer type + its rendering/validation, slider-aware results rollup, and the seed conversion
Adds a "Slider (0–100)" question type and wires it through the annual evaluation: the survey's percentage questions become drag-to-set sliders, and the results page summarizes them as percentages.
Builds on the merged numeric-results rollup (#2477) and the merged seed (#2479), both now on
main.What / why
:slider, appended to the enum): a range handle with a live value bubble, 0–100, stored as a whole number, with server-side range validation. Renders on the public fill page + admin preview; selectable in the form-builder type dropdown; asliderStimulus controller keeps the handle and value in sync.FormResponseAggregator): sliders join number fields as numeric questions; a slider report is flaggedpercent, soforms/_numeric_cardheadlines the average with a%and draws a 0–100 fill bar. Count questions stay plain totals.ae_slider!); the yearly-reach counts stay number fields (ae_number!).Notes for reviewer
%framing.Anything else to add?
Some percentage sliders inherit narrow widths (third/quarter) from when they were number inputs — they work but read tight; happy to widen them if you'd like.