feat(ui): phone layout up to 768 px
Phones in landscape and small tablets (iPad mini upright) got the desktop layout from 640 px. The sm breakpoint is now 768 px; the media queries in index.css and the width checks in code (isPhoneWidth) follow it. The desktop header grid applies from sm. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8891dc046d
commit
117cf3445e
8 files changed
+39
-20
No files matched your search
@@ -18,6 +18,7 @@ import { AvatarStack, AvatarPerson } from '../../components/AvatarStack';
|
||||
import { CountBadge } from '../../components/CountBadge';
|
||||
import { ListSwitcher } from '../../components/ListSwitcher';
|
||||
import { LivePill } from '../../components/LivePill';
|
||||
import { isPhoneWidth } from '../../lib/breakpoints';
|
||||
import { OriginBadge } from '../../components/OriginBadge';
|
||||
import { VoiceInputButton } from '../../components/VoiceInputButton';
|
||||
import { FormSheet } from '../../components/FormSheet';
|
||||
@@ -126,10 +127,10 @@ export const SharedListsView: React.FC<SharedListsViewProps> = ({ onRefreshGloba
|
||||
const inputRef = useRef<HTMLInputElement | null>(null);
|
||||
|
||||
// Phones: the add form lives in a sheet opened by "+" instead of taking room above the list
|
||||
const [isPhone, setIsPhone] = useState(() => typeof window !== 'undefined' && window.innerWidth < 640);
|
||||
const [isPhone, setIsPhone] = useState(isPhoneWidth);
|
||||
const [showAddSheet, setShowAddSheet] = useState(false);
|
||||
useEffect(() => {
|
||||
const onResize = () => setIsPhone(window.innerWidth < 640);
|
||||
const onResize = () => setIsPhone(isPhoneWidth());
|
||||
window.addEventListener('resize', onResize);
|
||||
return () => window.removeEventListener('resize', onResize);
|
||||
}, []);
|
||||
@@ -838,7 +839,7 @@ export const SharedListsView: React.FC<SharedListsViewProps> = ({ onRefreshGloba
|
||||
}, [openItems]);
|
||||
|
||||
const focusNewItemInput = () => {
|
||||
if (window.innerWidth < 640) {
|
||||
if (isPhoneWidth()) {
|
||||
setShowAddSheet(true);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user