Make the app work better on iPhone and iPad
Build and Push Docker Image / build-and-push (push) Successful in 7m32s
Build and Push Docker Image / build-and-push (push) Successful in 7m32s
- Text fields are at least 16px on touch screens (stops iOS zooming on focus) - Chapter swipe ignores sheets, fields, sliders, sideways-scrolling rows and text selection - vh -> dvh for sheets, palette and dialogs - Bigger tap targets for small links, chips and the logo; no double-tap delay - No tap flash or landscape text inflation Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bdb04cdedc
commit
d29a66f984
12 files changed
+99
-14
No files matched your search
@@ -21,6 +21,7 @@ import NavigatorSheet from '../components/reader/NavigatorSheet.jsx';
|
||||
import SettingsSheet from '../components/reader/SettingsSheet.jsx';
|
||||
import CompareSheet from '../components/reader/CompareSheet.jsx';
|
||||
import SearchSheet from '../components/reader/SearchSheet.jsx';
|
||||
import { swipeAllowedFrom } from '../utils/swipe.js';
|
||||
import CrossRefMap from '../components/reader/CrossRefMap.jsx';
|
||||
import { useIqAvailable } from '../hooks/useIq.js';
|
||||
import MarksSheet from '../components/reader/MarksSheet.jsx';
|
||||
@@ -259,12 +260,13 @@ export default function ReaderPage() {
|
||||
|
||||
// Swipe left/right to change chapter
|
||||
const handleTouchStart = (e) => {
|
||||
if (readerDrawMode) return;
|
||||
if (readerDrawMode || !swipeAllowedFrom(e.target)) { swipeTouchRef.current = null; return; }
|
||||
const t = e.changedTouches[0];
|
||||
swipeTouchRef.current = { x: t.clientX, y: t.clientY };
|
||||
};
|
||||
const handleTouchEnd = (e) => {
|
||||
if (readerDrawMode || !swipeTouchRef.current) return;
|
||||
if (!window.getSelection()?.isCollapsed) { swipeTouchRef.current = null; return; } // dragging a text selection
|
||||
const t = e.changedTouches[0];
|
||||
const dx = t.clientX - swipeTouchRef.current.x;
|
||||
const dy = t.clientY - swipeTouchRef.current.y;
|
||||
@@ -529,7 +531,7 @@ export default function ReaderPage() {
|
||||
{/* Draw mode: scripture beside a notebook canvas */}
|
||||
{readerDrawMode && (
|
||||
<div className="mx-auto flex max-w-7xl flex-col items-start gap-4 px-4 py-4 pb-8 sm:flex-row">
|
||||
<div className="w-full rounded-2xl border border-[var(--r-line)] bg-[var(--r-bar)] p-4 font-serif text-sm leading-relaxed sm:sticky sm:top-16 sm:max-h-[80vh] sm:w-72 sm:shrink-0 sm:overflow-y-auto"
|
||||
<div className="w-full rounded-2xl border border-[var(--r-line)] bg-[var(--r-bar)] p-4 font-serif text-sm leading-relaxed sm:sticky sm:top-16 sm:max-h-[80dvh] sm:w-72 sm:shrink-0 sm:overflow-y-auto"
|
||||
onPointerUp={handleSelectionEnd}>
|
||||
<div className="mb-3">
|
||||
<span className="font-medium">{readerBook?.name} {readerChapter}</span>
|
||||
|
||||
@@ -113,7 +113,7 @@ export default function SetupPage() {
|
||||
</div>
|
||||
<input type="text" value={b.verseSearch} onChange={(e) => b.setVerseSearch(e.target.value)} placeholder="Search verses in this chapter…"
|
||||
className="mb-3 w-full rounded-xl border border-[var(--r-line)] bg-[var(--r-bg)] px-3 py-2 text-sm text-[var(--r-text)] focus:outline-none focus:ring-2 focus:ring-[var(--r-line)]" />
|
||||
<div data-testid="verse-list" className="max-h-[68vh] overflow-y-auto rounded-xl bg-[var(--r-bg)] px-3 py-3 font-serif text-[1.02rem] leading-[1.8]">
|
||||
<div data-testid="verse-list" className="max-h-[68dvh] overflow-y-auto rounded-xl bg-[var(--r-bg)] px-3 py-3 font-serif text-[1.02rem] leading-[1.8]">
|
||||
{activeChapter.verses
|
||||
.filter((v) => v.text.toLowerCase().includes(b.verseSearch.trim().toLowerCase()))
|
||||
.map((verse) => {
|
||||
@@ -181,7 +181,7 @@ export default function SetupPage() {
|
||||
<button type="button" onClick={() => b.splitAfterVerse(lastVerse)} className={smallBtn} title="Make one chunk from the last chunk to the end of the chapter">Chunk the rest</button>
|
||||
)}
|
||||
</div>
|
||||
<div className="max-h-[42vh] space-y-2 overflow-y-auto">
|
||||
<div className="max-h-[42dvh] space-y-2 overflow-y-auto">
|
||||
{activeChapter.chunks.length === 0 ? (
|
||||
<p className="rounded-xl border border-dashed border-[var(--r-line)] p-3 text-sm text-[var(--r-sub)]">No chunks yet. Click between verses, or suggest them from the headings.</p>
|
||||
) : activeChapter.chunks.map((chunk, index) => (
|
||||
|
||||
Reference in new issue
Block a user