fix: critical mobile viewport fixes - login, modals, page constraints

- Remove min-h-screen or make responsive (md:min-h-screen for desktop only)
- Login modal: p-8 → p-4 md:p-6, space-y-8 → space-y-3 md:space-y-4
- NewItemDialog: responsive spacing p-4 md:p-6, gaps 3 md:gap-4
- StockAdjustmentPanel: p-6 → p-4 md:p-6, gaps/spacing reduced for mobile
- All container padding and gaps now follow mobile-first pattern
- Fixes viewport overflow on 375px portrait mode
- Tests: 291/291 passing
This commit is contained in:
2026-04-19 19:04:17 +03:00
parent f05fe4b1b6
commit 2cbc036eb2
9 changed files with 43 additions and 43 deletions

View File

@@ -63,8 +63,8 @@ export default function StockAdjustmentPanel({
return (
<div data-testid="stock-adjustment-form" className="fixed inset-0 z-50 flex items-end sm:items-center justify-center p-4 bg-background/80 animate-in fade-in duration-200">
<div className="w-full max-w-lg bg-surface border border-slate-800 rounded-[2.5rem] shadow-2xl p-6 overflow-hidden animate-in slide-in-from-bottom-10 duration-300">
<div className="flex justify-between items-center mb-6">
<div className="w-full max-w-lg bg-surface border border-slate-800 rounded-[2.5rem] shadow-2xl p-4 md:p-6 overflow-hidden animate-in slide-in-from-bottom-10 duration-300">
<div className="flex justify-between items-center mb-3 md:mb-4">
<h3 className="text-xl font-normal tracking-tight flex items-center gap-2">
<span data-testid="adjustment-item-name">{isEditing ? "Edit Metadata" : selectedItem.name}</span>
{!isEditing && (
@@ -101,7 +101,7 @@ export default function StockAdjustmentPanel({
</div>
{isEditing ? (
<div className="space-y-4 mb-8">
<div className="space-y-2 md:space-y-3 mb-4 md:mb-6">
<div>
<div className="bg-surface py-2.5 px-4 rounded-[1.2rem] border border-slate-800 focus-within:border-primary/50 transition-colors group">
<label className="text-xs text-secondary font-normal mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight">Item Name</label>
@@ -229,7 +229,7 @@ export default function StockAdjustmentPanel({
</div>
) : (
<>
<div className="flex p-1 bg-background rounded-2xl mb-8">
<div className="flex p-1 bg-background rounded-2xl mb-4 md:mb-6">
{[
{ id: 'ADD', label: 'Buy More', icon: Plus, color: 'text-primary' },
{ id: 'REMOVE', label: 'Subtract', icon: Minus, color: 'text-amber-500' },
@@ -249,8 +249,8 @@ export default function StockAdjustmentPanel({
))}
</div>
<div className="flex flex-col items-center gap-6 mb-8">
<div className="flex items-center gap-8">
<div className="flex flex-col items-center gap-3 md:gap-4 mb-4 md:mb-6">
<div className="flex items-center gap-2 md:gap-4">
<button
onClick={() => onQuantityChange(Math.max(1, adjustQty - 1))}
className="w-12 h-12 rounded-full border border-slate-800 flex items-center justify-center text-secondary active:bg-slate-800"