Skip to content

fix(data-table): filter placement/icon default, pinned-column gap, column-settings search & scroll - #420

Open
itsprade wants to merge 6 commits into
mainfrom
fix/data-table-filter-placement-and-column-ui
Open

fix(data-table): filter placement/icon default, pinned-column gap, column-settings search & scroll#420
itsprade wants to merge 6 commits into
mainfrom
fix/data-table-filter-placement-and-column-ui

Conversation

@itsprade

@itsprade itsprade commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Polish and bug fixes for the DataTable filter and column show/hide UI. Patch release for @tailor-platform/app-shell.

What's improved

Filter (DataTable.Filters)

  • Top-left by default — the Add-filter trigger now renders first (chips flow to its right) and the popover anchors to the trigger's left edge. Any consumer's <DataTable.Filters /> gets this automatically.
  • Icon-only by defaultaddIconOnly now defaults to true (label preserved as aria-label). Pass addIconOnly={false} to show the "Add filter" text label.

Pinned / sticky columns

  • Closed a sub-pixel gap between adjacent frozen columns where scrolling rows bled through. Header widths are now measured with getBoundingClientRect().width (fractional) instead of the integer-rounded offsetWidth, so accumulated sticky offsets land flush.

Column settings popup (ColumnSettings)

  • Search box at the top that filters the Scrollable list only — the Fixed-left / Fixed-right zones always show in full.
  • Scrollable-only scroll — only the Scrollable list is height-capped and scrolls; pinned zones and the Show/Hide-all footer stay pinned and fully visible, so the popup no longer overflows the screen with many (20+) columns.
  • Drag still works while searching — drop positions are keyed to each row's full-order index, so search → drag a column into a pinned zone (or reorder) lands correctly.
  • Thin, auto-hiding overlay scrollbar — 3px, only visible while scrolling or on hover, and reserves no width so the column checkboxes stay aligned with the pinned zones.

Notes / decisions

  • The Add-filter (icon-only) and Columns (icon+text) triggers are intentionally asymmetric by default for now — kept as-is per review. A follow-up could give ColumnSettings a matching icon-only mode if we want them symmetric.
  • Example: the DataTable Lab page is seeded with 22 columns to exercise the popup; searchColumns / noColumnsMatch i18n keys added (en + ja).

Testing

  • pnpm test — 1435 pass (added coverage: search filtering, pinned-zones-not-filtered, drag-while-searching into a pinned zone, icon-only default + addIconOnly={false} label).
  • pnpm type-check, pnpm lint (0 errors), pnpm fmt — all clean.
  • Verified in the vite-app preview across all four areas (light theme, short viewport, drag, scroll).

🤖 Generated with Claude Code

…column-settings search & scroll

- Filters: render the Add-filter trigger on the left by default (chips flow
  right; popover anchors start) and make it icon-only by default
  (addIconOnly now defaults to true; pass addIconOnly={false} for the label).
- Pinned columns: measure header widths with getBoundingClientRect().width so
  accumulated sticky offsets land flush and no sub-pixel gap leaks scrolling
  rows between adjacent frozen columns.
- ColumnSettings: add a search box that filters the Scrollable list only
  (pinned zones stay in full); cap only the Scrollable list's height with a
  thin, overlay, auto-hiding scrollbar that reserves no width (checkboxes stay
  aligned); keep drag-to-reorder / drag-between-zones working while searching
  via full-order drop indices; pin the Show/Hide-all footer.
- Lab example seeded with 22 columns to exercise the popup; i18n keys added.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@itsprade
itsprade requested a review from a team as a code owner August 5, 2026 09:07
@itsprade
itsprade marked this pull request as draft August 5, 2026 09:07
@IzumiSy IzumiSy added the preview A trigger label to create preview build by pkg-pr-new label Aug 6, 2026
@IzumiSy
IzumiSy marked this pull request as ready for review August 6, 2026 05:23
@pkg-pr-new

pkg-pr-new Bot commented Aug 6, 2026

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/@tailor-platform/app-shell@ba531e7
pnpm add https://pkg.pr.new/@tailor-platform/app-shell-sdk-plugin@ba531e7
pnpm add https://pkg.pr.new/@tailor-platform/app-shell-vite-plugin@ba531e7

commit: ba531e7

itsprade and others added 2 commits August 7, 2026 11:25
…-column hug

- AddFilterPanel: add an always-on search box over the field picker so a field
  is quick to find in tables with many filterable fields; the field column
  hugs the field-name width up to a 360px cap (long names truncate) while the
  value editor keeps a fixed 260px width — so a wide field column grows the
  panel rightward instead of squeezing the editor.
- TruncatedLabel: clipped field/column names in both the add-filter and
  column-settings pickers reveal their full text in a tooltip on hover (2s).
- ColumnSettings: search now narrows only the Scrollable list (pinned zones stay
  in full); popup width capped so long names truncate.
- Extract shared useAutoHideScroll hook + autoHideScrollbarClasses (thin overlay
  auto-hiding scrollbar) used by both the column-settings list and the
  add-filter field list; add TruncatedLabel component.
- i18n: add searchFields / noFieldsMatch (en + ja).
- Lab example: seed 22 columns (all filterable, some long labels) to exercise
  the pickers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@IzumiSy

IzumiSy commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

/review

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

API Design Review completed successfully!

Review complete. Posted 2 inline comments on PR #420 (toolbar.tsx:134 and toolbar.tsx:272) flagging: (1) silent behavioral breaking changes (addIconOnly default flip + trigger reorder) that warrant a minor version bump rather than patch, and (2) a UX bug where the field list and editor panel desynced when the field search filters out the active field. Verdict: Request Changes.

@github-actions github-actions Bot left a comment

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.

Generated by API Design Review for issue #420 · 76.9 AIC · ⌖ 6.17 AIC · ⊞ 5.8K
Comment /review to run again

Comment thread packages/core/src/components/data-table/toolbar.tsx
Comment thread packages/core/src/components/data-table/toolbar.tsx
Comment thread packages/core/src/components/data-table/use-autohide-scroll.ts Outdated
Comment thread packages/core/src/components/data-table/toolbar.tsx
itsprade and others added 2 commits August 7, 2026 13:28
…on with search

Address review feedback on #420:
- Remove the custom auto-hide overlay scrollbar (useAutoHideScroll +
  autoHideScrollbarClasses) from the column-settings and add-filter lists; use
  native browser scrolling instead (per reviewer — avoid custom scrollbar
  complexity). Deletes use-autohide-scroll.ts.
- Fix add-filter field/editor desync: when the field search filters out the
  currently-selected field, advance the selection to the first still-visible
  field so the list highlight and the value editor stay in sync. Adds a test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…b.com:tailor-platform/app-shell into fix/data-table-filter-placement-and-column-ui
Comment thread packages/core/src/components/data-table/truncated-label.tsx Outdated
Address review feedback: drop the TruncatedLabel component (useEffect +
ResizeObserver to conditionally show a tooltip) in favor of the native `title`
attribute on the field/column labels in the add-filter and column-settings
pickers. Simpler, no JS, browser shows the full text on hover.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview A trigger label to create preview build by pkg-pr-new

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants