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
@@ -113,7 +113,7 @@ export default function AnatomyCanvas({
|
||||
ref={wrapperRef}
|
||||
className={`svg-canvas relative w-full h-full ${className}`}
|
||||
>
|
||||
<div ref={svgRef} className="w-full h-full" />
|
||||
<div ref={svgRef} className="w-full h-full [&>svg]:max-w-full [&>svg]:max-h-full [&>svg]:mx-auto" />
|
||||
<div
|
||||
ref={tooltipRef}
|
||||
className="zone-tooltip"
|
||||
|
||||
@@ -39,7 +39,7 @@ export default function ObservationList({
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
<div className="flex items-center justify-between">
|
||||
<h2 className="font-serif text-xl text-[var(--color-ink)]">
|
||||
<h2 className="font-serif text-lg sm:text-xl text-[var(--color-ink)]">
|
||||
{t('observation.section_title')}
|
||||
</h2>
|
||||
<Button size="sm" onClick={onAdd}>
|
||||
|
||||
@@ -92,7 +92,7 @@ export default function VertebraPicker({
|
||||
aria-selected={activeRegion === r}
|
||||
onClick={() => setActiveRegion(r)}
|
||||
className={[
|
||||
'rounded-full px-4 py-1.5 text-sm font-medium border',
|
||||
'rounded-full px-4 py-2.5 sm:py-1.5 text-sm font-medium border min-h-[2.75rem]',
|
||||
activeRegion === r
|
||||
? 'bg-[var(--color-accent)] text-white border-[var(--color-accent)]'
|
||||
: 'bg-white text-[var(--color-ink)] border-[var(--color-border)]',
|
||||
|
||||
@@ -24,7 +24,7 @@ export default function ConclusionPanel({
|
||||
const t = useT()
|
||||
return (
|
||||
<section className="space-y-4">
|
||||
<h2 className="font-serif text-xl text-[var(--color-ink)]">
|
||||
<h2 className="font-serif text-lg sm:text-xl text-[var(--color-ink)]">
|
||||
{t('conclusion.section_title')}
|
||||
</h2>
|
||||
<div>
|
||||
|
||||
@@ -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