Skip to content

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

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

fix(DataTableToolbar): apply default bottom spacing#1759
khushal-winner wants to merge 2 commits 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 default spacing below the data table toolbar for a more compact layout.
    • Toolbar spacing overrides now support both top and bottom margins.

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>
@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: 09186f6a-5f5b-47eb-b7c8-c86277f005d1

📥 Commits

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

📒 Files selected for processing (2)
  • src/__testing__/DataTableToolbar.test.tsx
  • src/custom/DataTableToolbar/DataTableToolbar.tsx

📝 Walkthrough

Walkthrough

DataTableToolbar now defaults to a 16px bottom margin, while sx values can override both top and bottom margins. Tests cover the updated default and override behavior.

Changes

DataTableToolbar spacing

Layer / File(s) Summary
Default bottom spacing and overrides
src/custom/DataTableToolbar/DataTableToolbar.tsx, src/__testing__/DataTableToolbar.test.tsx
ToolbarRoot uses theme.spacing(2) for marginBottom; tests verify the 16px default and custom marginTop and marginBottom overrides.

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

Suggested reviewers: uday9909

🚥 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 describes the main change: adding default bottom spacing to DataTableToolbar.
Linked Issues check ✅ Passed The changes implement the requested default marginBottom spacing and preserve sx overrides as required by #1719.
Out of Scope Changes check ✅ Passed The PR stays focused on DataTableToolbar spacing and matching tests, with no obvious unrelated 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?

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

1 participant