Skip to content

fix: prevent table menu button clipping#41944

Open
jiuyige wants to merge 4 commits into
appsmithorg:releasefrom
jiuyige:fix/table-menu-button-clipping
Open

fix: prevent table menu button clipping#41944
jiuyige wants to merge 4 commits into
appsmithorg:releasefrom
jiuyige:fix/table-menu-button-clipping

Conversation

@jiuyige

@jiuyige jiuyige commented Jul 3, 2026

Copy link
Copy Markdown

Description

Fixes #41578

Prevents Table V2 menu buttons from overflowing their cell box in published apps. The button now uses a border-box width so padding and borders stay inside the cell instead of being clipped by the table cell overflow.

Also adds a Cypress regression check that deploys the app and verifies the menu button remains within the published table cell bounds.

Validation

  • git diff --check
  • Not run: targeted eslint/prettier/Cypress could not run locally because this checkout has no node_modules state file, and available local Node versions are 24.11.1 and 24.14.0 while the project requires ^24.14.1.

Summary by CodeRabbit

  • Bug Fixes

    • Improved table menu button sizing and alignment to keep it properly contained within the cell, including in published/deployed views.
  • Tests

    • Added an end-to-end check that verifies the menu button stays within the target cell bounds (with a small tolerance).

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Updates the TableWidgetV2 menu button to use full-width, border-box sizing and adds a Cypress check that confirms the button fits within its cell in deployed mode.

Changes

Menu Button Cell-Fit Fix

Layer / File(s) Summary
Menu button CSS fix
app/client/src/widgets/TableWidgetV2/component/cellComponents/menuButtonTableComponent.tsx
Adds box-sizing: border-box, width: 100%, and a test id on the rendered menu button.
Cypress verification test
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/ColumnTypeMenubutton_spec.js
Adds assertMenuButtonFitsCell and a deployed-mode test that checks the menu button stays within the target cell bounds.

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

Poem

A button once edged past the line,
Now box-sized and full-width, doing fine.
Cypress took a careful peek,
And found the cell fit neat and sleek.
No more clipped bits in sight today—
Just tidy bounds that hold their sway.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the issue and validation, but it omits required template sections like Automation and Communication. Add the missing template sections, including /ok-to-test tags, the Cypress test results block, and the Communication checkbox.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes address #41578 by constraining the menu button within the table cell and adding a published-mode regression test.
Out of Scope Changes check ✅ Passed The PR stays focused on the menu-button clipping fix and its regression coverage, with no obvious unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly matches the main change: preventing Table V2 menu button clipping.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/ColumnTypeMenubutton_spec.js`:
- Line 9: The Cypress selector in the ColumnTypeMenubutton_spec test is tied to
Blueprint’s internal .bp3-button class, so update the cy.get lookup to use an
existing data-* attribute on the button instead. Keep the test aligned with the
codebase convention by selecting through a stable data selector in the relevant
TableV2 column type interaction, and avoid plain class-based CSS selectors here.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 15da5c33-e72b-4647-8f82-a6c5443c054c

📥 Commits

Reviewing files that changed from the base of the PR and between 4163960 and a759e3a.

📒 Files selected for processing (2)
  • app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/ColumnTypeMenubutton_spec.js
  • app/client/src/widgets/TableWidgetV2/component/cellComponents/menuButtonTableComponent.tsx

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.

[Bug]: Issue with Display of Menu Buttons in Table – Cross-Browser Incompatibility

1 participant