Skip to content

refactor(dataTable): mantineify table settings modal DEV-2062#7288

Open
magicznyleszek wants to merge 1 commit into
mainfrom
leszek/dev-2062-mantineify-table-settings
Open

refactor(dataTable): mantineify table settings modal DEV-2062#7288
magicznyleszek wants to merge 1 commit into
mainfrom
leszek/dev-2062-mantineify-table-settings

Conversation

@magicznyleszek

@magicznyleszek magicznyleszek commented Jul 21, 2026

Copy link
Copy Markdown
Member

🗒️ Checklist

  1. run linter locally
  2. update developer docs (API, README, inline, etc.), if any
  3. for user-facing doc changes create a Zulip thread at #Support Docs Updates, if any
  4. draft PR with a title <type>(<scope>)<!>: <title> DEV-1234
  5. assign yourself, tag PR: at least Front end and/or Back end or workflow
  6. fill in the template below and delete template comments
  7. review thyself: read the diff and repro the preview as written
  8. open PR & confirm that CI passes & request reviewers, if needed
  9. act on any greptile review below a 5/5 score or leave comment explaining why you won't
  10. delete this checklist section from the final squash commit before merging

📣 Summary

Migrated Table Settings modal to Mantine Modal, migrated the in-modal component to TypeScript and made it a functional component that uses Mantine components. Also fixed "Reset" button to use proper defaults.

💭 Notes

Changes here:

  • Added a dedicated Mantine opener in openTableSettingsModal.tsx.
  • Removed legacy code from bigModal.js and constants.ts.
  • TableSettings.tsx is now a functional component in TypeScript.
  • Kept Reflux tableStore to not limit the amount of changes in this PR
  • Fixed null cleanup in tableStore.ts so reset values are properly removed before saving.

👀 Preview steps

  1. ℹ️ Have a project with submissions.
  2. Go to Project → Data → Table.
  3. Open "Display options" in top right.
  4. Confirm the modal title is "Table display options" and the options are identical as previously, just in the new Mantine-style.
  5. Confirm "Show group names in table headers" is checked by default on first open.
  6. Click Reset.
  7. Close the modal, then open it again.
  8. Confirm "Show group names in table headers" is checked again after reset.
  9. Change one or more settings and click Save.
  10. Reopen the modal and confirm saved values persist.

@magicznyleszek
magicznyleszek requested a review from duvld July 21, 2026 11:28
@magicznyleszek magicznyleszek self-assigned this Jul 21, 2026
@magicznyleszek
magicznyleszek marked this pull request as ready for review July 21, 2026 11:29
@greptile-apps

greptile-apps Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR moves table display settings to a Mantine modal. The main changes are:

  • Replaces the legacy class component with a TypeScript functional component.
  • Opens and closes table settings through Mantine.
  • Removes the legacy modal type and rendering path.
  • Filters reset values before saving table settings.

Confidence Score: 4/5

The modal lifecycle bugs need to be fixed before merging.

  • Local-only saves apply settings but leave the Mantine modal open.
  • A delayed save completion can close a newer modal instance.
  • The reset-value cleanup preserves unrelated table settings.

jsapp/js/components/submissions/table.tsx

Reviews (1): Last reviewed commit: "mantineify table settings" | Re-trigger Greptile

const { close } = openTableSettingsModal({
asset: this.props.asset,
})
this.closeTableSettingsModal = close

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Local Saves Leave Modal Open

When a user without change_asset saves display options, tableStore.saveTableSettings() applies local overrides and triggers onTableStoreChange(). That handler still closes the legacy pageState modal, so the new Mantine modal remains open after the settings are applied.

const { close } = openTableSettingsModal({
asset: this.props.asset,
})
this.closeTableSettingsModal = close

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Save Completion Closes New Modal

The callback is a single mutable slot and is not cleared when a modal is dismissed. If a user saves, closes the modal before the request completes, and opens it again, the first request's completion invokes the new callback and closes the newly opened modal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant