Repository navigation
[Bug Fix] DataTable: match dashboard-01 look (Columns trigger, badges, toolbar spacing) - #659
Merged
cirdes merged 2 commits intoNov 6, 2026
Conversation
…-01 status badges in the audit fixture DataTableColumnToggle's wrapper and its DropdownMenu root are display: contents, so the Columns button is a flex item of the toolbar like shadcn's trigger (its inline-flex blockifies to flex). The audit fixture's badges follow the dashboard-01 block (default size, px-1.5 text-muted-foreground, CircleCheck/Loader status icons), and the native checkbox's display and text-align differences are registered as divergences. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 8 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
cirdes
added a commit
that referenced
this pull request
Nov 6, 2026
…thout an inline onchange (#579) * Submit DataTablePerPageSelect through Stimulus instead of an inline onchange Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Attach the per-page select controller to the select so caller form data is left untouched Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Regenerate the MCP registry with the per-page select controller Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Render DataTablePerPageSelect with Select, as shadcn's data table block does * Register the server-driven per-page submit as a data_table divergence * Depend on Select in DataTable, qualify the per-page divergence and pin SelectInput's actions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * DataTable lists @floating-ui/dom, which Select and DropdownMenu load Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * [Bug Fix] DataTable: match dashboard-01 look (Columns trigger, badges, toolbar spacing) (#659) * [Bug Fix] DataTable: toggle trigger as a toolbar flex item, dashboard-01 status badges in the audit fixture DataTableColumnToggle's wrapper and its DropdownMenu root are display: contents, so the Columns button is a flex item of the toolbar like shadcn's trigger (its inline-flex blockifies to flex). The audit fixture's badges follow the dashboard-01 block (default size, px-1.5 text-muted-foreground, CircleCheck/Loader status icons), and the native checkbox's display and text-align differences are registered as divergences. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * [Bug Fix] DataTableToolbar: 24px before the table, as dashboard-01 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Cirdes <cirdes@linkana.com>
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.
Follow-up to #579 (stacked on it). It fixes the visual differences the shadcn audit still reported on DataTable against the dashboard-01 block (Base UI + vega + neutral). #579's per-page Select and CSP change is left alone.
What changed
Columns toggle (
display: inline-flexvsflex).Both buttons have the same
inline-flexclass. shadcn's trigger computesflexbecause it is a direct child of the toolbar'sdiv.flex, and a flex item'sinline-flexbecomesflex. In RubyUI,DataTableColumnToggle'sdiv.relativeand theDropdownMenuroot sat between the toolbar and the button, so the button stayed in block flow. Both wrappers are nowdisplay: contents. The menu is a top-layer popover anchored to the button, so it doesn't rely on either wrapper's box. Button and DropdownMenu are unchanged.Row checkbox (
block; text-align: startvsflex; text-align: left).RubyUI's checkbox is a native
<input type=checkbox>with no children; its check mark is an absolutely positioned::before. shadcn's is a<span class="flex">that centers its Indicator child.flexonly affects children, so on the input it renders the same box asblock. Thetext-alignline comes from the select-all checkbox in the header: the browser's form-control defaults reset the input tostart, while the span inheritsleftfromTableHead. In LTR the two are the same. Both are registered inaudit/divergences/data_table.yml, and Checkbox is unchanged."In Process" / "Done" badges look darker.
This came from the audit fixture, not Badge. RubyUI used
Badge(variant: :outline, size: :sm)(h-4,text-foreground). The block uses the default size withpx-1.5 text-muted-foreground, puts the type badge in adiv.w-32, and shows a status icon:CircleCheckIconwithfill-green-500 dark:fill-green-400for Done,LoaderIconotherwise. The shadcn fixture was missing those icons too. Both fixtures now follow the block, and computed color, size, padding, border and icon fill/stroke match in light and dark.Toolbar to table spacing.
The re-run showed one more difference: RubyUI's table sat 8px higher.
DataTableusesspace-y-4(16px), while the block's Tabs root hasgap-6(24px) between the toolbar and the table (andgap-4between the table and the pagination).DataTableToolbarnow hasmb-6, which overridesspace-y-4's zero-specificity margin below the toolbar only.After these changes the per-state pixel diff dropped from about 26k px (light) and 44k px (dark) to 33 px in every state (closed, open, focus, after-esc). The 33 px are the font fallback on "row(s)", the environment difference the audit already reports.
Screenshots
Each image is RubyUI on main + #579, RubyUI with this PR, and shadcn (Base UI + vega).
Audit checklists
Before (main + #579)
After (this PR)
Test steps
cd gem && bundle exec rake(782 runs + new toolbar and toggle tests, standardrb clean).cd audit && bundle exec rake testandcd mcp && bundle exec rake test./shadcn-audit data_table: the Look lines forDataTableColumnToggleandDataTableRowCheckboxno longer fail, and the per-state pixel diff is about 33 px./docs/data_table_demo, the Columns menu still opens, toggles columns and returns focus on Esc.The base branch
pierry01/data-table-per-page-selectis an unchanged copy of #579's head (78c4c24), because GitHub stacks don't take fork PRs. Merge #579 first, then retarget this PR tomain.🤖 Generated with Claude Code