Skip to content

Commit

Permalink
Merge pull request #213 from School-of-Company/refactor/212-modify-de…
Browse files Browse the repository at this point in the history
…sign-changed

🔀 :: (#212) - 디자인이 변경된 부분이 존재하여 이를 반영하였습니다.
  • Loading branch information
audgns10 authored Nov 23, 2024
2 parents a39f454 + 9359629 commit cb48dcd
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ fun ExpoMainLogo(modifier: Modifier = Modifier) {
}

@Composable
fun DownIcon(modifier: Modifier = Modifier) {
fun DownArrowIcon(
modifier: Modifier = Modifier,
tint: Color = Color.Unspecified
) {
Icon(
painter = painterResource(id = R.drawable.ic_down_arrow),
painter = painterResource(id = R.drawable.ic_downarrowicon),
contentDescription = stringResource(id = R.string.down_arrow_description),
modifier = modifier
modifier = modifier,
tint = tint
)
}

Expand Down
9 changes: 9 additions & 0 deletions core/design-system/src/main/res/drawable/ic_downarrowicon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M20.031,9.531L12.531,17.031C12.461,17.1 12.378,17.156 12.287,17.193C12.196,17.231 12.099,17.251 12,17.251C11.901,17.251 11.804,17.231 11.713,17.193C11.622,17.156 11.539,17.1 11.469,17.031L3.969,9.531C3.829,9.39 3.75,9.199 3.75,9C3.75,8.801 3.829,8.61 3.969,8.469C4.11,8.329 4.301,8.25 4.5,8.25C4.699,8.25 4.89,8.329 5.031,8.469L12,15.44L18.969,8.469C19.039,8.4 19.122,8.344 19.213,8.307C19.304,8.269 19.402,8.25 19.5,8.25C19.599,8.25 19.696,8.269 19.787,8.307C19.878,8.344 19.961,8.4 20.031,8.469C20.1,8.539 20.156,8.622 20.193,8.713C20.231,8.804 20.25,8.901 20.25,9C20.25,9.099 20.231,9.196 20.193,9.287C20.156,9.378 20.1,9.461 20.031,9.531Z"
android:fillColor="#ffffff"/>
</vector>
2 changes: 2 additions & 0 deletions core/design-system/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,6 @@
<string name="slash">/</string>

<string name="string_type">%s</string>

<string name="image_size_error">이미지 크기는 328 × 178이어야 합니다.</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ internal fun ExpoCreateRoute(
if (options.outWidth == 328 && options.outHeight == 178) {
selectedImageUri = uri
} else {
makeToast(context, "이미지 크기는 328 × 178이어야 합니다.")
onErrorToast(null, R.string.image_size_error)
}
}
}
Expand Down Expand Up @@ -352,7 +352,7 @@ internal fun ExpoCreateScreen(
)

Text(
text = "시작일과 마감일 입력시 ‘ yyyy.mm.dd ‘ 형식으로 입력해주세요.",
text = "시작일과 마감일 입력시 ‘ yyyy-mm-dd ‘ 형식으로 입력해주세요.",
style = typography.captionRegular2,
color = colors.gray300
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.school_of_company.expo.view

import android.util.Log
import androidx.compose.foundation.Image
import androidx.compose.foundation.ScrollState
import androidx.compose.foundation.background
Expand Down Expand Up @@ -49,7 +48,6 @@ import com.school_of_company.expo.view.component.HomeKakaoMap
import com.school_of_company.expo.view.component.QrCode
import com.school_of_company.expo.viewmodel.ExpoViewModel
import com.school_of_company.expo.viewmodel.uistate.GetExpoInformationUiState
import com.school_of_company.expo.viewmodel.uistate.GetExpoListUiState
import com.school_of_company.ui.util.formatServerDate

@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.verticalScroll
Expand Down Expand Up @@ -77,6 +76,8 @@ internal fun ExpoScreen(
getExpoList: () -> Unit,
navigationToDetail: (Long) -> Unit
) {
var filterButtonText by rememberSaveable { mutableStateOf("최신순") }

val (openBottomSheet, isOpenBottomSheet) = rememberSaveable { mutableStateOf(false) }
var arrayList by rememberSaveable { mutableStateOf(ArrayHomeListEnum.RECENT) }

Expand Down Expand Up @@ -120,9 +121,11 @@ internal fun ExpoScreen(
color = colors.black
)

HomeFilterButton { isOpenBottomSheet(true) }
HomeFilterButton(text = filterButtonText) { isOpenBottomSheet(true) }
}

Spacer(modifier = Modifier.padding(bottom = 24.dp))

SwipeRefresh(
state = swipeRefreshState,
onRefresh = { getExpoList() },
Expand Down Expand Up @@ -209,10 +212,12 @@ internal fun ExpoScreen(
HomeBottomSheet(
onRecentClick = {
arrayList = ArrayHomeListEnum.RECENT
filterButtonText = "최신순"
isOpenBottomSheet(false)
},
onOldClick = {
arrayList = ArrayHomeListEnum.OLDER
filterButtonText = "오래된 순"
isOpenBottomSheet(false)
},
onCancelClick = { isOpenBottomSheet(false) }
Expand All @@ -228,6 +233,6 @@ private fun HomeScreenPreview() {
navigationToDetail = {},
swipeRefreshState = rememberSwipeRefreshState(isRefreshing = false),
getExpoListData = GetExpoListUiState.Loading,
getExpoList = {},
getExpoList = {}
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,17 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.school_of_company.design_system.R
import com.school_of_company.design_system.component.modifier.clickable.expoClickable
import com.school_of_company.design_system.icon.FilterIcon
import com.school_of_company.design_system.icon.DownArrowIcon
import com.school_of_company.design_system.theme.ExpoAndroidTheme

@Composable
fun HomeFilterButton(
modifier: Modifier = Modifier,
text: String,
onClick: () -> Unit
) {
ExpoAndroidTheme { colors, typography ->
Expand All @@ -31,7 +30,7 @@ fun HomeFilterButton(
modifier = modifier
.background(
color = colors.main,
shape = RoundedCornerShape(6.dp),
shape = RoundedCornerShape(10.dp),
)
.expoClickable(
onClick = onClick,
Expand All @@ -47,12 +46,13 @@ fun HomeFilterButton(
)
) {
Text(
text = stringResource(id = R.string.filter),
text = text,
style = typography.bodyBold2,
fontWeight = FontWeight.SemiBold,
color = colors.white
color = colors.white,
)
FilterIcon(tint = colors.white)

DownArrowIcon(tint = colors.white)
}
}
}
Expand All @@ -61,7 +61,7 @@ fun HomeFilterButton(
@Preview
@Composable
private fun HomeFilerButtonPreview() {
HomeFilterButton {

}
HomeFilterButton(
text = "오래된 순"
) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ fun ExpoListItem(
Text(
text = stringResource(id = R.string.register_temp),
style = typography.captionRegular2,
color = colors.gray600
color = colors.main400
)

Text(
Expand All @@ -164,7 +164,7 @@ fun ExpoListItem(
data.finishedDay.formatServerDate()
),
style = typography.captionRegular2,
color = colors.gray600,
color = colors.main400,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
Expand Down

0 comments on commit cb48dcd

Please sign in to comment.