fix: scrollbar select widgets style#41656
Conversation
- Introduced a new constant `SELECT_DROPDOWN_LIST_ITEM_HEIGHT_PX` for consistent row height in dropdowns. - Updated multiple components to utilize the new constant for list item height. - Added custom scrollbar styles for virtual lists to enhance UI consistency across select components. This change improves the visual consistency of dropdowns and enhances user experience by ensuring proper scrollbar visibility.
Items were extending full-width under the absolutely-positioned custom scrollbar, causing row backgrounds to bleed through the track. Add padding-right to holder-inner so items stop short of the scrollbar. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nsistency - Introduced a constant for scrollbar thumb dimensions to standardize styling. - Refactored scrollbar styles to utilize a base style for both vertical and horizontal scrollbars, ensuring consistent appearance across components. - Improved visibility and aesthetics of custom scrollbars in the rc-virtual-list and tree-select components. This change enhances the user experience by providing a more cohesive look and feel for dropdowns and selection widgets.
WalkthroughAdded exported constant Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@app/client/src/widgets/MultiSelectWidgetV2/component/index.styled.tsx`:
- Around line 130-133: The selectors .rc-virtual-list-holder-inner and
.rc-tree-select-tree-list-holder-inner use the physical property padding-right
which misaligns the logical scrollbar thumb in RTL; change that declaration to
use the logical property padding-inline-end: 10px so the gutter reserves space
at the logical end (matching inset-inline-end/inset-inline-start used elsewhere)
and prevents option backgrounds from rendering under the scrollbar.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: db1e0fd7-7f27-48cd-889a-40623938ebc9
📒 Files selected for processing (9)
app/client/src/components/constants.tsapp/client/src/widgets/MultiSelectTreeWidget/component/index.styled.tsxapp/client/src/widgets/MultiSelectTreeWidget/component/index.tsxapp/client/src/widgets/MultiSelectWidget/component/index.styled.tsxapp/client/src/widgets/MultiSelectWidget/component/index.tsxapp/client/src/widgets/MultiSelectWidgetV2/component/index.styled.tsxapp/client/src/widgets/MultiSelectWidgetV2/component/index.tsxapp/client/src/widgets/SingleSelectTreeWidget/component/index.styled.tsxapp/client/src/widgets/SingleSelectTreeWidget/component/index.tsx
Changed `padding-right` to `padding-inline-end` in the scrollbar styles for the rc-virtual-list and tree-select components to enhance layout consistency across different screen sizes and improve overall UI appearance.
|
/build-deploy-preview skip-tests=true |
|
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/23561998021. |
|
Caution Review failedAn error occurred during the review process. Please try again later. WalkthroughAdded a shared constant Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Deploy-Preview-URL: https://ce-41656.dp.appsmith.com |
…mponents Updated scrollbar dimensions and padding to enhance layout consistency and visual appeal. Introduced a constant for gutter width to ensure proper spacing when vertical scrollbars are present, improving overall user experience across selection widgets.
|
/build-deploy-preview skip-tests=true |
|
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/23662583812. |
|
Deploy-Preview-URL: https://ce-41656.dp.appsmith.com |
The scrollbar styling PR (#41656) changed listItemHeight from the default 24px to 38px, reducing visible items in the rc-virtual-list from ~12 to ~8. Multiselect dropdowns with 10+ options now have items beyond the viewport that are not rendered in the DOM, causing Cypress tests to timeout when selecting them. Add scrollVirtualListToOption helper that programmatically scrolls the rc-virtual-list-holder until the target option appears in the DOM before checking/unchecking it. Short-circuits immediately if the option is already visible.
## Summary - Fix Cypress test failures in `Json_Spec.ts` (and any other spec using `SelectJsonFormMultiSelect`) caused by multiselect dropdown options beyond the virtual scroll viewport not being rendered in the DOM - Add `scrollVirtualListToOption` helper to `DeployModeHelper.ts` that scrolls the `rc-virtual-list-holder` container until the target option appears before checking/unchecking it ## Context [Slack thread](https://theappsmith.slack.com/archives/C09NG5BJ18S/p1775544003897439) PR #41656 (`fix: scrollbar select widgets style`) changed `listItemHeight` from the default 24px to 38px in the MultiSelect widget. This reduced the number of items rendered in the `rc-virtual-list` DOM from ~12 to ~8 (calculated as `listHeight(300) / listItemHeight(38) = 7.89`). The `genres` Postgres enum used by `Json_Spec.ts` has 11 values. Items 10 (`Reference`) and 11 (`Spirituality`) are now outside the virtual viewport and not in the DOM. The existing `SelectJsonFormMultiSelect` method does `cy.get(div[title='Reference'] input[type='checkbox'])` which times out after 30s because the element doesn't exist until scrolled into view. **Before**: `listItemHeight=24` → `300/24 = 12.5` items visible → all 11 genres in DOM **After**: `listItemHeight=38` → `300/38 = 7.89` items visible → only first ~8 genres in DOM ## Changes **File**: `app/client/cypress/support/Pages/DeployModeHelper.ts` - Added `scrollVirtualListToOption()` private method that programmatically scrolls the `rc-virtual-list-holder` in 100px increments until the target option element appears in the DOM - Short-circuits immediately if the option is already visible (no unnecessary scrolling for items within the viewport) - Applied to both the check and uncheck branches of `SelectJsonFormMultiSelect` Fixes https://linear.app/appsmith/issue/APP-15088/fix-multiselect-virtual-scroll-breaking-cypress-tests-after-scrollbar ## Test plan - [ ] Run `Json_Spec.ts` and verify tests 19 (`Reference`), 20 (`Spirituality`), and 21-23 pass - [ ] Verify tests 1-18 still pass (no regression for items already in viewport) - [ ] Verify other specs using `SelectJsonFormMultiSelect` are unaffected ## Automation /ok-to-test tags="@tag.Datasource" ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/24084898391> > Commit: f183546 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=24084898391&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Datasource` > Spec: > <hr>Tue, 07 Apr 2026 14:47:17 UTC <!-- end of auto-generated comment: Cypress test results --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Improved multiselect dropdown interaction tests by adding automatic scrolling for virtualized lists so options are reliably brought into view before selection actions. * Added a dedicated locator for virtual list containers to make tests more robust and reduce flakiness when interacting with offscreen items. * Enhanced wait/scroll logic to ensure selections succeed consistently across environments. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Description
Tip
Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).
Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.
Dropdown lists in Select, Multi-select, and Tree Select widgets now use clearer, more consistent scrollbars. We fixed cases where list content could show through the scrollbar area, aligned scrollbar styling across these widgets, and tuned appearance (thickness, color, spacing) so long option lists look cleaner and more in line with the rest of the product. Existing apps get the updated look automatically; no migration or new settings are required.
Fixes #
Issue Numberor
Fixes https://github.com/appsmithorg/appsmith-ee/issues/8816
Warning
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.
Automation
/ok-to-test tags="@tag.Visual"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/23917434698
Commit: b686ac6
Cypress dashboard.
Tags:
@tag.VisualSpec:
Thu, 02 Apr 2026 19:34:52 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit