- 
                Notifications
    
You must be signed in to change notification settings  - Fork 180
 
Replace native select with FormatSelectDropdown in PasteSessionForm #3938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace native select with FormatSelectDropdown in PasteSessionForm #3938
Conversation
- Replace native <select> element with FormatSelectDropdown component - Remove unused isFormatType helper function - Remove unused formatSelectId from useId hook - Remove unused CSS classes: formatSelect, formatLabel, formatSelectorWrapper - Maintain existing functionality with selectedFormat and onFormatChange props Co-Authored-By: [email protected] <[email protected]>
          🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically: 
 Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options: 
  | 
    
| 
           Finished running flow. 
  | 
    
| 
           The latest updates on your projects. Learn more about Vercel for GitHub. 
  | 
    
| 
           Updates to Preview Branch (devin/1761729947-use-format-select-dropdown) ↗︎ 
 Tasks are run on every commit but only new migration files are pushed. 
 View logs for this Workflow Run ↗︎.  | 
    
| 
          
 Important Review skippedBot user detected. To trigger a single review, invoke the  You can disable this status message by setting the  Comment   | 
    
          Check changeset necessityStatus: NOT REQUIRED Reason:
 Changeset (copy & paste):# No changeset required — changes affect only the ignored package "@liam-hq/app". | 
    
- Wrap FormatSelectDropdown in a div with formatDropdown class - Add CSS to set align-self: flex-start and width: fit-content - This prevents the dropdown from stretching to full width in the flex container Co-Authored-By: [email protected] <[email protected]>
Co-Authored-By: [email protected] <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR replaces the native <select> element in PasteSessionForm with the existing FormatSelectDropdown component to unify the UI, and makes the dropdown content-sized instead of full-width.
Key changes:
- Replaced native 
<select>withFormatSelectDropdowncomponent - Removed 39 lines of unused CSS for the old select element
 - Made dropdown content-sized using 
width: fit-content 
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description | 
|---|---|
| PasteSessionFormPresenter.tsx | Replaced native select with FormatSelectDropdown component and removed helper function | 
| PasteSessionFormPresenter.module.css | Removed CSS classes for native select and added formatDropdown class for content-sized width | 
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great refactoring! Thank you!
Issue
Why is this change needed?
This PR unifies the UI by replacing the native
<select>element in PasteSessionFormPresenter with the existingFormatSelectDropdowncomponent, addressing feedback from PR #3921. Additionally, it makes the dropdown content-sized instead of full-width per user request.What changed?
Component Integration:
<select>withFormatSelectDropdowncomponentisFormatTypehelper function (no longer needed)formatSelectIdfromuseId()hookformatDropdownclass for content-sized widthCSS Changes:
formatSelect,formatLabel,formatSelectorWrapper(39 lines removed)formatDropdownclass withalign-self: flex-startandwidth: fit-contentto prevent stretching in the flex containerDisabled State Handling: The original native select had
disabled={isPending}butFormatSelectDropdowndoesn't accept adisabledprop. Please verify the dropdown is appropriately non-interactive when the form is in pending state.Label Removal: The "Schema Format" text label was removed since
FormatSelectDropdowndisplays the selected format inline. Please confirm this is the desired UX.Width Behavior: The dropdown now uses
width: fit-contentwith the component's existingmin-width: 127px. If the minimum width should also be removed, please let me know.Visual Testing Needed: Changes were validated with lint/typecheck but not visually tested. Please verify in the preview:
Link to Devin run: https://app.devin.ai/sessions/91b8ec857810412a9ddd095d321a8ebe
Requested by: @MH4GF ([email protected])