Skip to content

YPE-1297 Source Serif font not applying to Bible text body#148

Merged
cameronapak merged 6 commits intomainfrom
ks/YPE-1297-sourceSerif-not-applying
Feb 16, 2026
Merged

YPE-1297 Source Serif font not applying to Bible text body#148
cameronapak merged 6 commits intomainfrom
ks/YPE-1297-sourceSerif-not-applying

Conversation

@Kyleasmth
Copy link
Collaborator

@Kyleasmth Kyleasmth commented Feb 13, 2026

Fix font selection by replacing bare string font labels with full CSS font-family values using typed constants, and update from the deprecated "Source Serif Pro" to "Source Serif 4" across all components, styles, and tests.

…to use new constants for 'Inter' and 'Source Serif 4'.
@changeset-bot
Copy link

changeset-bot bot commented Feb 13, 2026

🦋 Changeset detected

Latest commit: 45b5dd5

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-react-ui Patch
@youversion/platform-core Patch
@youversion/platform-react-hooks Patch
nextjs 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

@Kyleasmth Kyleasmth marked this pull request as ready for review February 16, 2026 14:50
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 16, 2026

Greptile Summary

Replaced bare string font labels with typed constants and updated from deprecated "Source Serif Pro" to "Source Serif 4" across components, styles, and tests.

Key Changes

  • Added INTER_FONT and SOURCE_SERIF_FONT typed constants in verse-html-utils.ts with a FontFamily type for better type safety
  • Changed default font in BibleReader from 'Inter' to SOURCE_SERIF_FONT (Source Serif 4)
  • Updated Google Fonts import from Source Serif Pro to Source Serif 4
  • Updated localStorage comparisons and tests to use constants instead of bare strings
  • Added explicit font definitions in bible-reader.css

Issues Found

  • bible-widget-view.tsx uses a hardcoded font string instead of the SOURCE_SERIF_FONT constant
  • Story options still use 'Inter' as a bare string instead of INTER_FONT constant

Confidence Score: 4/5

  • This PR is safe to merge with minor style improvements recommended
  • The changes are well-structured and address the core issue of font selection. Type safety improvements are solid. However, there are minor inconsistencies where hardcoded strings are used instead of the newly created constants in bible-widget-view.tsx and bible-reader.stories.tsx. These don't break functionality but reduce the benefit of having typed constants.
  • Pay attention to packages/ui/src/components/bible-widget-view.tsx which should use the SOURCE_SERIF_FONT constant for consistency

Important Files Changed

Filename Overview
packages/ui/src/lib/verse-html-utils.ts Added typed font constants INTER_FONT and SOURCE_SERIF_FONT with FontFamily type to replace bare string font labels
packages/ui/src/components/bible-reader.tsx Updated to use typed font constants throughout, changed default font from 'Inter' to SOURCE_SERIF_FONT
packages/ui/src/components/bible-widget-view.tsx Updated hardcoded font from 'Source Serif Pro' to 'Source Serif 4'
packages/ui/src/styles/global.css Updated Google Fonts import and CSS custom properties from Source Serif Pro to Source Serif 4

Flowchart

flowchart TD
    A[verse-html-utils.ts] -->|Defines| B[INTER_FONT constant]
    A -->|Defines| C[SOURCE_SERIF_FONT constant]
    A -->|Exports| D[FontFamily type]
    
    B -->|Used in| E[bible-reader.tsx]
    C -->|Used in| E
    D -->|Type safety| E
    
    B -->|Used in| F[bible-reader.stories.tsx]
    C -->|Used in| F
    
    C -->|Should use| G[bible-widget-view.tsx]
    D -->|Type safety| H[verse.tsx]
    
    I[global.css] -->|Imports| J[Source Serif 4 font]
    K[bible-reader.css] -->|Defines| L[--font-serif variable]
    J -->|Replaces| M[Source Serif Pro]
    
    E -->|Default font changed| N[Inter → Source Serif 4]
    E -->|Compares against constants| C
    E -->|Sets font via| L
Loading

Last reviewed commit: a2aa1cb

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

7 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

cameronapak
cameronapak previously approved these changes Feb 16, 2026
Copy link
Collaborator

@cameronapak cameronapak left a comment

Choose a reason for hiding this comment

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

@Kyleasmth, this is good. Thank you!

suggestion: Can you add the suggestions from the Greptile AI comments?

Kyleasmth and others added 3 commits February 16, 2026 10:32
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Signed-off-by: Kyleasmth <45497561+Kyleasmth@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Signed-off-by: Kyleasmth <45497561+Kyleasmth@users.noreply.github.com>
This change addresses an issue where the serif font was not displaying
correctly within the Bible reader component.
@cameronapak cameronapak merged commit 0987b6c into main Feb 16, 2026
5 checks passed
@cameronapak cameronapak deleted the ks/YPE-1297-sourceSerif-not-applying branch February 16, 2026 19:35
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