Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Pinned chapter header stays stale after dragging the scrollbar thumb

クローズ
#476 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@imnasnainaec がすでに取り組んでいます。

2026年10月22日 から。

  • #484 @imnasnainaec による — マージ済み

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
75/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
react, typescript
領域
frontend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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":
Image

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.

  1. correctIndexAgainstLayout clamps 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.
  2. The pinned-chapter effect re-reads on scroll events and on container resizes only.
    • The re-seat triggers no scroll event: at scrollTop === 0, useSegmentWindow skips compensation (L1059).
    • The container's box doesn't change when its contents do. useSegmentWindow also observes the content wrapper for this reason (L1045).

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 guess unchanged 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.

主要言語
TypeScript
スター
2
フォーク
0
平均マージ
1日 20時間
マージ済み PR(30日)
53

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sillsdev/interlinearizer-extension のほかの issue

sillsdev/interlinearizer-extension の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。