-
Notifications
You must be signed in to change notification settings - Fork 60
[#345] Sort individual form responses view by time submitted, not by name #355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughSorting logic in PerUserResponsesView.tsx is updated to order grouped user responses chronologically by the earliest submission timestamp instead of alphabetically by user name, affecting only presentation order without changing data collection or display logic. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
🚥 Pre-merge checks | ✅ 3 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@apps/blade/src/app/admin/forms/`[slug]/responses/_components/PerUserResponsesView.tsx:
- Around line 93-96: The sort currently uses the first element of each user's
array (a[0]/b[0]) which breaks if responses aren't chronological; update the
sort in the users assignment (the callback used on Object.values(groupedByUser))
to compute each group's earliest submittedAt by scanning the group's items
(e.g., reduce or Math.min over parsed timestamps) and compare those earliest
times (timeA vs timeB) instead of a[0]/b[0], ensuring users are ordered by their
earliest submission.
apps/blade/src/app/admin/forms/[slug]/responses/_components/PerUserResponsesView.tsx
Show resolved
Hide resolved
DVidal1205
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. congrats on first PR
Why
/form/responsesgets all responses from a form and displays them in alphabetical order. it should be chronological, starting with the first person.What
Issue(s): #345
Sorts responses by time submitted rather than name.
Test Plan
Merge me twin.
Checklist
db:pushbefore mergingSummary by CodeRabbit