The Lookup sheet: Entry carousel, painted Surface Form, and the three nothings #12
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mobrule/kurageyomi#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
#1
What to build
The sheet becomes the thing it was designed as, and the two halves of the screen start talking to each other.
One Entry per panel, swipe for the rest. The sheet shows a single Entry at reading size — Headword, reading, part of speech, slang and colloquial tags, Reason Chain, senses — with runners-up one swipe away and the position shown as
1/4. Same scroll-snap mechanism as the Cue strip. Ranking is right most of the time, so alternatives are an escape hatch and should not cost vertical space on every tap. The position indicator matters: without it there is no way to tell whether there is anything to swipe to.Inset the strip from the screen edges and set
overscroll-behavior-x: contain, or a rightward swipe near the left edge triggers the Android back gesture and leaves the app.Show what matched. The Surface Form the Lookup resolved is painted in the Cue above using the CSS Custom Highlight API — a
Rangeover the existing text node, no DOM change, no per-character spans.Slang comes from JMdict, not a second dictionary. Its
sl,col,net-sl, andvulgsense tags are rendered next to the part of speech.A Lookup freezes the Cue strip, sharing the frozen state and catch-up control built in #10. The tapped Cue stays put while you read instead of scrolling away underneath the sheet.
Three nothings, three different answers:
no entrylabel. No sheet, no freeze. A miss and a mis-tap are otherwise indistinguishable, and the highlight is what tells you where your finger actually landed.Acceptance criteria
Blocked by
Merged to
mainin168b131.One Entry per panel in a scroll-snapped strip with a
1/4position indicator, inset from the screen edges withoverscroll-behavior-x: containso a rightward swipe does not fire the Android back gesture. The matched Surface Form is painted with the CSS Custom Highlight API — aRangeover the existing text node, no DOM change. JMdict'ssl/col/net-sl/vulgtags render next to the part of speech.A Lookup freezes the Cue strip through
cueStrip.ts's existing state — no second notion of frozen.The three nothings behave differently, which was the point: punctuation and latin are ignored outright; Japanese with no surviving Candidate highlights the tapped character for
NO_ENTRY_HIGHLIGHT_MSwith no sheet and no freeze, so a genuine miss is distinguishable from a fat-fingered mis-tap; a Lookup that could not run opens the sheet and says whether the dictionary is building or the server is silent.34 new tests, 179 total. Reviewer caught one real bug: a Lookup in flight when the episode changes would paint a Range over a detached text node — fixed by capturing the strip at tap time.
Carried to #13, all "judge it on the phone" items: halfwidth katakana falls into the silent nothing rather than the
no entryone; swiping the Cue strip while the sheet is open leaves the pre-lookup position stale so dismissing may not return to live; and the1/4indicator is not sticky, so a long Entry scrolls it out of view.