Skip to content

Commit

Permalink
SF-3042 Show no-book message for source
Browse files Browse the repository at this point in the history
When viewing a tab with the source text, while navigated to a text
location that is not in the source, it was showing "Loading...".

This re-works how and when we decide on placeholder messages, with the
result that the source text will say "book not found" rather than
"Loading..." in the situation above.

The TextComponent Input placeholder is now being used to allow
overriding the message shown when there is no content to show.
  • Loading branch information
marksvc committed Nov 4, 2024
1 parent e75b87f commit 58bd513
Show file tree
Hide file tree
Showing 5 changed files with 395 additions and 75 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { AfterViewInit, Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
import { translate } from '@ngneat/transloco';
import { VerseRef } from '@sillsdev/scripture';
import { IOutputAreaSizes } from 'angular-split';
import clone from 'lodash-es/clone';
import { fromEvent, Observable, Subscription } from 'rxjs';
import { Observable, Subscription, fromEvent } from 'rxjs';
import { FontService } from 'xforge-common/font.service';
import { SubscriptionDisposable } from 'xforge-common/subscription-disposable';
import { SFProjectProfileDoc } from '../../../core/models/sf-project-profile-doc';
Expand Down Expand Up @@ -46,8 +45,8 @@ export class CheckingTextComponent extends SubscriptionDisposable implements Aft
this._placeholder = value;
}

get placeholder(): string {
return this._placeholder || translate('text.loading');
get placeholder(): string | undefined {
return this._placeholder;
}

@Input() set activeVerse(verseRef: VerseRef | undefined) {
Expand Down
Loading

0 comments on commit 58bd513

Please sign in to comment.