Skip to content

Commit 386fb00

Browse files
authored
[RELEASE] v2.2.0๐Ÿš€ (#631)
2 parents f9df3ea + 39f3d38 commit 386fb00

57 files changed

Lines changed: 6549 additions & 732 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

โ€Ž.github/workflows/deploy-release.ymlโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ jobs:
5252
env:
5353
PLAY_STORE_JSON_KEY_FILE: "${{ github.workspace }}/play_store_api_key.json"
5454
# [์ˆ˜์ •] AAB ํŒŒ์ผ ์ ˆ๋Œ€ ๊ฒฝ๋กœ ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์ถ”๊ฐ€
55-
PLAY_STORE_AAB_FILE: "${{ github.workspace }}/app/build/outputs/bundle/release/app-release.aab"
55+
PLAY_STORE_AAB_FILE: "${{ github.workspace }}/app/build/outputs/bundle/release/app-release.aab"

โ€ŽREADME.mdโ€Ž

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Hi-lingual
22

3-
![Kotlin](https://img.shields.io/badge/Kotlin-2.2.21-7F52FF?style=flat&logo=kotlin&logoColor=white)
3+
![Kotlin](https://img.shields.io/badge/Kotlin-2.3.0-7F52FF?style=flat&logo=kotlin&logoColor=white)
44
![Android](https://img.shields.io/badge/Android-34A853?style=flat&logo=android&logoColor=white)
55
![MinSDK](https://img.shields.io/badge/minSdk-30-3DDC84?style=flat&logo=android&logoColor=white)
66

@@ -66,7 +66,6 @@ graph TD
6666
mypage["mypage"]
6767
notification["notification"]
6868
onboarding["onboarding"]
69-
otp["otp"]
7069
splash["splash"]
7170
voca["voca"]
7271
end
@@ -101,8 +100,6 @@ graph TD
101100
mypage --> data_auth
102101
notification --> data_user
103102
onboarding --> data_user
104-
otp --> data_user
105-
otp --> data_auth
106103
splash --> data_auth
107104
splash --> data_user
108105
voca --> data_voca
@@ -172,6 +169,8 @@ graph TD
172169
common["common"]
173170
crypto["crypto"]
174171
navigation["navigation"]
172+
work["work"]
173+
notification["notification"]
175174
end
176175
177176
ui --> designsystem
@@ -180,6 +179,8 @@ graph TD
180179
network --> localstorage
181180
network --> common
182181
localstorage --> crypto
182+
work --> notification
183+
notification --> designsystem
183184
```
184185

185186
## Contributors

โ€Žapp/src/release/generated/baselineProfiles/baseline-prof.txtโ€Ž

Lines changed: 2698 additions & 126 deletions
Large diffs are not rendered by default.

โ€Žapp/src/release/generated/baselineProfiles/startup-prof.txtโ€Ž

Lines changed: 2698 additions & 126 deletions
Large diffs are not rendered by default.

โ€Žcore/common/src/main/java/com/hilingual/core/common/extension/FlowExt.ktโ€Ž

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ import androidx.compose.runtime.LaunchedEffect
2020
import androidx.lifecycle.Lifecycle
2121
import androidx.lifecycle.compose.LocalLifecycleOwner
2222
import androidx.lifecycle.flowWithLifecycle
23+
import kotlinx.coroutines.CoroutineScope
2324
import kotlinx.coroutines.flow.Flow
25+
import kotlinx.coroutines.flow.SharingStarted
26+
import kotlinx.coroutines.flow.StateFlow
2427
import kotlinx.coroutines.flow.collectLatest
2528
import kotlinx.coroutines.flow.flow
29+
import kotlinx.coroutines.flow.stateIn
2630

2731
@Composable
2832
fun <T> Flow<T>.collectSideEffect(
@@ -55,3 +59,13 @@ fun <T> Flow<T>.pairwise(): Flow<Pair<T?, T>> = flow {
5559
previous = current
5660
}
5761
}
62+
63+
fun <T> Flow<T>.stateInWhileSubscribed(
64+
scope: CoroutineScope,
65+
initialValue: T,
66+
stopTimeoutMillis: Long = 5_000
67+
): StateFlow<T> = stateIn(
68+
scope = scope,
69+
started = SharingStarted.WhileSubscribed(stopTimeoutMillis),
70+
initialValue = initialValue
71+
)
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* Copyright 2026 The Hilingual Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.hilingual.core.common.model
17+
18+
import androidx.compose.material3.SnackbarDuration
19+
import androidx.compose.material3.SnackbarVisuals
20+
import androidx.compose.runtime.Immutable
21+
22+
enum class MessageDuration(val millis: Long) {
23+
DEFAULT(3000L)
24+
}
25+
26+
@Immutable
27+
sealed interface HilingualMessage : SnackbarVisuals {
28+
val id: Long
29+
val messageDuration: MessageDuration
30+
31+
override val duration: SnackbarDuration get() = SnackbarDuration.Indefinite
32+
override val withDismissAction: Boolean get() = false
33+
34+
/**
35+
* [Toast] : ๋‹จ์ˆœ ์ •๋ณด ์ „๋‹ฌ (TextToast ์‚ฌ์šฉ)
36+
*/
37+
data class Toast(
38+
override val message: String,
39+
override val messageDuration: MessageDuration = MessageDuration.DEFAULT
40+
) : HilingualMessage {
41+
override val id: Long = System.nanoTime()
42+
override val actionLabel: String? = null
43+
}
44+
45+
/**
46+
* [Snackbar] : ์•ก์…˜ ๋ฒ„ํŠผ ํฌํ•จ (HilingualActionSnackbar ์‚ฌ์šฉ)
47+
*/
48+
data class Snackbar(
49+
override val message: String,
50+
val actionLabelText: String,
51+
val onAction: () -> Unit,
52+
override val messageDuration: MessageDuration = MessageDuration.DEFAULT
53+
) : HilingualMessage {
54+
override val id: Long = System.nanoTime()
55+
override val actionLabel: String = actionLabelText
56+
override val withDismissAction: Boolean = true
57+
}
58+
}

โ€Žcore/common/src/main/java/com/hilingual/core/common/trigger/DialogTrigger.ktโ€Ž

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,16 @@ data class DialogState(
2828

2929
@Stable
3030
class DialogTrigger(
31-
val show: (() -> Unit) -> Unit,
32-
val dismiss: () -> Unit
33-
)
31+
private val onShow: (() -> Unit) -> Unit
32+
) {
33+
fun show(onClick: () -> Unit) {
34+
onShow(onClick)
35+
}
36+
}
3437

3538
@Composable
3639
fun rememberDialogTrigger(
37-
show: (() -> Unit) -> Unit,
38-
dismiss: () -> Unit
39-
): DialogTrigger = remember(show, dismiss) {
40-
DialogTrigger(show, dismiss)
40+
show: (() -> Unit) -> Unit
41+
): DialogTrigger = remember(show) {
42+
DialogTrigger(show)
4143
}

core/common/src/main/java/com/hilingual/core/common/trigger/LocalSnackbarTrigger.kt renamed to core/common/src/main/java/com/hilingual/core/common/trigger/LocalMessageController.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2025 The Hilingual Project
2+
* Copyright 2026 The Hilingual Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,8 +16,8 @@
1616
package com.hilingual.core.common.trigger
1717

1818
import androidx.compose.runtime.staticCompositionLocalOf
19-
import com.hilingual.core.common.model.SnackbarRequest
19+
import com.hilingual.core.common.model.HilingualMessage
2020

21-
val LocalSnackbarTrigger = staticCompositionLocalOf<(SnackbarRequest) -> Unit> {
22-
error("No SnackBar provided")
21+
val LocalMessageController = staticCompositionLocalOf<(HilingualMessage) -> Unit> {
22+
error("No MessageController provided")
2323
}

โ€Žcore/designsystem/src/main/java/com/hilingual/core/designsystem/component/dialog/HilingualBasicDialog.ktโ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import androidx.compose.ui.tooling.preview.Preview
3636
import androidx.compose.ui.unit.dp
3737
import androidx.compose.ui.window.Dialog
3838
import androidx.compose.ui.window.DialogProperties
39+
import com.hilingual.core.common.extension.noRippleClickable
3940
import com.hilingual.core.designsystem.theme.HilingualTheme
4041

4142
@Composable
@@ -48,13 +49,15 @@ fun HilingualBasicDialog(
4849
),
4950
content: @Composable () -> Unit
5051
) {
52+
val dimCondition = properties.dismissOnClickOutside
5153
Dialog(
5254
onDismissRequest = onDismiss,
5355
properties = properties
5456
) {
5557
Box(
5658
modifier = modifier
5759
.fillMaxSize()
60+
.then(if (dimCondition) Modifier.noRippleClickable(onClick = onDismiss) else Modifier)
5861
.background(HilingualTheme.colors.dim2)
5962
.padding(horizontal = 16.dp),
6063
contentAlignment = Alignment.Center
@@ -63,6 +66,7 @@ fun HilingualBasicDialog(
6366
horizontalAlignment = Alignment.CenterHorizontally,
6467
modifier = Modifier
6568
.fillMaxWidth()
69+
.noRippleClickable { /* ํด๋ฆญ ์ด๋ฒคํŠธ ์†Œ๋น„ */ }
6670
.background(
6771
color = HilingualTheme.colors.white,
6872
shape = RoundedCornerShape(12.dp)

โ€Žcore/designsystem/src/main/java/com/hilingual/core/designsystem/component/snackbar/HilingualActionSnackbar.ktโ€Ž

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ import androidx.compose.ui.draw.clip
3131
import androidx.compose.ui.tooling.preview.Preview
3232
import androidx.compose.ui.unit.dp
3333
import com.hilingual.core.common.extension.noRippleClickable
34+
import com.hilingual.core.common.model.HilingualMessage
3435
import com.hilingual.core.designsystem.theme.HilingualTheme
3536

3637
@Composable
3738
fun HilingualActionSnackbar(
38-
message: String,
39-
buttonText: String,
40-
onClick: () -> Unit,
41-
modifier: Modifier = Modifier
39+
message: HilingualMessage.Snackbar,
40+
modifier: Modifier = Modifier,
41+
onDismiss: () -> Unit
4242
) {
4343
Row(
4444
modifier = modifier
@@ -50,19 +50,24 @@ fun HilingualActionSnackbar(
5050
horizontalArrangement = Arrangement.SpaceBetween
5151
) {
5252
Text(
53-
text = message,
53+
text = message.message,
5454
style = HilingualTheme.typography.bodyR16,
5555
color = HilingualTheme.colors.white
5656
)
5757

5858
Text(
59-
text = buttonText,
59+
text = message.actionLabelText,
6060
style = HilingualTheme.typography.bodyM14,
6161
color = HilingualTheme.colors.white,
6262
modifier = Modifier
6363
.clip(RoundedCornerShape(6.dp))
6464
.background(HilingualTheme.colors.gray700)
65-
.noRippleClickable(onClick = onClick)
65+
.noRippleClickable(
66+
onClick = {
67+
message.onAction()
68+
onDismiss()
69+
}
70+
)
6671
.padding(vertical = 7.dp, horizontal = 11.dp)
6772
)
6873
}
@@ -78,9 +83,12 @@ private fun DiarySnackbarPreview() {
7883
horizontalAlignment = Alignment.CenterHorizontally
7984
) {
8085
HilingualActionSnackbar(
81-
message = "์ผ๊ธฐ๊ฐ€ ๊ฒŒ์‹œ๋˜์—ˆ์–ด์š”!",
82-
buttonText = "๋ณด๋Ÿฌ๊ฐ€๊ธฐ",
83-
onClick = {},
86+
message = HilingualMessage.Snackbar(
87+
message = "์ผ๊ธฐ๊ฐ€ ๊ฒŒ์‹œ๋˜์—ˆ์–ด์š”!",
88+
actionLabelText = "๋ณด๋Ÿฌ๊ฐ€๊ธฐ",
89+
onAction = {}
90+
),
91+
onDismiss = {},
8492
modifier = Modifier
8593
.padding(horizontal = 16.dp)
8694
.padding(bottom = 23.dp)

0 commit comments

Comments
ย (0)