Skip to content

Conversation

@cameronapak
Copy link
Collaborator

@cameronapak cameronapak commented Jan 14, 2026

This directory is used by the OpenCode tool and should not be committed
to the repository.
This commit introduces logic to wrap verse content within `yv-v`
elements. This change facilitates easier CSS targeting for
verse-specific styling, such as highlighting.

The implementation handles cases where verses span multiple paragraphs
by duplicating the `yv-v` wrapper as per the Bible.com pattern. It also
ensures that verse labels are preserved within these new wrappers and
that header elements are not erroneously included.
The extractNotesFromHtml function has been refactored into
extractNotesFromWrappedHtml. This new function assumes that verse
content has already been wrapped in .yv-v[v] elements by
wrapVerseContent.

This change simplifies the footnote extraction process by leveraging the
existing verse wrapping and making the logic more straightforward. It
also ensures footnotes are correctly associated with their respective
verses, even when verses span multiple paragraphs.
Insert the footnote placeholder as a sibling after the last verse
wrapper, rather than as a child of the last verse wrapper. This ensures
correct DOM structure and prevents potential rendering issues.
This commit introduces the ability to select individual verses within
the Verse and BibleTextView components.

Key changes include:

- Added `selectedVerses` and `onVerseSelect` props to `VerseHtml`,
  `Verse`, and `BibleTextView` components.
- Implemented click handlers in `HtmlWithNotes` to manage verse
  selection and deselection.
- Added styling for selected verses in `bible-reader.css`.
- Introduced a new `VerseSelection` story to demonstrate the new
  functionality.
@cameronapak cameronapak self-assigned this Jan 14, 2026
@changeset-bot
Copy link

changeset-bot bot commented Jan 14, 2026

⚠️ No Changeset found

Latest commit: fb65622

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cameronapak cameronapak changed the base branch from main to cam/YPE-641-precursor-transform-html-for-highlights January 14, 2026 17:59
@cameronapak cameronapak force-pushed the cam/YPE-641-precursor-transform-html-for-highlights branch from 9b15534 to 798894e Compare January 16, 2026 18:46
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