Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into ui/#124-image-graphic
Browse files Browse the repository at this point in the history
  • Loading branch information
boiledEgg-s committed Jul 18, 2024
2 parents be2b301 + 3b36af1 commit 4ac2f64
Show file tree
Hide file tree
Showing 48 changed files with 955 additions and 480 deletions.
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_terning_launcher_foreground"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:roundIcon="@mipmap/ic_terning_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.TerningAndroid"
android:usesCleartextTraffic="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight
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.layout.width
import androidx.compose.foundation.lazy.LazyColumn
Expand Down Expand Up @@ -93,7 +94,7 @@ fun DateItemsPicker(
firstIndex: Int,
onItemSelected: (String) -> Unit,
modifier: Modifier = Modifier,
isYear: Boolean
isYear: Boolean,
) {
val listState = rememberLazyListState(firstIndex)
val currentValue = remember { mutableStateOf("") }
Expand Down Expand Up @@ -133,7 +134,6 @@ fun DateItemsPicker(
if (it == firstVisibleItemIndex + 1) {
currentValue.value = items[index]
}
Spacer(modifier = Modifier.height(6.dp))
Text(
text =
when (isYear) {
Expand All @@ -142,9 +142,9 @@ fun DateItemsPicker(
},
style = TerningTheme.typography.title3,
color = if (it == firstVisibleItemIndex + 1) Grey500 else Grey300,
textAlign = TextAlign.Center
textAlign = TextAlign.Center,
modifier = modifier.padding(vertical = 8.dp)
)
Spacer(modifier = Modifier.height(6.dp))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,11 @@ fun InternItem(
.data(imageUrl)
.build(),
contentDescription = title,
contentScale = ContentScale.Crop,
contentScale = ContentScale.Fit,
modifier = Modifier
.fillMaxHeight()
.aspectRatio(1f)
.clip(RoundedCornerShape(5.dp))
.background(color = Grey300)
)

Column(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,30 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.terning.core.designsystem.theme.Grey200
import com.terning.core.designsystem.theme.White
import com.terning.core.extension.customShadow
import com.terning.core.extension.noRippleClickable

@Composable
fun InternItemWithShadow(
modifier: Modifier,
shadowRadius: Dp,
shadowWidth: Dp,
imageUrl: String,
title: String,
dateDeadline: String,
workingPeriod: String,
scrapId: Long?,
isScrapped: Boolean,
) {
Box(
modifier = Modifier
modifier = modifier
.customShadow(
color = Grey200,
shadowRadius = 10.dp,
shadowWidth = 2.dp,
shadowRadius = shadowRadius,
shadowWidth = shadowWidth,
)
.background(
color = White,
Expand All @@ -35,7 +40,7 @@ fun InternItemWithShadow(
title = title,
dateDeadline = dateDeadline,
workingPeriod = workingPeriod,
isScraped = scrapId != null
isScraped = isScrapped
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ package com.terning.core.designsystem.component.textfield
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.platform.LocalFocusManager
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
import androidx.compose.ui.text.input.ImeAction
import com.terning.core.designsystem.theme.Grey300
import com.terning.core.designsystem.theme.Grey400
import com.terning.core.designsystem.theme.TerningMain
Expand All @@ -17,8 +20,11 @@ fun SearchTextField(
leftIcon: Int,
enabled: Boolean = true,
readOnly: Boolean = false,
onDoneAction: (() -> Unit)? = null,
onSearchAction: () -> Unit? = {},
) {
val keyboardController = LocalSoftwareKeyboardController.current
val focusManager = LocalFocusManager.current

TerningBasicTextField(
value = text,
onValueChange = onValueChange,
Expand All @@ -32,9 +38,17 @@ fun SearchTextField(
hintColor = Grey300,
leftIcon = leftIcon,
leftIconColor = TerningMain,
imeAction = ImeAction.Search,
enabled = enabled,
readOnly = readOnly,
onDoneAction = onDoneAction,
onSearchAction = {
if (text.isNotBlank()) {
keyboardController?.hide()
keyboardController?.hide()
focusManager.clearFocus()
onSearchAction()
}
},
helperColor = TerningMain
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import androidx.compose.ui.focus.onFocusChanged
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalFocusManager
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.input.ImeAction
Expand All @@ -46,6 +44,7 @@ fun TerningBasicTextField(
strokeWidth: Float = 1f,
leftIcon: Int? = null,
leftIconColor: Color = TerningMain,
imeAction: ImeAction = ImeAction.Done,
maxTextLength: Int? = null,
showTextLength: Boolean = false,
hint: String = "",
Expand All @@ -54,28 +53,24 @@ fun TerningBasicTextField(
enabled: Boolean = true,
helperColor: Color,
readOnly: Boolean = false,
onDoneAction: (() -> Unit)? = null,
onDoneAction: () -> Unit? = {},
onSearchAction: () -> Unit? = {},
) {
val keyboardController = LocalSoftwareKeyboardController.current
val focusManager = LocalFocusManager.current
val isFocused: MutableState<Boolean> = remember { mutableStateOf(false) }

BasicTextField(
value = value,
onValueChange = onValueChange,
onValueChange = {
if (maxTextLength == null || it.length <= maxTextLength) {
onValueChange(it)
}
},
singleLine = true,
maxLines = 1,
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done),
keyboardOptions = KeyboardOptions(imeAction = imeAction),
keyboardActions = KeyboardActions(
onDone = {
if (value.isNotBlank()) {
keyboardController?.hide()
focusManager.clearFocus()
if (onDoneAction != null) {
onDoneAction()
}
}
}
onDone = { onDoneAction() },
onSearch = { onSearchAction() },
),

modifier = modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ private fun InternDialogContent(
.width(80.dp)
.aspectRatio(1f)
.clip(RoundedCornerShape(5.dp))
.background(color = Grey300)
.border(
width = 1.dp,
color = TerningMain,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.terning.feature.calendar.calendar.navigation

import androidx.compose.animation.EnterTransition
import androidx.compose.animation.ExitTransition
import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavOptions
Expand All @@ -19,7 +21,20 @@ fun NavController.navigateCalendar(navOptions: NavOptions? = null) {
fun NavGraphBuilder.calendarNavGraph(
navHostController: NavController
) {
composable<Calendar> {
composable<Calendar>(
exitTransition = {
ExitTransition.None
},
popEnterTransition = {
EnterTransition.None
},
enterTransition = {
EnterTransition.None
},
popExitTransition = {
ExitTransition.None
}
) {
CalendarRoute(
navController = navHostController
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.terning.feature.filtering.startfiltering.navigation

import androidx.compose.animation.EnterTransition
import androidx.compose.animation.ExitTransition
import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavHostController
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.terning.feature.filtering.starthome.navigation

import androidx.compose.animation.EnterTransition
import androidx.compose.animation.ExitTransition
import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavHostController
Expand All @@ -19,7 +21,20 @@ fun NavController.navigateStartHome(navOptions: NavOptions? = null) {
fun NavGraphBuilder.startHomeNavGraph(
navHostController: NavHostController
) {
composable<StartHome> {
composable<StartHome>(
exitTransition = {
ExitTransition.None
},
popEnterTransition = {
EnterTransition.None
},
enterTransition = {
EnterTransition.None
},
popExitTransition = {
ExitTransition.None
}
) {
StartHomeScreen(navController = navHostController)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.terning.feature.home.changefilter.navigation

import androidx.compose.animation.EnterTransition
import androidx.compose.animation.ExitTransition
import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavHostController
Expand All @@ -19,7 +21,20 @@ fun NavController.navigateChangeFilter(navOptions: NavOptions? = null) {
fun NavGraphBuilder.changeFilterNavGraph(
navHostController: NavHostController
) {
composable<ChangeFilter> {
composable<ChangeFilter>(
exitTransition = {
ExitTransition.None
},
popEnterTransition = {
EnterTransition.None
},
enterTransition = {
EnterTransition.None
},
popExitTransition = {
ExitTransition.None
}
) {
ChangeFilterRoute(
navController = navHostController
)
Expand Down
Loading

0 comments on commit 4ac2f64

Please sign in to comment.