Skip to content

fix(DataTableToolbar): apply default bottom spacing - #1759

Open
khushal-winner wants to merge 1 commit into
layer5io:masterfrom
khushal-winner:fix/datatable-toolbar-bottom-spacing
Open

fix(DataTableToolbar): apply default bottom spacing#1759
khushal-winner wants to merge 1 commit into
layer5io:masterfrom
khushal-winner:fix/datatable-toolbar-bottom-spacing

Conversation

@khushal-winner

@khushal-winner khushal-winner commented Jul 28, 2026

Copy link
Copy Markdown

Reduces marginBottom from theme.spacing(4) to theme.spacing(2) so consumers inherit the toolbar-to-table gap without per-call-site sx overrides. Callers can still override via sx.

Closes #1719

Notes for Reviewers

This PR fixes #

Signed commits

  • Yes, I signed my commits.

Summary by CodeRabbit

  • Style
    • Reduced the bottom spacing in the data table toolbar for a more compact layout.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 94dc6ce6-644a-4155-ac15-fb97a10ecd02

📥 Commits

Reviewing files that changed from the base of the PR and between a7c7004 and 850ed5a.

📒 Files selected for processing (1)
  • src/custom/DataTableToolbar/DataTableToolbar.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/custom/DataTableToolbar/DataTableToolbar.tsx

📝 Walkthrough

Walkthrough

DataTableToolbar reduces the ToolbarRoot bottom margin from theme.spacing(4) to theme.spacing(2). No other styling, logic, props, or rendering changes are included.

Changes

DataTableToolbar spacing

Layer / File(s) Summary
Default bottom spacing
src/custom/DataTableToolbar/DataTableToolbar.tsx
ToolbarRoot now uses theme.spacing(2) for marginBottom instead of theme.spacing(4).

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the main change: default bottom spacing for DataTableToolbar.
Linked Issues check ✅ Passed The change matches #1719 by setting the toolbar root marginBottom to theme.spacing(2), and no other behavior changed.
Out of Scope Changes check ✅ Passed The PR is limited to the requested toolbar spacing adjustment and includes no unrelated code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@khushal-winner

Copy link
Copy Markdown
Author

@KhushamBansal , is it good to go?

@KhushamBansal KhushamBansal 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.

@khushal-winner I don't think we need a test for the sx override, since inline styles already take precedence. Could you remove the additional changes in DataTableToolbar.test.tsx?

Reduces marginBottom from theme.spacing(4) to theme.spacing(2) so
consumers inherit the toolbar-to-table gap without per-call-site sx
overrides. Callers can still override via sx.

Closes layer5io#1719

Signed-off-by: Khushal Malhotra <redmi5a3217@gmail.com>
@khushal-winner
khushal-winner force-pushed the fix/datatable-toolbar-bottom-spacing branch from 750e480 to 850ed5a Compare July 30, 2026 18:14
@khushal-winner

Copy link
Copy Markdown
Author

@KhushamBansal done.

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.

DataTableToolbar: bake in default bottom spacing between toolbar and table

2 participants