Skip to content

Conversation

@Koc
Copy link
Collaborator

@Koc Koc commented Oct 3, 2025

Closes #2606

🚧 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

✔️ Implemented

🔍 Various input types

Radio
image

Checkbox
image

Number
image

🔍 Question management

Create new field with nested select menu
image image

Manage rows and columns
image

🔍 Results storing and rendering

Responses view
image

Summary view
image

image

🔍 Export support

image image

🗒️ Todo

  • Improve summary view
  • Export support
  • Tests

@Koc Koc force-pushed the feature/add-grid-question-type branch 9 times, most recently from 5a1bc6a to 42a3fc6 Compare October 12, 2025 14:41
@codecov
Copy link

codecov bot commented Oct 12, 2025

Codecov Report

❌ Patch coverage is 52.38095% with 50 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lib/Migration/Version050300Date20250914000000.php 0.00% 16 Missing ⚠️
lib/Controller/ApiController.php 6.25% 15 Missing ⚠️
lib/Service/SubmissionService.php 82.25% 11 Missing ⚠️
lib/Db/OptionMapper.php 0.00% 5 Missing ⚠️
lib/Service/FormsService.php 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Koc Koc force-pushed the feature/add-grid-question-type branch 2 times, most recently from 3ba7380 to 40f3f9e Compare October 13, 2025 22:58
@Koc
Copy link
Collaborator Author

Koc commented Oct 13, 2025

@nimishavijay @jancborchardt please suggest how to display results summary

image

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?

@Koc Koc force-pushed the feature/add-grid-question-type branch 2 times, most recently from f02625c to bb7ee7c Compare October 13, 2025 23:36
@Chartman123
Copy link
Collaborator

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.

@Koc Koc force-pushed the feature/add-grid-question-type branch from bb7ee7c to 4e80a8e Compare October 26, 2025 10:11
@Koc
Copy link
Collaborator Author

Koc commented Oct 26, 2025

@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

@jancborchardt
Copy link
Member

@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?

@Koc
Copy link
Collaborator Author

Koc commented Oct 27, 2025

Google forms not supports input number, but here is their "summary" representation and excel exporting:

image image image

@Koc Koc force-pushed the feature/add-grid-question-type branch 4 times, most recently from b2ab168 to 94c03c1 Compare November 4, 2025 12:19
@Koc Koc marked this pull request as ready for review November 4, 2025 12:19
@Koc Koc force-pushed the feature/add-grid-question-type branch 5 times, most recently from 25e052e to 370f155 Compare November 16, 2025 14:33
@Koc
Copy link
Collaborator Author

Koc commented Nov 16, 2025

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

@Koc Koc force-pushed the feature/add-grid-question-type branch 7 times, most recently from 9310f91 to 5e31f34 Compare November 17, 2025 09:31
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
@Koc Koc force-pushed the feature/add-grid-question-type branch from 5e31f34 to ee3a360 Compare November 20, 2025 18:09
@Koc
Copy link
Collaborator Author

Koc commented Nov 20, 2025

BTW we have green pipeline 👉 👈

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.

[QuestionType] Multiple choice grid

4 participants