Pinned chapter header stays stale after dragging the scrollbar thumb
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 75/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- frontend
Direzione di ricerca
Start in src/components/SegmentListView.tsx at correctIndexAgainstLayout and the pinned-chapter effect, then read src/hooks/useSegmentWindow.ts around the content wrapper observer and window re-seating. Check how the visible range updates after a scrollbar drag. Done when tests or manual checks confirm the header matches the topmost visible segment after dragging to the top, middle, and bottom of a long book.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
In the segment list, dragging the scrollbar thumb a long way leaves the pinned chapter header showing the chapter you left. For example, drag from Psalm 115 to the top of the book: the list shows Psalm 1, but the header still says "Psalms 115":
This happens whether continuous view is on or off.
Cause
The header reads the chapter on the last scroll event, before the window has re-seated around the new position, and nothing reads it again after the window moves.
correctIndexAgainstLayoutclamps the height table's guess into the mounted range (Math.max(guess, range.start)). When the guess is outside the range, it returns a mounted segment from the old location instead of the correct guess.- The pinned-chapter effect re-reads on scroll events and on container resizes only.
A slow drag mostly avoids this because the skim renders ahead of the drag. A fast drag, or the final position of any drag, outruns it.
Fix
- Return
guessunchanged when it falls outside[range.start, range.end). - Re-read the top chapter after the window moves, by observing the content wrapper or by re-running on
range.start/range.end. This settles a guess that is slightly off near a chapter boundary.
Done when: after dragging the thumb to the top, the bottom, and the middle of a long book (e.g. Psalms on WEB), the header shows the chapter of the topmost visible segment once the drag ends.
Introduced in #337.
- Lingua principale
- TypeScript
- Stelle
- 2
- Fork
- 0
- Merge medio
- 2g 5h
- PR unite (30g)
- 47
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di sillsdev/interlinearizer-extension
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
sillsdev/interlinearizer-extension#419 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
sillsdev/interlinearizer-extension#418 ·
I maintainer di solito rispondono entro 1 giorno
-
Imported PT9 interlinear gloss data sometimes missingForse già presa @imnasnainaec l’ha presa 1 giorno fa. Aperta
sillsdev/interlinearizer-extension#477 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 1-2 giorni Idoneità per principianti 54/100
sillsdev/interlinearizer-extension#473 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 66/100
sillsdev/interlinearizer-extension#471 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di sillsdev/interlinearizer-extension
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
paperclipai/paperclip#17151 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
AgoraIO-Extensions/agent-infra#3159 ·
I maintainer di solito rispondono entro 1 giorno
-
blocklist addition
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 66/100
MetaMask/eth-phishing-detect#304596 ·
I maintainer di solito rispondono entro 1 giorno
-
friction
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
kentcdodds/kody#4142 ·
-
[Bug] Statistics | Task statistics are always empty on MikroORM with MySQL or SQLiteForse già presa @NdekoCode l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
ever-co/ever-gauzy#11214 ·
I maintainer di solito rispondono entro 1 giorno