fix(ui): responsive mobile — full phone/tablet adaptation across all components
Surgical CSS/className-only changes, zero behavior impact. 155/155 tests green. - Dialog: tighter mobile padding (p-3/px-4), reduced max-height to 85vh - Button: sm size h-8→h-9 (36px touch target), responsive text sizing - VertebraPicker: 44px min-height touch targets on mobile region tabs - SVG editor: sidebar stacks below canvas <768px, full-width mobile, zoom controls 40px, canvas min-height 40vh - AnatomyCanvas: SVG child constrained to fit container - EditorRoute: responsive gap/padding, canvas max-h-[55vh] on mobile - ObservationList + ConclusionPanel: responsive section heading typography Target: 375px+ (iPhone SE) usable, 768px+ (iPad) polished, desktop no regressions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
1f30280762
commit
a73d8da263
10 files changed
+909
-19
No files matched your search
@@ -18,9 +18,9 @@ const VARIANTS: Record<NonNullable<ButtonProps['variant']>, string> = {
|
||||
}
|
||||
|
||||
const SIZES: Record<NonNullable<ButtonProps['size']>, string> = {
|
||||
sm: 'h-8 px-3 text-sm rounded-md',
|
||||
md: 'h-10 px-4 text-base rounded-lg',
|
||||
lg: 'h-12 px-6 text-base rounded-lg',
|
||||
sm: 'h-9 px-3 text-sm rounded-md',
|
||||
md: 'h-10 px-4 text-sm sm:text-base rounded-lg',
|
||||
lg: 'h-12 px-5 sm:px-6 text-base rounded-lg',
|
||||
}
|
||||
|
||||
export default function Button({
|
||||
|
||||
@@ -27,7 +27,7 @@ export default function Dialog({ open, onClose, title, children, size = 'md' }:
|
||||
return (
|
||||
<AnimatePresence>
|
||||
{open && (
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center p-4">
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-4">
|
||||
<motion.div
|
||||
data-testid="dialog-backdrop"
|
||||
className="absolute inset-0 bg-black/40"
|
||||
@@ -45,9 +45,9 @@ export default function Dialog({ open, onClose, title, children, size = 'md' }:
|
||||
animate={{ opacity: 1, scale: 1 }}
|
||||
exit={{ opacity: 0, scale: 0.96 }}
|
||||
transition={{ duration: 0.18 }}
|
||||
className={`relative w-full ${SIZE[size]} max-h-[90vh] overflow-y-auto rounded-2xl bg-[var(--color-surface)] shadow-xl`}
|
||||
className={`relative w-full ${SIZE[size]} max-h-[85vh] overflow-y-auto rounded-2xl bg-[var(--color-surface)] shadow-xl`}
|
||||
>
|
||||
<header className="flex items-center justify-between px-6 py-4 border-b border-[var(--color-border)]">
|
||||
<header className="flex items-center justify-between px-4 sm:px-6 py-3 sm:py-4 border-b border-[var(--color-border)]">
|
||||
<h2 className="text-lg font-semibold text-[var(--color-ink)]">{title}</h2>
|
||||
<button
|
||||
type="button"
|
||||
@@ -58,7 +58,7 @@ export default function Dialog({ open, onClose, title, children, size = 'md' }:
|
||||
✕
|
||||
</button>
|
||||
</header>
|
||||
<div className="px-6 py-4">{children}</div>
|
||||
<div className="px-4 sm:px-6 py-3 sm:py-4">{children}</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user