From 4ed09d99b1b7e7c3a89c51ae836819aa405a78bf Mon Sep 17 00:00:00 2001 From: tgyuu-An Date: Sun, 18 Feb 2024 15:21:37 +0900 Subject: [PATCH 1/4] [ADD] #129 : return vector --- core/designresource/src/main/res/drawable/ic_return.xml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 core/designresource/src/main/res/drawable/ic_return.xml diff --git a/core/designresource/src/main/res/drawable/ic_return.xml b/core/designresource/src/main/res/drawable/ic_return.xml new file mode 100644 index 00000000..6ff659c1 --- /dev/null +++ b/core/designresource/src/main/res/drawable/ic_return.xml @@ -0,0 +1,9 @@ + + + From 2827d61c7828dd37f51acba9c2ff216fc49383e6 Mon Sep 17 00:00:00 2001 From: tgyuu-An Date: Sun, 18 Feb 2024 15:33:45 +0900 Subject: [PATCH 2/4] =?UTF-8?q?[FEATURE]=20#129=20:=20=EB=8B=AC=EB=A0=A5?= =?UTF-8?q?=20=EC=98=A4=EB=8A=98=20=EB=82=A0=EB=A1=9C=20=EB=B0=94=EB=A1=9C?= =?UTF-8?q?=20=EA=B0=80=EB=8A=94=20=EB=B2=84=ED=8A=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wapp/feature/notice/BottomSheetContent.kt | 4 +-- .../com/wap/wapp/feature/notice/Calendar.kt | 28 +++++++++++++++---- .../notice/src/main/res/values/strings.xml | 13 +++++---- 3 files changed, 32 insertions(+), 13 deletions(-) diff --git a/feature/notice/src/main/java/com/wap/wapp/feature/notice/BottomSheetContent.kt b/feature/notice/src/main/java/com/wap/wapp/feature/notice/BottomSheetContent.kt index 026b044b..64bdc148 100644 --- a/feature/notice/src/main/java/com/wap/wapp/feature/notice/BottomSheetContent.kt +++ b/feature/notice/src/main/java/com/wap/wapp/feature/notice/BottomSheetContent.kt @@ -118,11 +118,11 @@ private fun EventsList( ) { Image( painter = painterResource(id = R.drawable.ic_cat), - contentDescription = stringResource(id = R.string.bottomSheetCatContentDescription), + contentDescription = stringResource(id = R.string.cat_content_description), ) Text( - text = stringResource(id = R.string.bottomSheetNoEvent), + text = stringResource(id = R.string.bottomSheet_no_event), style = WappTheme.typography.titleMedium, color = WappTheme.colors.white, textAlign = TextAlign.Center, diff --git a/feature/notice/src/main/java/com/wap/wapp/feature/notice/Calendar.kt b/feature/notice/src/main/java/com/wap/wapp/feature/notice/Calendar.kt index d4b3e894..99b9d129 100644 --- a/feature/notice/src/main/java/com/wap/wapp/feature/notice/Calendar.kt +++ b/feature/notice/src/main/java/com/wap/wapp/feature/notice/Calendar.kt @@ -35,7 +35,9 @@ import com.wap.wapp.core.commmon.util.DateUtil.DAYS_IN_WEEK import com.wap.wapp.core.commmon.util.DateUtil.DaysOfWeek import com.wap.wapp.core.commmon.util.DateUtil.YEAR_MONTH_END_INDEX import com.wap.wapp.core.commmon.util.DateUtil.YEAR_MONTH_START_INDEX +import com.wap.wapp.core.commmon.util.DateUtil.generateNowDate import com.wap.wapp.core.commmon.util.DateUtil.yyyyMMddFormatter +import com.wap.wapp.core.designresource.R.drawable import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch import java.time.DayOfWeek @@ -104,7 +106,7 @@ private fun CalendarHeader( Image( painter = painterResource(id = R.drawable.ic_threelines), contentDescription = - stringResource(R.string.calendarToggleImageContextDescription), + stringResource(R.string.calendar_content_description), modifier = Modifier .align(Alignment.CenterStart) .clickable { @@ -121,8 +123,8 @@ private fun CalendarHeader( modifier = Modifier.align(Alignment.Center), ) { Image( - painter = painterResource(id = com.wap.wapp.core.designresource.R.drawable.ic_back), - contentDescription = stringResource(id = R.string.backMonthArrowContentDescription), + painter = painterResource(id = drawable.ic_back), + contentDescription = stringResource(id = R.string.back_month_arrow_content_description), modifier = Modifier .padding(end = 20.dp) .clickable { @@ -141,8 +143,9 @@ private fun CalendarHeader( ) Image( - painter = painterResource(id = com.wap.wapp.core.designresource.R.drawable.ic_forward), - contentDescription = stringResource(id = R.string.forwardMonthArrowContentDescription), + painter = painterResource(id = drawable.ic_forward), + contentDescription = + stringResource(id = R.string.forward_month_arrow_content_description), modifier = Modifier .padding(start = 20.dp) .clickable { @@ -151,6 +154,21 @@ private fun CalendarHeader( }, ) } + + if (selectedDate != generateNowDate()) { + Image( + painter = painterResource(id = drawable.ic_return), + contentDescription = + stringResource(R.string.return_today_content_description), + modifier = Modifier + .align(Alignment.CenterEnd) + .clickable { + onDateSelected(generateNowDate()) + onCalendarMonthChanged() + } + .padding(end = 16.dp), + ) + } } @Composable diff --git a/feature/notice/src/main/res/values/strings.xml b/feature/notice/src/main/res/values/strings.xml index f978b7ac..9240c522 100644 --- a/feature/notice/src/main/res/values/strings.xml +++ b/feature/notice/src/main/res/values/strings.xml @@ -1,8 +1,9 @@ - 공지사항 목록만을 보여주거나, 캘린더를 다시 보여줍니다. - 공지사항을 보여주는 달력입니다. - 일정이 없을 때 보여주는 작고 귀여운 고양이 입니다. - 일정이 없습니다. - "이전 달을 보여주는 화살표 입니다." - "다음 달을 보여주는 화살표 입니다." + 공지사항 목록만을 보여주거나, 캘린더를 다시 보여줍니다. + 공지사항을 보여주는 달력입니다. + 일정이 없을 때 보여주는 작고 귀여운 고양이 입니다. + 일정이 없습니다. + "이전 달을 보여주는 버튼 입니다." + "다음 달을 보여주는 버튼 입니다." + 오늘 날짜로 이동하는 버튼 입니다. From 5e9ffce46073e92478b0ba8c1dce87f12c73471d Mon Sep 17 00:00:00 2001 From: tgyuu-An Date: Sun, 18 Feb 2024 15:44:07 +0900 Subject: [PATCH 3/4] =?UTF-8?q?[FEATURE]=20#129=20:=20=EC=98=A4=EB=8A=98?= =?UTF-8?q?=20=EB=82=A0=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=95=A0=EB=8B=88?= =?UTF-8?q?=EB=A9=94=EC=9D=B4=EC=85=98=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/wap/wapp/feature/notice/Calendar.kt | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/feature/notice/src/main/java/com/wap/wapp/feature/notice/Calendar.kt b/feature/notice/src/main/java/com/wap/wapp/feature/notice/Calendar.kt index 99b9d129..abf870e9 100644 --- a/feature/notice/src/main/java/com/wap/wapp/feature/notice/Calendar.kt +++ b/feature/notice/src/main/java/com/wap/wapp/feature/notice/Calendar.kt @@ -1,5 +1,8 @@ package com.wap.wapp.feature.notice +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.clickable @@ -155,18 +158,22 @@ private fun CalendarHeader( ) } - if (selectedDate != generateNowDate()) { + AnimatedVisibility( + visible = selectedDate != generateNowDate(), + enter = fadeIn(), + exit = fadeOut(), + modifier = Modifier + .align(Alignment.CenterEnd) + .padding(end = 16.dp), + ) { Image( painter = painterResource(id = drawable.ic_return), contentDescription = stringResource(R.string.return_today_content_description), - modifier = Modifier - .align(Alignment.CenterEnd) - .clickable { - onDateSelected(generateNowDate()) - onCalendarMonthChanged() - } - .padding(end = 16.dp), + modifier = Modifier.clickable { + onDateSelected(generateNowDate()) + onCalendarMonthChanged() + }, ) } } From cfd6939129716993c5f88e372988b2eea3d0b597 Mon Sep 17 00:00:00 2001 From: tgyuu-An Date: Sun, 18 Feb 2024 15:51:38 +0900 Subject: [PATCH 4/4] =?UTF-8?q?[CHORE]=20#129=20:=20=EB=B0=94=ED=85=80=20?= =?UTF-8?q?=EC=8B=9C=ED=8A=B8=20=EB=A7=88=EC=A7=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/wap/wapp/feature/notice/BottomSheetContent.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/feature/notice/src/main/java/com/wap/wapp/feature/notice/BottomSheetContent.kt b/feature/notice/src/main/java/com/wap/wapp/feature/notice/BottomSheetContent.kt index 64bdc148..b2080d04 100644 --- a/feature/notice/src/main/java/com/wap/wapp/feature/notice/BottomSheetContent.kt +++ b/feature/notice/src/main/java/com/wap/wapp/feature/notice/BottomSheetContent.kt @@ -97,7 +97,9 @@ private fun EventsList( LazyColumn( contentPadding = PaddingValues(horizontal = 15.dp), verticalArrangement = Arrangement.spacedBy(12.dp), - modifier = Modifier.fillMaxWidth(), + modifier = Modifier + .fillMaxWidth() + .padding(top = 12.dp), ) { items( items = events,