Skip to content

TT-7380, TT-7298 more mark verses changes#416

Merged
gtryus merged 17 commits into
developfrom
mark-verses-changes-2
Jul 14, 2026
Merged

TT-7380, TT-7298 more mark verses changes#416
gtryus merged 17 commits into
developfrom
mark-verses-changes-2

Conversation

@nabalone

@nabalone nabalone commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

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:

  • Reference comparisons in markVersesEditReference.ts are now subpart-aware rather than whole-verse. Overlap detection, skip-ahead detection, and "in passage" checks all order at subpart granularity, so 1:2a and 1:2b no longer collide while the whole verse 1:2 still overlaps either.
  • Passage bounds are read from the passage's reference string (which preserves the subpart, e.g. 1:1-1:3a) instead of the calculated startVerse/endVerse attributes (which strip it), so a bound ending at 1:3a is judged consistently against any other subpart.
  • Skipped-verse detection now catches skipped leading subparts — e.g. 1:1 -> 1:2b flags the missing 1:2a, honoring both a passage that itself begins mid-verse and a prior row that already covered earlier subparts.
  • Auto-renumbering continues split verses correctly. New markVersesRenumberLeadingRef decides what leads the following row after an edit: an end at part a continues at b, an a-inclusive range continues with the next letter, and a mid-verse single-verse range moves on to the next verse.
  • Fixed the 1:1a-a case and the skipped-leading-subpart flag (1:1 -> 1:2b).

Inline editing + Edit Reference button in the table (new MarkVersesTable.tsx):

  • The table was extracted into its own MarkVersesTable component.
  • Click a reference to type it directly; Enter commits, Escape cancels.
  • An Edit Reference button appears on the current (highlighted) row, opening the dialog beside the segment being worked on.
  • Dedicated fixed-width warning and action columns keep reference text from shifting.
  • Tapping a row's warning icon shows a tooltip explaining the flag.
  • Extra scroll padding below the last row so it clears the floating Discussions button.

Feedback + housekeeping:

  • A toast now warns when an applied edit (from either the dialog or inline editing) results in an error or warning reference.
  • Dropped the IsMobile suffix from these files/components — they're used on desktop too now.
  • Reverted the earlier "split-verse suffix beside the verse field" layout in EditReferenceDropdown.tsx (doesn't fit on Iphone SE, needs UX re-design. Keeping pre-existing implementation for now.
  • Preserve segment splits when user switches to or from mobile mode
  • Use "primary" theme to highlight the Play/Pause button, rather than a blue circle

🤖 Generated with Claude Code

@nabalone nabalone force-pushed the mark-verses-changes-2 branch from a9aa6ff to c642e93 Compare July 13, 2026 16:08
@nabalone nabalone changed the title more mark verses changes TT-7380, TT-7298 more mark verses changes Jul 13, 2026
nabalone and others added 15 commits July 13, 2026 18:37
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>
@
chore(localization): regenerate strings bundle after rebase onto develop

Merged XLIFF (develop + branch changes) produces a new hashed bundle;
removes the two stale hash files and updates the pointer.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@
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>
@
@nabalone nabalone force-pushed the mark-verses-changes-2 branch from a736b96 to 08a942d Compare July 13, 2026 22:39
@nabalone nabalone force-pushed the mark-verses-changes-2 branch from 08a942d to c4bc440 Compare July 13, 2026 23:02
@nabalone

Copy link
Copy Markdown
Collaborator Author

See Edit button:
image
image

Toast:
image

image

@nabalone

Copy link
Copy Markdown
Collaborator Author

Also, when the Play button is highlighted, I made it use the theme styling instead of the blue circle
image

id="wsSegment"
onClick={handleAutoSegment}
disabled={!ready || playing || busyRef.current}
variant={highlightAutoSegment ? 'primary' : undefined}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@nabalone nabalone marked this pull request as ready for review July 14, 2026 00:40
@gtryus gtryus merged commit 20d142a into develop Jul 14, 2026
2 checks passed
@gtryus gtryus deleted the mark-verses-changes-2 branch July 14, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants