feat(dataTable): improve repeat group responses handling DEV-2400#7226
Open
magicznyleszek wants to merge 11 commits into
Open
feat(dataTable): improve repeat group responses handling DEV-2400#7226magicznyleszek wants to merge 11 commits into
magicznyleszek wants to merge 11 commits into
Conversation
Member
Author
|
@greptile-apps please review |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves how the Submissions Data Table extracts and renders repeat-group (including deeply nested) answers, so nested repeat columns don’t appear blank when submission payloads store data at parent container paths. It also introduces a modal view for repeat cells to make deep hierarchies easier to scan.
Changes:
- Add
selectNestedRowto resolve missing nested keys by falling back to the nearest container payload when appropriate, and wire it into the Data Table column accessor. - Refactor repeat/group traversal + formatting into dedicated utilities (
repeatGroupUtils,submissionMediaUtils) and update the repeat cell UI to render indexed inline values + a flattened indexed modal list. - Expand unit tests to cover nested repeat edge cases and the new nested-row selection behavior.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| jsapp/js/components/submissions/tableUtils.ts | Adds selectNestedRow to better resolve nested/repeat values from submission payloads. |
| jsapp/js/components/submissions/tableUtils.tests.ts | Adds test coverage for selectNestedRow behavior (exact key, supplemental, parent container fallback). |
| jsapp/js/components/submissions/table.tsx | Uses selectNestedRow as the column accessor and removes the previous class helper. |
| jsapp/js/components/submissions/submissionUtils.tsx | Moves repeat/media helpers into dedicated modules and re-exports them for compatibility. |
| jsapp/js/components/submissions/submissionMediaUtils.ts | New module containing getMediaAttachment previously in submissionUtils. |
| jsapp/js/components/submissions/repeatGroupUtils.tsx | New module implementing repeat answer traversal as both a tree and a legacy flat list. |
| jsapp/js/components/submissions/repeatGroupUtils.tests.ts | New, expanded tests for repeat traversal across nested/grouped scenarios (incl. deleted attachments). |
| jsapp/js/components/submissions/DataTableCell/TextModalCell.tsx | Adds optional modalContent so callers can render richer modal bodies than plain text. |
| jsapp/js/components/submissions/DataTableCell/RepeatGroupCell.tsx | Reworks repeat rendering: hierarchy-indexed inline text plus a flattened, indexed modal list. |
| jsapp/js/components/submissions/DataTableCell/RepeatGroupCell.module.scss | Removes old repeat-cell-specific styling (now using TextModalCell). |
| jsapp/js/components/submissions/DataTableCell/index.tsx | Routes undefined nested keys / object values into RepeatGroupCell to avoid blank nested repeat columns. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Member
Author
|
@greptile-apps review again |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Member
Author
|
@greptile-apps review again |
Member
Author
|
@greptile-apps review again |
Member
Author
|
@greptile-apps review again |
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.
🗒️ Checklist
#Support Docs Updates, if any<type>(<scope>)<!>: <title> DEV-1234Front endand/orBack endorworkflow📣 Summary
Data Table repeat-group handling was stabilized for nested structures: values no longer disappear for valid nested repeat paths, andrepeat answers are (still) shown as a simple flat comma-separated list.
💭 Notes
Changes in this PR:
Why this helps:
👀 Preview steps