TT-7380, TT-7298 more mark verses changes#416
Conversation
a9aa6ff to
c642e93
Compare
fix(mark-verses): flag skipped leading subpart (1:1 -> 1:2b skips 1:2a) Make the skipped-verse detection subpart-aware. Previously a next-row reference that jumped to a mid-verse subpart (e.g. `1:1` followed by `1:2b` or `1:2b-c`) was treated as valid because the skip check compared only whole-verse order keys, ignoring the letter suffix. - markVersesReferenceSkipsAhead now compares against the expected resume position at subpart granularity, so starting a new split verse at part b (skipping part a) counts as a forward gap and gets the warning. - markVersesSkippedPassageRefs now lists the skipped leading subparts (e.g. `1:2a`) alongside any skipped whole verses. Update/extend the unit tests for both. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> @
feat(mark-verses): place split-verse suffix beside the verse field In the Edit Reference dialog, when "Split verse" is checked the letter suffix picker now sits inline to the right of its verse field instead of stacked beneath it, per the design mockup. Applies to both the fixed start / dropdown end (restricted) layout and the fully editable (unrestricted) endpoints via a shared renderSuffixSelect helper. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> @
refactor(mark-verses): drop "IsMobile" from names now used on desktop too
Mark Verses is now used on desktop as well as mobile, so rename the
component files and identifiers to drop the misleading "IsMobile"
suffix:
- PassageDetailMarkVersesIsMobile.{tsx,test.tsx,cy.tsx} -> PassageDetailMarkVerses.*
- MarkVersesTableIsMobile.tsx -> MarkVersesTable.tsx
- exported components / props types renamed to match
- id "mark-verses-mobile" -> "mark-verses", table aria-label
"mobile mark verses table" -> "mark verses table"
- update the two importers and the XLIFF sourcefile context
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@
This reverts commit f5de0fa.
test(mark-verses): match in-row Edit Reference button by aria-label The standalone "Edit Reference" button became a compact in-row icon button whose accessible name comes from its aria-label (verse-edit-reference-<rowIndex>), not visible text. Update the tests to click it via a clickEditReference helper and add the missing `edit` key to the useSelector mock. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> @
a736b96 to
08a942d
Compare
08a942d to
c4bc440
Compare
| id="wsSegment" | ||
| onClick={handleAutoSegment} | ||
| disabled={!ready || playing || busyRef.current} | ||
| variant={highlightAutoSegment ? 'primary' : undefined} |
There was a problem hiding this comment.
highlightAutoSegment is currently never set.
Claude says:
When is the auto-segment button highlighted in real use?
Today: never. No code passes highlightAutoSegment={true} to WSAudioPlayer. The prop is dead plumbing — it exists on WSAudioPlayer and WSAudioPlayerSegment but nothing sets it, so the auto-segment button always renders in its plain (non-highlighted) state. That's why I had to force it to show you.
Where it came from (git history): It was added in commit 3ff5d28 (TT-6814, the Phrase Back Translation mobile feature). The original caller highlighted the button under exactly this condition:
highlightAutoSegment={
isPhraseBackTranslation &&
mobileView &&
activityRef.current === Activity.Segment
}
So in real use it was meant to fire in the Phrase Back Translation (PBT) tool, on mobile, while the user was on the "Segment" activity — a guided cue nudging the user to tap Auto Segment.
That caller was then removed in 8fc598c (TT-7104, "reverting unstable mobile changes to PBT") and 2dc5f20 ("remove unused code"), which stripped the mobile PBT flow but left the highlightAutoSegment prop threaded through both components. It's now orphaned.





More Mark Verses changes.
What changed
Verse-letter subparts (
1:1a,1:2b) are now first-class throughout Mark Verses validation and renumbering — this is the bulk of the work:markVersesEditReference.tsare now subpart-aware rather than whole-verse. Overlap detection, skip-ahead detection, and "in passage" checks all order at subpart granularity, so1:2aand1:2bno longer collide while the whole verse1:2still overlaps either.referencestring (which preserves the subpart, e.g.1:1-1:3a) instead of the calculatedstartVerse/endVerseattributes (which strip it), so a bound ending at1:3ais judged consistently against any other subpart.1:1 -> 1:2bflags the missing1:2a, honoring both a passage that itself begins mid-verse and a prior row that already covered earlier subparts.markVersesRenumberLeadingRefdecides what leads the following row after an edit: an end at partacontinues atb, ana-inclusive range continues with the next letter, and a mid-verse single-verse range moves on to the next verse.1:1a-acase and the skipped-leading-subpart flag (1:1 -> 1:2b).Inline editing + Edit Reference button in the table (new
MarkVersesTable.tsx):MarkVersesTablecomponent.Feedback + housekeeping:
IsMobilesuffix from these files/components — they're used on desktop too now.EditReferenceDropdown.tsx(doesn't fit on Iphone SE, needs UX re-design. Keeping pre-existing implementation for now.🤖 Generated with Claude Code