feat: introduce Grid as a new question type
Closes #2606
:construction: Development still in progress. This is reopening of the #2924 but pushed to upstream instead of my fork.
I'm trying to reuse already existent Option entity and corresponding UI components by adding extra column optionType=row|column. Why?
- as rows/columns can be renamed - we need to store their ids. So I've just reused already existent mechanism
- we should have possibility to reorder rows/columns. Already existent UI components for options allow us to do that
:heavy_check_mark: Implemented
:mag: Various input types
Radio
Checkbox
Number
:mag: Question management
Create new field with nested select menu
Manage rows and columns
:mag: Results storing and rendering
Responses view
Summary view
:mag: Export support
:spiral_notepad: Todo
- [x] Improve summary view
- [x] Export support
- [x] Tests
Codecov Report
:x: Patch coverage is 52.38095% with 50 lines in your changes missing coverage. Please review.
:loudspeaker: Thoughts on this report? Let us know!
@nimishavijay @jancborchardt please suggest how to display results summary
I guess we can show table with counters for radio/checkbox grid cell type. But what to do for a number/text values?
FYI @nimishavijay I've applied almost all of your suggestions. Please check or even feel free to commit to my branch
Also does anybody know how to export this type of the question to xlsx files?
But what to do for a number/text values?
@Koc I'm still against allowing free text answers for the grid questions. It makes things much more complex than needed and I didn't see any other form solution providing this.
@Chartman123 I agree that free text answers is indeed can be an overkill and it will be removed.
But worth to mention that the main reason I started working on the Grid field type is our need to collect numeric values in matrix form. I've added checkboxes and radios to make it more universal, but without numeric input, the field would have no real value for our use cases.
We are using that for resource allocation tables, workload estimations, etc
@koc what seems fitting is a heatmap of sorts, showing the grid, with the numerical counts, but also a visual support to show how much it is compared to the others.
E.g. circles of differing sizes, or bars, or hues of the primary color, going from color-main-background for no one having voted to color-primary for 100% having voted for that option out of the 5 on that row.
Have you also checked how others like Google Forms do it?
Google forms not supports input number, but here is their "summary" representation and excel exporting:
hey mates!
I've decided to make it little bit simpler for a 1st iteration (without gradients/extra libraries for charts).
Few updates:
- Removed text input type
- Summary view
- for checkbox and radio we can calculate percentage
- for number grid we calculate average value (in theory later we can calculate median, min/max, percentile 95, etc)
- Export
- added support for numbers: grid question adds multiple columns (rows * columns)
- Actualized all screenshots
What's next? In general everything works. I can start work on tests if you fine with implemented functionality
BTW we have green pipeline :point_right: :point_left: