Skip to content

fix(ui): fall back to promotional Bible attribution - #436

Merged
cameronapak merged 4 commits into
mainfrom
ype-6084-bible-card-attribution
Oct 7, 2026
Merged

cameronapak merged 4 commits into
mainfrom
ype-6084-bible-card-attribution

Conversation

@cameronapak

@cameronapak cameronapak commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Use one attribution selector for BibleCard and BibleReader.
  • Prefer nonblank copyright, then fall back to nonblank promotional content.
  • Render attribution as text and preserve existing missing-attribution behavior.
BibleCard promotional attribution fallback

Why

BibleCard and BibleReader could omit available attribution for versions without copyright text.

Impact

Consumers now see available attribution for the selected Bible version in both UI components.

Verification

  • UI unit suite: 520 tests passed
  • Focused BibleCard and BibleReader suite: 54 tests passed
  • UI typecheck, lint, and build passed

Amp thread: https://ampcode.com/threads/T-01a11267-f18f-7245-9247-87604d8328ae

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no blocking issues remain.

What we checked:

  • Missing attribution still fails: The helper returns null, but getPassageDisplay checks that result and throws MissingPassageAttributionError before returning.
  • Attribution stays plain text: Both components place attribution inside React text expressions, so markup in the attribution is shown as text.

Summary

BibleCard and BibleReader now share the core attribution selector. They prefer nonblank copyright, then fall back to promotional content.

  • Attribution remains plain text.
  • getPassageDisplay still rejects missing attribution.
  • The previous unnumbered test-layout finding is fixed: the added card tests are now top-level.
  • No new actionable issues were found. Tests and builds were not run during this review.

Reviews (3) · Last reviewed commit: "feat(core): share passage attribution se..." · Reviewed by Greptile

@changeset-bot

changeset-bot Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2c2db21

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@youversion/platform-core Minor
@youversion/platform-react-ui Minor
@youversion/platform-react-hooks Minor
vite-react Patch

Not sure what this means? Click here to learn what changesets are.

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

Comment thread packages/ui/src/components/bible-card.test.tsx Outdated
@cameronapak cameronapak changed the title [YPE-6084] Fall back to promotional Bible attribution fix(ui): fall back to promotional Bible attribution Oct 6, 2026

@bmanquen bmanquen left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review against YPE-6084. The BibleCard fallback is correct and matches core's precedence. One thing need to change before merge; both are marked (blocking) inline.

  1. The new UI helper copies getPassageAttribution from core instead of reusing it.

Comment thread packages/ui/src/lib/bible-version-attribution.ts Outdated
Comment thread packages/ui/src/components/bible-card.test.tsx
@cameronapak
cameronapak merged commit da12b12 into main Oct 7, 2026
25 of 26 checks passed
@cameronapak
cameronapak deleted the ype-6084-bible-card-attribution branch October 7, 2026 16: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.

4 participants