Skip to content
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

#188: 라이브러리 버전 업데이트 #189

Merged
merged 3 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion core/ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ dependencies {
implementation(project(":designsystem"))
implementation(project(":core:model"))
implementation(project(":core:common"))
implementation(libs.material)
implementation(libs.kotlinx.collections.immutable)
implementation(libs.coil.core)
implementation(libs.coil.compose)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.BoxWithConstraintsScope
import androidx.compose.foundation.text.InlineTextContent
import androidx.compose.foundation.text.InternalFoundationTextApi
import androidx.compose.foundation.text.TextDelegate
import androidx.compose.material3.LocalTextStyle
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
Expand All @@ -20,6 +19,7 @@ import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.rememberTextMeasurer
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.text.style.TextOverflow
Expand Down Expand Up @@ -135,19 +135,19 @@ private fun BoxWithConstraintsScope.shouldShrink(
textStyle: TextStyle,
maxLines: Int,
): Boolean {
val textDelegate = TextDelegate(
val textMeasurer = rememberTextMeasurer()

// Measure the text with given constraints, style, and max lines
val textLayoutResult = textMeasurer.measure(
text = text,
style = textStyle,
maxLines = maxLines,
softWrap = true,
overflow = TextOverflow.Clip,
density = LocalDensity.current,
fontFamilyResolver = LocalFontFamilyResolver.current,
)

val textLayoutResult = textDelegate.layout(
constraints,
LocalLayoutDirection.current,
constraints = constraints,
layoutDirection = LocalLayoutDirection.current,
)

return textLayoutResult.hasVisualOverflow
Expand Down
1 change: 0 additions & 1 deletion designsystem/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ android {

dependencies {
implementation(project(":core:common"))
implementation(libs.material)
implementation(libs.kotlinx.collections.immutable)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material.ripple.LocalRippleTheme
import androidx.compose.material.ripple.RippleAlpha
import androidx.compose.material.ripple.RippleTheme
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.LocalRippleConfiguration
import androidx.compose.material3.RippleConfiguration
import androidx.compose.material3.Surface
import androidx.compose.material3.Tab
import androidx.compose.material3.TabRow
Expand All @@ -26,6 +27,7 @@ import com.bff.wespot.designsystem.util.OrientationPreviews
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.persistentListOf

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun WSHomeTabRow(
selectedTabIndex: Int,
Expand All @@ -38,6 +40,11 @@ fun WSHomeTabRow(
else -> Modifier
}

val rippleConfiguration = RippleConfiguration(
color = Color.Unspecified,
rippleAlpha = RippleAlpha(0.0f, 0.0f, 0.0f, 0.0f),
)

TabRow(
selectedTabIndex = selectedTabIndex,
containerColor = WeSpotThemeManager.colors.backgroundColor,
Expand All @@ -56,7 +63,7 @@ fun WSHomeTabRow(
) {
tabList.forEachIndexed { index, tab ->
val selected = selectedTabIndex == index
CompositionLocalProvider(LocalRippleTheme provides NoRippleTheme) {
CompositionLocalProvider(LocalRippleConfiguration provides rippleConfiguration) {
Tab(
selected = selected,
onClick = { onTabSelected(index) },
Expand Down Expand Up @@ -85,14 +92,6 @@ fun WSHomeTabRow(
}
}

private object NoRippleTheme : RippleTheme {
@Composable
override fun defaultColor() = Color.Unspecified

@Composable
override fun rippleAlpha(): RippleAlpha = RippleAlpha(0.0f, 0.0f, 0.0f, 0.0f)
}

@OrientationPreviews
@Composable
private fun WSTopBarPreview() {
Expand Down
18 changes: 8 additions & 10 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ targetSdk = "34"
versionName = "1.2.1"
versionCode = "5"

gradle-plugin = "8.5.1"
gradle-plugin = "8.5.2"
kotlin = "2.0.0"
kotlinx-serialization-json = "1.7.0"
kotlinx-serialization-json = "1.7.1"
kotlinx-collections-immutable = "0.3.7"
core-ktx = "1.13.1"
ksp = "2.0.0-1.0.22"
Expand All @@ -16,22 +16,21 @@ detekt = "1.23.6"
kotlinx-coroutines = "1.8.1"
java-inject = "1"

lifecycle-runtime-ktx = "2.8.3"
activity-compose = "1.9.0"
compose-bom = "2024.06.00"
lifecycle = "2.8.3"
lifecycle-runtime-ktx = "2.8.7"
activity-compose = "1.9.3"
compose-bom = "2024.10.01"
lifecycle = "2.8.7"
navigation = "2.7.7"
hilt = "2.51.1"
hilt-navigation-compose = "1.2.0"

coil = "2.6.0"
ktor-client = "2.3.11"
ktor-client = "2.3.12"
orbit = "8.0.0"
material = "1.12.0"
google-services = "4.4.2"
crashlytics = "3.0.2"
performace = "1.4.2"
firebase = "33.1.2"
firebase = "33.5.1"

junit = "4.13.2"
junit-version = "1.2.1"
Expand Down Expand Up @@ -122,7 +121,6 @@ firebase-performance = { module = "com.google.firebase:firebase-perf" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junit-version" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso-core" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
timber = { module = "com.jakewharton.timber:timber", version.ref = "timber"}

detekt-plugin = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" }
Expand Down