Skip to content

Conversation

@RaymondLuong3
Copy link
Collaborator

@RaymondLuong3 RaymondLuong3 commented Jan 22, 2026

Previously we relied on the target text info to determine the number of chapters with drafts. However, this is not accurate since the number of chapters is dependent on the translation source. This change updates the formatting options component to use the number of chapters in the translation source in calculating the number of drafted chapters.


This change is Reviewable

@RaymondLuong3 RaymondLuong3 added the will require testing PR should not be merged until testers confirm testing is complete label Jan 22, 2026
@codecov
Copy link

codecov bot commented Jan 22, 2026

Codecov Report

❌ Patch coverage is 90.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.29%. Comparing base (641c5f8) to head (2dd90cd).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...n/draft-usfm-format/draft-usfm-format.component.ts 90.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3649   +/-   ##
=======================================
  Coverage   83.29%   83.29%           
=======================================
  Files         611      611           
  Lines       37646    37646           
  Branches     6182     6180    -2     
=======================================
+ Hits        31358    31359    +1     
+ Misses       5345     5331   -14     
- Partials      943      956   +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@Nateowami Nateowami left a comment

Choose a reason for hiding this comment

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

@Nateowami made 1 comment.
Reviewable status: 0 of 2 files reviewed, all discussions resolved.


src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-usfm-format/draft-usfm-format.component.ts line 269 at r1 (raw file):

      .pipe(quietTakeUntilDestroyed(this.destroyRef))
      .subscribe(async ([source, bookNum]) => {
        if (this.translateSource == null) {

@RaymondLuong3 The failure is saying you could write:

this.translateSource ??= (await this.projectService.getProfile(source.draftingSources[0].projectRef)).data;

@RaymondLuong3 RaymondLuong3 force-pushed the fix/sf-3669-target-chapter-empty branch from 409599d to 2dd90cd Compare January 24, 2026 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

will require testing PR should not be merged until testers confirm testing is complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants