Skip to content

Commit

Permalink
feat(app): add Indeterminate tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
tamslo committed Jan 23, 2025
1 parent a1d9737 commit 0e8d30c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/lib/common/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ enum SpecialLookup {
noResult,
}

const indeterminateResult = 'Indeterminate';
List<String> unknownPhenotypes(BuildContext context) => [
'Indeterminate',
indeterminateResult,
context.l10n.general_not_tested,
];

Expand Down
10 changes: 9 additions & 1 deletion app/lib/common/widgets/annotation_table.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,13 @@ TableRowDefinition testResultTableRow(
required String key,
required String value,
String? keyTooltip,
String? valueTooltip,
}
) => TableRowDefinition(
key,
value,
keyTooltip: keyTooltip,
valueTooltip: valueTooltip,
italicValue: testResultIsUnknown(context, value),
);

Expand All @@ -128,10 +130,16 @@ TableRowDefinition phenotypeTableRow(
String? keyTooltip,
}
) {
final value = possiblyAdaptedPhenotype(context, genotypeResult, drug: drug);
return testResultTableRow(
context,
key: key,
value: possiblyAdaptedPhenotype(context, genotypeResult, drug: drug),
value: value,
keyTooltip: keyTooltip,
valueTooltip: value == indeterminateResult
? context.l10n.indeterminate_result_tooltip(
genotypeResult.geneDisplayString,
)
: null,
);
}
10 changes: 10 additions & 0 deletions app/lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@
"general_not_tested": "Not tested",
"@general_not_tested": {},

"indeterminate_result_tooltip": "This means that your gene test did not provide a meaningful outcome for {geneName}. This happens when the impact of your gene result on medications is uncertain.",
"@indeterminate_result_tooltip": {
"placeholders": {
"geneName": {
"type": "String",
"example": "CYP2C19"
}
}
},

"warning_level_green": "Standard precautions",
"@warning_level_green": {},
"warning_level_missing": "Standard precautions (incomplete data)",
Expand Down

0 comments on commit 0e8d30c

Please sign in to comment.