Skip to content

Commit

Permalink
feat(app): add indeterminate tooltip to test result row
Browse files Browse the repository at this point in the history
  • Loading branch information
tamara-slosarek authored and tamslo committed Jan 23, 2025
1 parent 0e8d30c commit e60efb4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/lib/common/widgets/annotation_table.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,20 @@ bool testResultIsUnknown(BuildContext context, String phenotype) =>
TableRowDefinition testResultTableRow(
BuildContext context,
{
required GenotypeResult genotypeResult,
required String key,
required String value,
String? keyTooltip,
String? valueTooltip,
}
) => TableRowDefinition(
key,
value,
keyTooltip: keyTooltip,
valueTooltip: valueTooltip,
valueTooltip: value == indeterminateResult
? context.l10n.indeterminate_result_tooltip(
genotypeResult.geneDisplayString,
)
: null,
italicValue: testResultIsUnknown(context, value),
);

Expand All @@ -133,13 +137,9 @@ TableRowDefinition phenotypeTableRow(
final value = possiblyAdaptedPhenotype(context, genotypeResult, drug: drug);
return testResultTableRow(
context,
genotypeResult: genotypeResult,
key: key,
value: value,
keyTooltip: keyTooltip,
valueTooltip: value == indeterminateResult
? context.l10n.indeterminate_result_tooltip(
genotypeResult.geneDisplayString,
)
: null,
);
}
1 change: 1 addition & 0 deletions app/lib/report/pages/gene.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class GenePage extends HookWidget {
Widget _buildGeneResults(BuildContext context) => buildTable([
testResultTableRow(
context,
genotypeResult: genotypeResult,
key: context.l10n.gene_page_genotype,
value: genotypeResult.variantDisplayString(context),
keyTooltip: context.l10n.gene_page_genotype_tooltip,
Expand Down

0 comments on commit e60efb4

Please sign in to comment.