Skip to content

[00546] Fix DataTable filter component mobile overflow#4620

Merged
dcrjodle merged 4 commits into
developmentfrom
tendril/00546-FixDataTableFilterComponentMobileOverflow
Jun 22, 2026
Merged

[00546] Fix DataTable filter component mobile overflow#4620
dcrjodle merged 4 commits into
developmentfrom
tendril/00546-FixDataTableFilterComponentMobileOverflow

Conversation

@dcrjodle

Copy link
Copy Markdown
Collaborator

Fixes #4585

Summary

Changes

Made the DataTable filter component responsive to prevent horizontal overflow on mobile and tablet devices. On mobile breakpoints, the filter now renders as a popover overlay instead of inline expansion. On tablet breakpoints, the inline expansion uses constrained widths that adapt to the viewport.

API Changes

Modified DataTableOption component:

  • Now internally uses useCurrentBreakpoint hook to automatically adjust rendering mode based on screen size
  • No external API changes — the responsive behavior is automatic and consumers don't need to update their code

Files Modified

  • src/frontend/src/widgets/dataTables/DataTableOption.tsx — Added responsive logic with breakpoint detection
  • src/frontend/src/widgets/dataTables/__tests__/DataTableOption-responsive.test.tsx — New test file for responsive behavior

Commits

  • 36b571b: Fix test file to match project testing patterns
  • 1eee75f: Fix DataTable filter overflow on mobile devices

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

dcrjodle and others added 4 commits June 22, 2026 08:46
Make DataTableOption responsive by using popover mode on mobile breakpoints
and constrained widths on tablet. This prevents horizontal overflow when
the filter is expanded on smaller screens.

- Import useCurrentBreakpoint hook
- Override displayMode to "popover" on mobile breakpoint
- Apply responsive width constraints (max-w-[450px] w-[calc(100vw-8rem)]) on tablet
- Add test coverage for responsive behavior across breakpoints

Plan: 00546
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Use createRoot/mount pattern instead of @testing-library/react
which is not used in this project.

Plan: 00546
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The previous approach switched the DataTable filter to a popover overlay on
mobile to avoid horizontal overflow. Keep the inline-expansion behavior on all
breakpoints and instead constrain the expanded width: on compact screens
(mobile/tablet) the container goes full width and the panel flexes to fill the
remaining space, so it spans 100% of the screen without overflowing. Desktop
keeps the fixed 450px panel.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The expanded inline filter still overflowed the viewport on mobile because the
table header's left group was a content-sized flex item with the default
min-width:auto, so the CodeMirror editor's max-content width forced the whole
row wider than the screen. Give the left group min-w-0 + flex-1 (replacing the
spacer) so it fills the row and can clamp its children, and add min-w-0/max-w-full
to the expanded DataTableOption container so the editor scrolls horizontally
within the panel instead of pushing the layout past 100% width.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dcrjodle dcrjodle merged commit b8da646 into development Jun 22, 2026
9 of 11 checks passed
@artem-ivy-ai

Copy link
Copy Markdown
Collaborator

Staging removed

Staging environment has been deleted for this PR.

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.

Data table widget filter component not mobile responsive

2 participants