Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Filter exposure under 15 minutes #771

Conversation

keiji
Copy link
Collaborator

@keiji keiji commented Jan 18, 2022

Issue 番号 / Issue ID

目的 / Purpose

  • スコアが規定値を超え、かつ接触時間が規定値を超えなかったときの表示の整備

破壊的変更をもたらしますか / Does this introduce a breaking change?

[x] Yes
[ ] No

Pull Request の種類 / Pull Request type

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

検証方法 / How to test

コードの入手 / Get the code

git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
dotnet restore

コードの検証 / Test the code


確認事項 / What to check

Screen Shot 2022-01-19 at 1 40 36

その他 / Other information

@keiji keiji added design デザイン関連の Issue COCOA2 labels Jan 18, 2022
@keiji keiji self-assigned this Jan 18, 2022
Comment on lines +277 to +290
public class ExposureCheckScoreModel
{
public long DateMillisSinceEpoch { get; set; }

public string DateTimeString => DateTimeOffset.UnixEpoch
.AddMilliseconds(DateMillisSinceEpoch).UtcDateTime
.ToLocalTime().ToString("D", CultureInfo.CurrentCulture);

public bool IsScoreVisible { get; set; }

public bool IsDurationTimeVisible { get; set; }

public string Description { get; set; }
}
Copy link
Collaborator Author

@keiji keiji Jan 18, 2022

Choose a reason for hiding this comment

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

これぼくが指摘して、別ファイルに分けてもらいましたが、他では使わなかったですね……(ENv1からこの画面に繋がらない)。

考えが及ばず、お手数をおかけしました。

@@ -47,39 +53,110 @@ public void LowRiskPage_Initialize_Display()
{
mockExposureDataRepository
.Setup(x => x.GetDailySummariesAsync(AppConstants.DaysOfExposureInformationToDisplay))
.Returns(Task.FromResult(new List<DailySummary>()
.ReturnsAsync(new List<DailySummary>()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ReturnsAsync を使うとTaskにくるまなくても良くなります!

@@ -31,15 +31,23 @@ public class ExposureDataRepositoryMock : IExposureDataRepository
DateMillisSinceEpoch = DateTime.SpecifyKind(new DateTime(2022, 1, 10), DateTimeKind.Utc).ToUnixEpoch() * 1000,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

このファイルの変更はMockなのであまり気にしないでください。

Comment on lines 407 to 422
<data name="LowRiskContactPage_DailySummary_ScoreSum_Descritpion_Satisfied" xml:space="preserve">
<value>Score: {0:#.##} (Threshold: {2:#} {1:#.##})</value>
<comment>スコア: {0:#.##}(基準値: {1:#.##}{2:#})</comment>
</data>
<data name="LowRiskContactPage_DailySummary_ScoreSum_Descritpion_Unsatisfied" xml:space="preserve">
<value>Score: {0:#.##} (Threshold: {2:#} {1:#.##})</value>
<comment>スコア: {0:#.##}(基準値: {1:#.##}{2:#})のため通知の対象外</comment>
</data>
<data name="LowRiskContactPage_ExposureDuration_Description_Satisfied" xml:space="preserve">
<value>{0:#} min exposure (Threshold {2:#} {1:#} min)</value>
<comment>{0:#}分間の接触(基準値: {1:#}分間{2:#})</comment>
</data>
<data name="LowRiskContactPage_ExposureDuration_Description_Unsatisfied" xml:space="preserve">
<value>{0:#} min exposure (Threshold {2:#} {1:#} min)</value>
<comment>{0:#}分間の接触(基準値: {1:#}分間{2:#})のため通知の対象外</comment>
</data>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

英語には反映できてません(翻訳の方にお願いしたい)

_loggerService.Info("_exposureRiskCalculationConfiguration.DailySummary_DaySummary_ScoreSum.Op = NOP");
return;
}

LowRiskContactPageHeaderTextSuffix
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

これ消しましたが、レイアウト上には残っていて使える状態にしてあります。
もしかしたら何か表示してと言われるかもしれないから残してあります。

@keiji keiji marked this pull request as ready for review January 18, 2022 16:49
AppResources.LowRiskContactPage_ExposureDuration_Description_Unsatisfied,
exposureDurationInMinute,
exposureDurationThresholdInMinute,
OperatorToString(_exposureRiskCalculationConfiguration.DailySummary_DaySummary_ScoreSum.Op)
Copy link
Collaborator

Choose a reason for hiding this comment

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

ここって_exposureRiskCalculationConfiguration.DailySummary_DaySummary_ScoreSum.Op であってますか?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

あ、下2行要らないですね。

LowRiskContactPage_ExposureDuration_Description_Unsatisfiedの内容は{0:#}分間の接触のため通知の対象外なので、一つ目の値だけ有ればいいです(後は無視されるのでビルド通って動きにも問題がない)

@kazuhiro4949
Copy link
Collaborator

開発チームからリクエストがあったため、中国語リソースにも仮のデータの用意お願いします。

@keiji
Copy link
Collaborator Author

keiji commented Jan 19, 2022

開発チームからリクエストがあったため、中国語リソースにも仮のデータの用意お願いします。

リソースについては #779 で対応します!

@kazuhiro4949 kazuhiro4949 merged commit 699c637 into cocoa-mhlw:develop Jan 19, 2022
@keiji keiji deleted the cocoa2/filter_exposure_under_15minutes_plan1 branch January 19, 2022 12:03
@keiji keiji moved this from In review to Done in COCOA2 Jan 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
design デザイン関連の Issue
Projects
No open projects
COCOA2
  
Done
Development

Successfully merging this pull request may close these issues.

リスクスコアが15分未満の接触で閾値を越えたときの対応が考慮されていない
2 participants