Skip to content

Commit fb2a7df

Browse files
Hoist SegmentListView into own component, fix lingering external nav fade/realignment timing issues, add chapter markers and associated setting
1 parent 65a963d commit fb2a7df

18 files changed

Lines changed: 1322 additions & 314 deletions

contributions/localizedStrings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717
"%interlinearizer_viewOption_continuousScroll%": "Continuous Scroll",
1818
"%interlinearizer_viewOption_hideInactiveLinkButtons%": "Hide out-of-segment link buttons",
1919
"%interlinearizer_viewOption_simplifyPhrases%": "Show phrase controls on focus only",
20+
"%interlinearizer_viewOption_chapterLabelInVerse%": "Show chapter in verse label",
2021
"%interlinearizer_projectSettings_hideInactiveLinkButtons%": "Hide Out-of-Segment Link Buttons",
2122
"%interlinearizer_projectSettings_hideInactiveLinkButtonsDescription%": "Hide link buttons between phrases in segments that are not currently active",
2223
"%interlinearizer_projectSettings_simplifyPhrases%": "Show Phrase Controls on Focus Only",
2324
"%interlinearizer_projectSettings_simplifyPhrasesDescription%": "Hide interactive controls (split, unlink, remove-token) on phrases that are not currently focused, leaving only their style change on hover",
25+
"%interlinearizer_projectSettings_chapterLabelInVerse%": "Show Chapter in Verse Label",
26+
"%interlinearizer_projectSettings_chapterLabelInVerseDescription%": "Mark chapter boundaries by labeling the first verse of each chapter as chapter:verse instead of showing an inline chapter header above it",
2427
"%interlinearizer_linkButton_crossSegmentDisabledTooltip%": "Cross-segment phrases are not supported. This link button is outside the current segment.",
2528

2629
"%interlinearizer_modal_create_title%": "Create Interlinear Project",

contributions/projectSettings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
"label": "%interlinearizer_projectSettings_simplifyPhrases%",
1717
"description": "%interlinearizer_projectSettings_simplifyPhrasesDescription%",
1818
"default": false
19+
},
20+
"interlinearizer.chapterLabelInVerse": {
21+
"label": "%interlinearizer_projectSettings_chapterLabelInVerse%",
22+
"description": "%interlinearizer_projectSettings_chapterLabelInVerseDescription%",
23+
"default": false
1924
}
2025
}
2126
}

src/__tests__/components/InterlinearNavContext.test.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,20 @@ describe('InterlinearNavContext', () => {
158158
expect(result.current.consumeInternalNav(a)).toBe(true);
159159
expect(result.current.consumeInternalNav(b)).toBe(true);
160160
});
161+
162+
it('matches a verse-0 internal mark against the host-normalized verse-1 reference', () => {
163+
// An internal navigation stamped at chapter granularity (verse 0) must still be consumable
164+
// when the host echoes it back normalized to the chapter's first verse (verse 1) — the keys
165+
// are computed through the same normalization so they cannot diverge on the verse-0 boundary.
166+
const { result } = renderNav(
167+
makeScrollGroupHook({ book: 'GEN', chapterNum: 1, verseNum: 1 }),
168+
);
169+
170+
act(() => result.current.navigate({ book: 'GEN', chapterNum: 3, verseNum: 0 }, 'internal'));
171+
expect(result.current.consumeInternalNav({ book: 'GEN', chapterNum: 3, verseNum: 1 })).toBe(
172+
true,
173+
);
174+
});
161175
});
162176

163177
describe('cross-book fade clock', () => {

0 commit comments

Comments
 (0)