feat(results): average, median, range and Net Promoter Score for scale questions - #3635
global-prog wants to merge 3 commits into
Conversation
…or scale questions Scale questions currently show only a bar per value, which makes it hard to compare two questions or two runs of the same form at a glance. This adds count, average, median, lowest and highest above the existing bars. The median is shown next to the average deliberately: at the response counts most forms see, a single extreme answer moves an average a long way. A 0-10 scale additionally reports a Net Promoter Score with its promoter and detractor shares, using the usual 9-10 / 7-8 / 0-6 split, since that is the shape those scales are almost always used for. Purely additive and presentational: no API change, no schema change, and questions of other types are unaffected. Signed-off-by: global-prog <raqeeb@uosamarra.edu.iq>
4f0ebc9 to
6eedc91
Compare
|
@global-prog Thanks for your contribution. As said in the other PR: please create an issue/feature request before starting implentation to discuss it. Also please add screenshots to the description with before/after. This should also be added to the new rating quetions in #3637. Also please add the AI declaration to your description if you used AI for this. |
|
Thanks, noted on opening an issue first. I'll add before/after screenshots to the description. The AI declaration is added there as well. |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Summary
Scale questions currently show a bar per value, which makes it hard to compare two questions, or two runs of the same form, at a glance.
This adds a small set of figures above the existing bars for
linearscalequestions:The median sits next to the average deliberately — at the response counts most forms see, one extreme answer moves an average a long way, and showing both makes that visible.
The NPS line only appears when the scale is actually 0–10, since that is the shape those scales are almost always used for.
Scope
Purely additive and presentational:
src/components/Results/ResultsSummary.vueTesting
npm run lintandnpm run stylelintcleanmain(vite --mode production build) with no errorsHappy to adjust the wording, the choice of figures, or the placement if you would prefer them elsewhere in the summary.
🤖 AI (if applicable)