Skip to content

fix(studio): mouse wheel scroll in column type selector#42126

Closed
7ttp wants to merge 1 commit intosupabase:masterfrom
7ttp:fix/column-type-selector-scroll
Closed

fix(studio): mouse wheel scroll in column type selector#42126
7ttp wants to merge 1 commit intosupabase:masterfrom
7ttp:fix/column-type-selector-scroll

Conversation

@7ttp
Copy link
Contributor

@7ttp 7ttp commented Jan 24, 2026

Problem

Mouse wheel scrolling does not work in the column type selector dropdown when creating or editing table columns.

Solution

Restructured the scroll container hierarchy to match the pattern used in other similar components (SchemaComboBox, DatabaseSelector, FunctionSelector):

  • Moved ScrollArea inside CommandGroup instead of wrapping the entire Command component
  • Set ScrollArea height to h-[250px] (smaller than CommandList's default max-h-[300px])
  • This ensures a single scroll container, allowing mouse wheel events to work properly

Related

Summary by CodeRabbit

  • New Features
    • Redesigned column type selector with improved scrolling for long lists, a dedicated area for enum/custom types, and an "Other types" header for clearer organization.
    • Consistent visual selection indicators across primary and enum options, with normalized display of type names and preserved selection behavior.
    • Repositioned "type not found" message for clearer feedback when a type isn't available.

✏️ Tip: You can customize this high-level summary in your review settings.

@7ttp 7ttp requested a review from a team as a code owner January 24, 2026 07:03
@vercel
Copy link

vercel bot commented Jan 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
docs Ready Ready Preview, Comment Jan 24, 2026 7:13am
studio-self-hosted Ready Ready Preview, Comment Jan 24, 2026 7:13am
studio-staging Ready Ready Preview, Comment Jan 24, 2026 7:13am
ui-library Ready Ready Preview, Comment Jan 24, 2026 7:13am
zone-www-dot-com Ready Ready Preview, Comment Jan 24, 2026 7:13am
3 Skipped Deployments
Project Deployment Review Updated (UTC)
cms Ignored Ignored Jan 24, 2026 7:13am
studio Ignored Ignored Jan 24, 2026 7:13am
design-system Skipped Skipped Jan 24, 2026 7:13am

Request Review

@vercel
Copy link

vercel bot commented Jan 24, 2026

@7ttp is attempting to deploy a commit to the Supabase Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Contributor

Thanks for contributing to Supabase! ❤️ Our team will review your PR.

A few tips for a smoother review process:

  • If you have a local version of the repo, run pnpm run format to make sure formatting checks pass.
  • Once we've reviewed your PR, please don't trivially merge master (don't click Update branch if there are no merge conflicts to be fixed). This invalidates any pre-merge checks we've run.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 24, 2026

Walkthrough

Reworks the column type Popover by removing the outer ScrollArea, adding conditional ScrollAreas for primary options and enumTypes, relocating the "type not found" message, updating option rendering and selection indicators, and normalizing enum selection values for camelCase public schema.

Changes

Cohort / File(s) Summary
Column Type Editor
apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx
Removed outer ScrollArea; render primary POSTGRES_DATA_TYPE_OPTIONS inside CommandList/CommandGroup without extra ScrollArea and add a conditional ScrollArea only when needed. Added a dedicated ScrollArea and "Other types" header for enumTypes. Moved/added selection Check indicator to primary options and enum items. Show option icon/name/description inline; relocate "Type not found" after CommandInput. For enum selection, strip escaped quotes for camelCase public schema before calling onOptionSelect. Maintained recommendation/alert flow and onSelect behavior to close the menu. Minor layout/content adjustments to reflect selected value consistently.

Suggested reviewers

  • awaseem
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description does not follow the required template structure. While it provides excellent context about the problem and solution, it lacks the template sections like 'kind of change', 'current behavior', and 'new behavior' headings. Restructure the description to match the template with sections: 'Kind of change', 'Current behavior', 'New behavior', and 'Additional context'.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: fixing mouse wheel scrolling in the column type selector component.
Linked Issues check ✅ Passed The PR successfully addresses the objective from issue #42125 by restructuring the scroll container hierarchy to enable single-scroll behavior and eliminate the double-scroll problem preventing mouse wheel scrolling.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the mouse wheel scrolling issue in the column type selector. The restructuring of ScrollArea placement and CommandGroup hierarchy aligns precisely with the stated objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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 and usage tips.

@7ttp 7ttp requested a review from awaseem January 24, 2026 07:04
@7ttp 7ttp force-pushed the fix/column-type-selector-scroll branch from a3a5688 to 23dfa93 Compare January 24, 2026 07:06
@coveralls
Copy link

Coverage Status

coverage: 66.134%. remained the same
when pulling 23dfa93 on 7ttp:fix/column-type-selector-scroll
into 17dde2e on supabase:master.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In
`@apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx`:
- Around line 189-274: The file ColumnType.tsx is failing Prettier; run Prettier
(or your editor's format command) on this file to correct JSX/JS formatting
around the Command_Shadcn_, CommandList_Shadcn_, CommandItem_Shadcn_, ScrollArea
and the enumTypes/POSTGRES_DATA_TYPE_OPTIONS mapping blocks; ensure consistent
indentation, trailing commas, and wrapped JSX props so the map callbacks and
onSelect handlers (referenced in CommandItem_Shadcn_ and the enumTypes map) are
formatted correctly and the file passes CI.
- Around line 228-265: The selection highlight/checkmark is out-of-sync because
onSelect strips quotes but the comparisons use the original option.format; fix
by normalizing option.format once (e.g., const normalized = option.schema ===
'public' ? option.format.replaceAll('"','') : option.format) inside the
enumTypes.map callback and then use that normalized value for
CommandItem_Shadcn_ value prop, the onSelect/onOptionSelect call, the displayed
text, and the equality check against value; update references to option.format
in this block (display, comparison, and value) to use the normalized variable
and keep setOpen behavior the same.
- Around line 223-227: The "Other types" label is currently rendered as a
selectable/focusable item via CommandItem_Shadcn_, causing
accessibility/keyboard confusion; replace that header by passing the string
"Other types" to the heading prop of CommandGroup_Shadcn_ and remove the
CommandItem_Shadcn_ wrapper so the group header is non-selectable (preserve the
existing ScrollArea and conditional enumTypes.length check around the group).

@7ttp
Copy link
Contributor Author

7ttp commented Jan 28, 2026

@ivasilov @joshenlim (sorry for the ping!)
😅 Can u please review this! when available.

@joshenlim
Copy link
Member

hey there @7ttp! thanks so much for this - i'm just checking the preview but i don't think the fix you've done addresses the issue, am still not able to scroll via mouse wheel in the column type selector

joshenlim added a commit that referenced this pull request Jan 29, 2026
## Context

Was informed of this UI bug through this PR
[here](#42126) - apart from
shifting the ScrollArea component, there's also known issue with
ScrollArea and Popover which we need to set `modal` to `true` for the
`Popover`

## To test

- [ ] Verify that you can scroll via mouse wheel on the ColumnType
component (Table Editor -> new table -> column type)
<img width="698" height="471" alt="image"
src="https://github.com/user-attachments/assets/b24af3f9-80f6-4dfc-9fa2-1492fe597598"
/>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Improvements**
* Popover in column editor now supports modal rendering mode with
enhanced scrolling behavior.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@joshenlim
Copy link
Member

We've got a fix through here! 🙏 Closing this PR in favor of that but thank you so much nonetheless for informing us about this issue! We really appreciate it! 🙇

@joshenlim joshenlim closed this Jan 29, 2026
@7ttp 7ttp deleted the fix/column-type-selector-scroll branch January 29, 2026 09:21
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.

Scrolling not working

3 participants