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

Commit

Permalink
Merge pull request #1188 from cocoa-mhlw/feature/survey-page-design
Browse files Browse the repository at this point in the history
接触情報の提供画面のデザイン、文言修正
  • Loading branch information
cocoa-dev003 authored Oct 24, 2022
2 parents b16dcce + 25342e4 commit 88a0d1d
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 81 deletions.
25 changes: 17 additions & 8 deletions Covid19Radar/Covid19Radar/Resources/AppResources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 16 additions & 12 deletions Covid19Radar/Covid19Radar/Resources/AppResources.ja.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1703,6 +1703,22 @@ COCOAのソースコードは次のURLから入手できます。</comment>
<value>(公共交通機関とは、鉄道・電車・乗り合いバスのことです)</value>
<comment>(公共交通機関とは、鉄道・電車・乗り合いバスのことです)</comment>
</data>
<data name="SurveyPageAppStartDateTitle" xml:space="preserve">
<value>アプリ利用開始日の調査</value>
<comment>アプリ利用開始日の調査</comment>
</data>
<data name="SurveyPageAppStartDateDescription" xml:space="preserve">
<value>アプリの利用開始日を添付してよろしいですか。送信を許可する場合はチェックを入れてください。</value>
<comment>アプリの利用開始日を添付してよろしいですか。送信を許可する場合はチェックを入れてください。</comment>
</data>
<data name="SurveyPageAppStartDateText" xml:space="preserve">
<value>あなたのアプリ利用開始日</value>
<comment>あなたのアプリ利用開始日</comment>
</data>
<data name="SurveyPageSwitchText" xml:space="preserve">
<value>送信を許可する</value>
<comment>送信を許可する</comment>
</data>
<data name="SurveyPageExposureDataProvisionTitle" xml:space="preserve">
<value>接触通知発生回数の調査</value>
<comment>接触通知発生回数の調査</comment>
Expand All @@ -1711,18 +1727,6 @@ COCOAのソースコードは次のURLから入手できます。</comment>
<value>2022年4月7日以降の接触通知発生回数(個人情報は含まれません)を添付してよろしいですか。送信を許可する場合はチェックを入れてください。</value>
<comment>2022年4月7日以降の接触通知発生回数(個人情報は含まれません)を添付してよろしいですか。送信を許可する場合はチェックを入れてください。</comment>
</data>
<data name="SurveyPageAppStartDateSwitch" xml:space="preserve">
<value>アプリ利用開始日</value>
<comment>アプリ利用開始日</comment>
</data>
<data name="SurveyPageAppStartDateText" xml:space="preserve">
<value>({0})</value>
<comment>({0})</comment>
</data>
<data name="SurveyPageExposureDataProvisionSwitch" xml:space="preserve">
<value>接触通知発生回数</value>
<comment>接触通知発生回数</comment>
</data>
<data name="SurveyPagePleaseSelect" xml:space="preserve">
<value>選択してください</value>
<comment>選択してください</comment>
Expand Down
24 changes: 14 additions & 10 deletions Covid19Radar/Covid19Radar/Resources/AppResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1805,25 +1805,29 @@ By collecting the number of notifications, we can use it to understand how many
<value></value>
<comment>日本語のみ:(公共交通機関とは、鉄道・電車・乗り合いバスのことです)</comment>
</data>
<data name="SurveyPageExposureDataProvisionTitle" xml:space="preserve">
<data name="SurveyPageAppStartDateTitle" xml:space="preserve">
<value></value>
<comment>日本語のみ:接触通知発生回数の調査</comment>
<comment>日本語のみ:アプリ利用開始日の調査</comment>
</data>
<data name="SurveyPageExposureDataProvisionDescription" xml:space="preserve">
<data name="SurveyPageAppStartDateDescription" xml:space="preserve">
<value></value>
<comment>日本語のみ:2022年4月7日以降の接触通知発生回数(個人情報は含まれません)を添付してよろしいですか。送信を許可する場合はチェックを入れてください。</comment>
<comment>日本語のみ:アプリの利用開始日を添付してよろしいですか。送信を許可する場合はチェックを入れてください。</comment>
</data>
<data name="SurveyPageAppStartDateSwitch" xml:space="preserve">
<data name="SurveyPageAppStartDateText" xml:space="preserve">
<value></value>
<comment>日本語のみ:アプリ利用開始日</comment>
<comment>日本語のみ:あなたのアプリ利用開始日</comment>
</data>
<data name="SurveyPageAppStartDateText" xml:space="preserve">
<data name="SurveyPageSwitchText" xml:space="preserve">
<value></value>
<comment>日本語のみ:({0})</comment>
<comment>日本語のみ:送信を許可する</comment>
</data>
<data name="SurveyPageExposureDataProvisionSwitch" xml:space="preserve">
<data name="SurveyPageExposureDataProvisionTitle" xml:space="preserve">
<value></value>
<comment>日本語のみ:接触通知発生回数の調査</comment>
</data>
<data name="SurveyPageExposureDataProvisionDescription" xml:space="preserve">
<value></value>
<comment>日本語のみ:接触通知発生回数</comment>
<comment>日本語のみ:2022年4月7日以降の接触通知発生回数(個人情報は含まれません)を添付してよろしいですか。送信を許可する場合はチェックを入れてください。</comment>
</data>
<data name="SurveyPagePleaseSelect" xml:space="preserve">
<value></value>
Expand Down
24 changes: 14 additions & 10 deletions Covid19Radar/Covid19Radar/Resources/AppResources.zh-Hans.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1705,25 +1705,29 @@ COCOAのソースコードは次のURLから入手できます。</comment>
<value></value>
<comment>日本語のみ:(公共交通機関とは、鉄道・電車・乗り合いバスのことです)</comment>
</data>
<data name="SurveyPageExposureDataProvisionTitle" xml:space="preserve">
<data name="SurveyPageAppStartDateTitle" xml:space="preserve">
<value></value>
<comment>日本語のみ:接触通知発生回数の調査</comment>
<comment>日本語のみ:アプリ利用開始日の調査</comment>
</data>
<data name="SurveyPageExposureDataProvisionDescription" xml:space="preserve">
<data name="SurveyPageAppStartDateDescription" xml:space="preserve">
<value></value>
<comment>日本語のみ:2022年4月7日以降の接触通知発生回数(個人情報は含まれません)を添付してよろしいですか。送信を許可する場合はチェックを入れてください。</comment>
<comment>日本語のみ:アプリの利用開始日を添付してよろしいですか。送信を許可する場合はチェックを入れてください。</comment>
</data>
<data name="SurveyPageAppStartDateSwitch" xml:space="preserve">
<data name="SurveyPageAppStartDateText" xml:space="preserve">
<value></value>
<comment>日本語のみ:アプリ利用開始日</comment>
<comment>日本語のみ:あなたのアプリ利用開始日</comment>
</data>
<data name="SurveyPageAppStartDateText" xml:space="preserve">
<data name="SurveyPageSwitchText" xml:space="preserve">
<value></value>
<comment>日本語のみ:({0})</comment>
<comment>日本語のみ:送信を許可する</comment>
</data>
<data name="SurveyPageExposureDataProvisionSwitch" xml:space="preserve">
<data name="SurveyPageExposureDataProvisionTitle" xml:space="preserve">
<value></value>
<comment>日本語のみ:接触通知発生回数の調査</comment>
</data>
<data name="SurveyPageExposureDataProvisionDescription" xml:space="preserve">
<value></value>
<comment>日本語のみ:接触通知発生回数</comment>
<comment>日本語のみ:2022年4月7日以降の接触通知発生回数(個人情報は含まれません)を添付してよろしいですか。送信を許可する場合はチェックを入れてください。</comment>
</data>
<data name="SurveyPagePleaseSelect" xml:space="preserve">
<value></value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ public SurveyAnswerPickerItem SelectedItemQ2
set => SetProperty(ref _selectedItemQ2, value);
}

private string _appStartDateText;
public string AppStartDateText
private string _appStartDate;
public string AppStartDate
{
get => _appStartDateText;
set => SetProperty(ref _appStartDateText, value);
get => _appStartDate;
set => SetProperty(ref _appStartDate, value);
}

private bool _isAppStartDate;
Expand Down Expand Up @@ -103,12 +103,7 @@ public override void Initialize(INavigationParameters parameters)
SelectedIndexQ1 = 0;
SelectedIndexQ2 = 0;

DateTime startDate = _userDataRepository.GetStartDate();

AppStartDateText = string.Format(
AppResources.SurveyPageAppStartDateText,
startDate.ToLocalTime().ToString("yyyy年MM月dd日")
);
AppStartDate = _userDataRepository.GetStartDate().ToString("d");

IsAppStartDate = false;
IsExposureDataProvision = false;
Expand Down
76 changes: 49 additions & 27 deletions Covid19Radar/Covid19Radar/Views/EndOfService/SurveyPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,52 +84,74 @@
<Label
AutomationProperties.IsInAccessibleTree="True"
Style="{StaticResource DefaultLabelBold}"
Text="{x:Static resources:AppResources.SurveyPageExposureDataProvisionTitle}" />
Text="{x:Static resources:AppResources.SurveyPageAppStartDateTitle}" />
<Label
AutomationProperties.IsInAccessibleTree="True"
Style="{StaticResource DefaultLabel}"
Text="{x:Static resources:AppResources.SurveyPageExposureDataProvisionDescription}" />
</StackLayout>
<StackLayout
Orientation="Horizontal"
Spacing="5">
<StackLayout>
Text="{x:Static resources:AppResources.SurveyPageAppStartDateDescription}" />
<Frame
HasShadow="False"
Padding="10"
CornerRadius="10"
Margin="0, 5"
BackgroundColor="#EEEEEE">
<StackLayout>
<Label
AutomationProperties.IsInAccessibleTree="True"
Style="{StaticResource DefaultLabel}"
Text="{x:Static resources:AppResources.SurveyPageAppStartDateText}"
HorizontalOptions="Center" />
<Label
AutomationProperties.IsInAccessibleTree="True"
Style="{StaticResource DefaultLabelBold}"
Text="{Binding AppStartDate}"
HorizontalOptions="Center" />
</StackLayout>
</Frame>
<StackLayout
Orientation="Horizontal"
Spacing="5">
<Label
AutomationProperties.IsInAccessibleTree="True"
Style="{StaticResource DefaultLabelBold}"
Text="{x:Static resources:AppResources.SurveyPageAppStartDateSwitch}"
Text="{x:Static resources:AppResources.SurveyPageSwitchText}"
HorizontalOptions="StartAndExpand"
HorizontalTextAlignment="Start"
VerticalOptions="Center" />
<Label
<Switch
AutomationProperties.IsInAccessibleTree="True"
Style="{StaticResource DefaultLabelBold}"
Text="{Binding AppStartDateText}"
HorizontalOptions="StartAndExpand"
HorizontalTextAlignment="Start"
IsToggled="{Binding IsAppStartDate}"
HorizontalOptions="EndAndExpand"
VerticalOptions="Center" />
</StackLayout>
<Switch
AutomationProperties.IsInAccessibleTree="True"
IsToggled="{Binding IsAppStartDate}"
HorizontalOptions="EndAndExpand"
VerticalOptions="Center" />
</StackLayout>
<StackLayout
Orientation="Horizontal"
Spacing="5">
<Label
AutomationProperties.IsInAccessibleTree="True"
Style="{StaticResource DefaultLabelBold}"
Text="{x:Static resources:AppResources.SurveyPageExposureDataProvisionSwitch}"
HorizontalOptions="StartAndExpand"
HorizontalTextAlignment="Start"
VerticalOptions="Center" />
<Switch
Text="{x:Static resources:AppResources.SurveyPageExposureDataProvisionTitle}" />
<Label
AutomationProperties.IsInAccessibleTree="True"
IsToggled="{Binding IsExposureDataProvision}"
HorizontalOptions="End"
VerticalOptions="Center" />
Style="{StaticResource DefaultLabel}"
Text="{x:Static resources:AppResources.SurveyPageExposureDataProvisionDescription}" />
<StackLayout
Orientation="Horizontal"
Spacing="5"
Margin="0, 5, 0, 0">
<Label
AutomationProperties.IsInAccessibleTree="True"
Style="{StaticResource DefaultLabelBold}"
Text="{x:Static resources:AppResources.SurveyPageSwitchText}"
HorizontalOptions="StartAndExpand"
HorizontalTextAlignment="Start"
VerticalOptions="Center" />
<Switch
AutomationProperties.IsInAccessibleTree="True"
IsToggled="{Binding IsExposureDataProvision}"
HorizontalOptions="End"
VerticalOptions="Center" />
</StackLayout>
</StackLayout>
<Label
AutomationProperties.IsInAccessibleTree="True"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ public void InitializeTests()

Assert.Equal(0, unitUnderTest.SelectedIndexQ1);
Assert.Equal(0, unitUnderTest.SelectedIndexQ2);
Assert.Equal(string.Format(AppResources.SurveyPageAppStartDateText, testNow.ToLocalTime().ToString("yyyy年MM月dd日")),
unitUnderTest.AppStartDateText);
Assert.Equal(testNow.ToString("d"), unitUnderTest.AppStartDate);
}


Expand All @@ -92,8 +91,8 @@ public void InitializeTests_StartDateDefault(

if (MockTimeZoneInfo.IsJst())
{
var expectedText = string.Format("{0}{1}{2}", expectedYear, expectedMonth, expectedDay);
Assert.Equal(expectedText, unitUnderTest.AppStartDateText);
var expectedText = string.Format("{0}/{1}/{2}", expectedYear, expectedMonth, expectedDay);
Assert.Equal(expectedText, unitUnderTest.AppStartDate);
}
}

Expand Down

0 comments on commit 88a0d1d

Please sign in to comment.