Refactor SelectExportTypeModal with OS-Legal UI and styled-components#925
Refactor SelectExportTypeModal with OS-Legal UI and styled-components#925
Conversation
Migrate the export type selection modal from Semantic UI to @os-legal/ui component library, following the established modal pattern used in CorpusModal and UploadModal. Changes: - Replace Semantic UI Modal/Button/Icon with @os-legal/ui Modal, ModalHeader, ModalBody, ModalFooter, Button, Spinner - Replace Semantic UI icons with lucide-react (Package, FileOutput, etc.) - Add styled-components with OS-Legal design tokens (CSS variables, form sections, responsive layout) - Replace dropdown-based format selection with visual radio card UI - Add mobile-responsive bottom-sheet layout with safe-area support - Change component API from `visible` prop to `open`/`onClose` props - Update Corpuses.tsx to use new prop API - Add Playwright component test with 8 test cases covering default state, format switching, actions, post-processors, and mobile layout - Add docScreenshot captures for export documentation - Update export-import docs with step-by-step export instructions and auto-generated screenshot references Closes #923 https://claude.ai/code/session_01HDEJE3NBQ2XYN2bEuP3Yvh
Code ReviewOverall this is a solid refactor — the card-based format selection is much cleaner than the old dropdown-inside-an-info-box pattern, the prop interface is semantically better, and the mobile responsiveness is a real improvement. A few things to address: Issues1. Local magic number:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
Refactored the
SelectExportTypeModalcomponent to use the OS-Legal design system and styled-components, replacing Semantic UI components with custom-styled alternatives. The modal now features improved visual design, better mobile responsiveness, and cleaner component architecture.Key Changes
Modal,Modal.Header,Modal.Content,Modal.Actions) with OS-Legal UI components (Modal,ModalHeader,ModalBody,ModalFooter){ visible: boolean }to{ open: boolean; onClose: () => void }for better semantic clarity and controlhandleExportFormatChange→handleFormatSelect)Notable Implementation Details
var(--oc-spacing-lg)) for consistent themingsafe-area-inset-bottomfor notch-aware paddinghttps://claude.ai/code/session_01HDEJE3NBQ2XYN2bEuP3Yvh