-
Notifications
You must be signed in to change notification settings - Fork 0
[QA] 날짜 피커, 날짜 형식 수정 #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
3ec33b9
a8a234a
d738d69
87a8362
5161833
f77c72c
479bcc9
028dde5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,6 +56,7 @@ import com.alarmy.near.presentation.ui.component.textfield.NearLimitedTextField | |
| import com.alarmy.near.presentation.ui.component.textfield.NearTextField | ||
| import com.alarmy.near.presentation.ui.extension.onNoRippleClick | ||
| import com.alarmy.near.presentation.ui.theme.NearTheme | ||
| import com.alarmy.near.utils.extensions.DateExtension | ||
| import kotlinx.coroutines.launch | ||
|
|
||
| @Composable | ||
|
|
@@ -333,12 +334,7 @@ fun FriendProfileEditorScreen( | |
| horizontalArrangement = Arrangement.SpaceBetween, | ||
| ) { | ||
| Text( | ||
| text = | ||
| stringResource(friendProfileEditorUIState.contactFrequency.reminderInterval.labelRes) + | ||
| stringResource( | ||
| R.string.friend_profile_editor_contact_period_format, | ||
| stringResource(friendProfileEditorUIState.contactFrequency.dayOfWeek.resId), | ||
| ), | ||
| text = buildContactFrequencyText(friendProfileEditorUIState.contactFrequency), | ||
| style = NearTheme.typography.B2_14_MEDIUM, | ||
| color = NearTheme.colors.BLACK_1A1A1A, | ||
| ) | ||
|
|
@@ -613,3 +609,29 @@ fun FriendProfileEditorScreenPreview() { | |
| ) | ||
| } | ||
| } | ||
|
|
||
| @Composable | ||
| private fun buildContactFrequencyText(contactFrequency: ContactFrequency): String { | ||
| val intervalText = stringResource(contactFrequency.reminderInterval.labelRes) | ||
| val suffix = | ||
| when (contactFrequency.reminderInterval) { | ||
| ReminderInterval.EVERY_WEEK, | ||
| ReminderInterval.EVERY_TWO_WEEK -> DateExtension.getTodayDayOfWeekInKorean() | ||
| ReminderInterval.EVERY_MONTH, | ||
| ReminderInterval.EVERY_SIX_MONTH -> | ||
| stringResource( | ||
| R.string.friend_profile_editor_contact_period_day_of_month, | ||
| DateExtension.getTodayDayOfMonth(), | ||
| ) | ||
| else -> null | ||
| } | ||
| if (suffix == null) { | ||
| return intervalText | ||
| } | ||
| return intervalText + | ||
| " " + | ||
| stringResource( | ||
| R.string.friend_profile_editor_contact_period_format, | ||
| suffix, | ||
| ) | ||
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,9 @@ import androidx.compose.runtime.Composable | |
| import androidx.compose.runtime.CompositionLocalProvider | ||
| import androidx.compose.runtime.SideEffect | ||
| import androidx.compose.runtime.staticCompositionLocalOf | ||
| import androidx.compose.ui.platform.LocalDensity | ||
| import androidx.compose.ui.platform.LocalView | ||
| import androidx.compose.ui.unit.Density | ||
| import androidx.core.view.WindowCompat | ||
|
|
||
| val LocalCustomColors = | ||
|
|
@@ -29,7 +31,14 @@ fun NearTheme( | |
| darkTheme -> lightColor // TODO DarkTheme 추가시 수정 | ||
| else -> lightColor | ||
| } | ||
| val currentDensity = LocalDensity.current | ||
| val themeDensity = | ||
| Density( | ||
| density = currentDensity.density, | ||
| fontScale = 1f, | ||
| ) | ||
|
Comment on lines
+41
to
+46
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이 코드는 시스템 폰트 사이즈를 고정시키는 것이 맞을까요? 현재로서는 좋아보입니다! TODO로 접근성 관련 수정을 기록해주시면 향후 대응에 좋아보여요!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 기념일 수정 부분(FriendProfileEditorScreen)에서 다른 방법으로는 텍스트필드를 고정값으로 해야 될 것 같아 이 부분은 다른 분들과 논의해보면 좋을 것 같습니다! |
||
| CompositionLocalProvider( | ||
| LocalDensity provides themeDensity, | ||
| LocalCustomColors provides colorScheme, | ||
| LocalCustomTypography provides Typography, | ||
| content = content, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
주간/격주 반복 설정 시, 설정된 요일(
contactFrequency.dayOfWeek) 대신 현재 요일을 표시하고 있어 의도와 다르게 동작할 수 있습니다. 예를 들어, '매주 수요일'로 설정했더라도 목요일에 보면 '매주 목요일'로 표시됩니다.contactFrequency.dayOfWeek를 사용하여 설정된 요일을 표시하도록 수정해야 합니다.또한, 월간/반년 주기 설정 시 현재 날짜의 '일'을 가져와 사용하고 있는데, 이 또한 주간 주기 문제와 마찬가지로 조회하는 날짜에 따라 표시가 달라지는 문제가 있습니다. 이 설정값은
ContactFrequency모델에 저장되고 사용되어야 할 것으로 보입니다.