Skip to content

Commit 1197129

Browse files
authored
Merge pull request #111 from Nexters/feature/image-create-text-change
[FEAT] [#12] 이미지 생성 화면 내에 텍스트 갱신 구현
2 parents 893fa2c + 56bcecf commit 1197129

File tree

25 files changed

+357
-245
lines changed

25 files changed

+357
-245
lines changed

build-logic/src/main/kotlin/com/nexters/ilab/android/Config.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ internal object ApplicationConfig {
44
const val MinSdk = 26
55
const val TargetSdk = 34
66
const val CompileSdk = 34
7-
const val VersionCode = 4
8-
const val VersionName = "1.0.3"
7+
const val VersionCode = 5
8+
const val VersionName = "1.0.4"
99
val JavaVersion = org.gradle.api.JavaVersion.VERSION_17
1010
const val JavaVersionAsInt = 17
1111
}

core/designsystem/src/main/res/values/strings.xml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,8 @@
7575

7676
<!-- create image-->
7777
<string name="creating_image_title">이미지 생성 중…</string>
78-
<string name="creating_image_wait_part1_description1_prefix">최대</string>
79-
<string name="creating_image_wait_part1_description1_time_value">&#160;30초</string>
80-
<string name="creating_image_wait_part1_description1_suffix">&#160;정도 소요됩니다.</string>
81-
<string name="creating_image_wait_part1_description2">잠시만 기다려주시면 작업이 완료됩니다.</string>
82-
<string name="creating_image_wait_part2_description1">조금만 더 기다려주세요!</string>
83-
<string name="creating_image_wait_part2_description2">열심히 작업 중입니다.</string>
78+
<string name="creating_image_wait_part1_description">최대 30초 정도 소요됩니다.\n잠시만 기다려주시면 작업이 완료됩니다.</string>
79+
<string name="creating_image_wait_part2_description">조금만 더 기다려주세요!\n열심히 작업 중입니다.</string>
8480
<string name="creating_image_exit_warning_prefix">화면 이탈시 이미지 생성이</string>
8581
<string name="creating_image_exit_warning_suffix">&#160;종료됩니다.</string>
8682
<string name="creating_image_stop_confirmation">정말 중단하시겠어요?</string>

core/ui/src/main/kotlin/com/nexters/ilab/core/ui/component/Button.kt

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import androidx.compose.runtime.Composable
1717
import androidx.compose.ui.Modifier
1818
import androidx.compose.ui.graphics.Color
1919
import androidx.compose.ui.unit.dp
20+
import com.nexters.ilab.android.core.designsystem.theme.ILabTheme
2021
import com.nexters.ilab.core.ui.ComponentPreview
2122

2223
@Composable
@@ -117,17 +118,19 @@ fun ILabButtonPreview() {
117118
@ComponentPreview
118119
@Composable
119120
fun ILabButtonWithLeadingIconPreview() {
120-
ILabButton(
121-
onClick = {},
122-
text = {
123-
Text("Button")
124-
},
125-
leadingIcon = {
126-
Icon(
127-
imageVector = Icons.Filled.Check,
128-
contentDescription = "Navigation icon",
129-
tint = Color.White,
130-
)
131-
},
132-
)
121+
ILabTheme {
122+
ILabButton(
123+
onClick = {},
124+
text = {
125+
Text("Button")
126+
},
127+
leadingIcon = {
128+
Icon(
129+
imageVector = Icons.Filled.Check,
130+
contentDescription = "Navigation icon",
131+
tint = Color.White,
132+
)
133+
},
134+
)
135+
}
133136
}

core/ui/src/main/kotlin/com/nexters/ilab/core/ui/component/Dialog.kt

Lines changed: 40 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import androidx.compose.ui.text.font.FontWeight
2525
import androidx.compose.ui.unit.dp
2626
import com.nexters.ilab.android.core.designsystem.R
2727
import com.nexters.ilab.android.core.designsystem.theme.Contents2
28+
import com.nexters.ilab.android.core.designsystem.theme.ILabTheme
2829
import com.nexters.ilab.android.core.designsystem.theme.Subtitle2
2930
import com.nexters.ilab.android.core.designsystem.theme.Title2
3031
import com.nexters.ilab.core.ui.ComponentPreview
@@ -179,47 +180,53 @@ fun CreateImageStopDialogPreview() {
179180
@ComponentPreview
180181
@Composable
181182
fun DeleteAccountDialogPreview() {
182-
ILabDialog(
183-
titleResId = R.string.setting_delete_account,
184-
iconResId = R.drawable.ic_warning,
185-
iconDescription = "Warning Icon",
186-
firstDescriptionResId = R.string.setting_delete_account_description,
187-
secondDescriptionResId = null,
188-
cancelTextResId = R.string.setting_delete_account_cancel,
189-
confirmTextResId = R.string.setting_delete_account_confirm,
190-
onCancelClick = {},
191-
onConfirmClick = {},
192-
)
183+
ILabTheme {
184+
ILabDialog(
185+
titleResId = R.string.setting_delete_account,
186+
iconResId = R.drawable.ic_warning,
187+
iconDescription = "Warning Icon",
188+
firstDescriptionResId = R.string.setting_delete_account_description,
189+
secondDescriptionResId = null,
190+
cancelTextResId = R.string.setting_delete_account_cancel,
191+
confirmTextResId = R.string.setting_delete_account_confirm,
192+
onCancelClick = {},
193+
onConfirmClick = {},
194+
)
195+
}
193196
}
194197

195198
@ComponentPreview
196199
@Composable
197200
fun ServerErrorDialogPreview() {
198-
ILabDialog(
199-
titleResId = R.string.server_error_title,
200-
iconResId = R.drawable.ic_server_error,
201-
iconDescription = "Network Error Icon",
202-
firstDescriptionResId = R.string.server_error_description1,
203-
secondDescriptionResId = R.string.server_error_description2,
204-
confirmTextResId = R.string.retry,
205-
cancelTextResId = null,
206-
onCancelClick = {},
207-
onConfirmClick = {},
208-
)
201+
ILabTheme {
202+
ILabDialog(
203+
titleResId = R.string.server_error_title,
204+
iconResId = R.drawable.ic_server_error,
205+
iconDescription = "Network Error Icon",
206+
firstDescriptionResId = R.string.server_error_description1,
207+
secondDescriptionResId = R.string.server_error_description2,
208+
confirmTextResId = R.string.retry,
209+
cancelTextResId = null,
210+
onCancelClick = {},
211+
onConfirmClick = {},
212+
)
213+
}
209214
}
210215

211216
@ComponentPreview
212217
@Composable
213218
fun NetworkErrorDialogPreview() {
214-
ILabDialog(
215-
titleResId = R.string.network_error_title,
216-
iconResId = R.drawable.ic_network_error,
217-
iconDescription = "Network Error Icon",
218-
firstDescriptionResId = R.string.network_error_description1,
219-
secondDescriptionResId = R.string.network_error_description2,
220-
confirmTextResId = R.string.retry,
221-
cancelTextResId = null,
222-
onCancelClick = {},
223-
onConfirmClick = {},
224-
)
219+
ILabTheme {
220+
ILabDialog(
221+
titleResId = R.string.network_error_title,
222+
iconResId = R.drawable.ic_network_error,
223+
iconDescription = "Network Error Icon",
224+
firstDescriptionResId = R.string.network_error_description1,
225+
secondDescriptionResId = R.string.network_error_description2,
226+
confirmTextResId = R.string.retry,
227+
cancelTextResId = null,
228+
onCancelClick = {},
229+
onConfirmClick = {},
230+
)
231+
}
225232
}

core/ui/src/main/kotlin/com/nexters/ilab/core/ui/component/Image.kt

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import coil.decode.ImageDecoderDecoder
3636
import coil.request.ImageRequest
3737
import com.nexters.ilab.android.core.designsystem.R
3838
import com.nexters.ilab.android.core.designsystem.theme.Contents2
39+
import com.nexters.ilab.android.core.designsystem.theme.ILabTheme
3940
import com.nexters.ilab.core.ui.ComponentPreview
4041

4142
@Composable
@@ -209,57 +210,69 @@ fun LoadingImage(
209210
@ComponentPreview
210211
@Composable
211212
fun ExampleImagePreview() {
212-
ExampleImage(
213-
resId = 0,
214-
contentDescription = "Example Image Icon",
215-
)
213+
ILabTheme {
214+
ExampleImage(
215+
resId = 0,
216+
contentDescription = "Example Image Icon",
217+
)
218+
}
216219
}
217220

218221
@ComponentPreview
219222
@Composable
220223
fun NetworkImagePreview() {
221-
NetworkImage(
222-
imageUrl = "",
223-
contentDescription = "Network Image Icon",
224-
)
224+
ILabTheme {
225+
NetworkImage(
226+
imageUrl = "",
227+
contentDescription = "Network Image Icon",
228+
)
229+
}
225230
}
226231

227232
@ComponentPreview
228233
@Composable
229234
fun BackgroundImagePreview() {
230-
BackgroundImage(
231-
resId = 0,
232-
contentDescription = "Loading Image Icon",
233-
)
235+
ILabTheme {
236+
BackgroundImage(
237+
resId = 0,
238+
contentDescription = "Loading Image Icon",
239+
)
240+
}
234241
}
235242

236243
@ComponentPreview
237244
@Composable
238245
fun LoadingImagePreview() {
239-
LoadingImage(
240-
resId = 0,
241-
contentDescription = "Background Image Icon",
242-
)
246+
ILabTheme {
247+
LoadingImage(
248+
resId = 0,
249+
contentDescription = "Background Image Icon",
250+
)
251+
}
243252
}
244253

245254
@ComponentPreview
246255
@Composable
247256
fun UnSelectedStyleImagePreview() {
248-
StyleImage(
249-
imageUrl = "",
250-
styleName = "#스타일",
251-
contentDescription = "Style Image",
252-
isSelectedIndex = false,
253-
)
257+
ILabTheme {
258+
StyleImage(
259+
imageUrl = "",
260+
styleName = "#스타일",
261+
contentDescription = "Style Image",
262+
isSelectedIndex = false,
263+
)
264+
}
254265
}
255266

256267
@ComponentPreview
257268
@Composable
258269
fun SelectedStyleImagePreview() {
259-
StyleImage(
260-
imageUrl = "",
261-
styleName = "#스타일",
262-
contentDescription = "Style Image",
263-
isSelectedIndex = true,
264-
)
270+
ILabTheme {
271+
StyleImage(
272+
imageUrl = "",
273+
styleName = "#스타일",
274+
contentDescription = "Style Image",
275+
isSelectedIndex = true,
276+
)
277+
}
265278
}

core/ui/src/main/kotlin/com/nexters/ilab/core/ui/component/LoadingIndicator.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import androidx.compose.ui.Modifier
99
import androidx.compose.ui.unit.dp
1010
import com.nexters.ilab.android.core.common.extension.noRippleClickable
1111
import com.nexters.ilab.android.core.designsystem.R
12+
import com.nexters.ilab.android.core.designsystem.theme.ILabTheme
1213
import com.nexters.ilab.core.ui.ComponentPreview
1314

1415
@Composable
@@ -28,5 +29,7 @@ fun LoadingIndicator(modifier: Modifier = Modifier) {
2829
@ComponentPreview
2930
@Composable
3031
fun LoadingIndicatorPreview() {
31-
LoadingIndicator(modifier = Modifier.fillMaxSize())
32+
ILabTheme {
33+
LoadingIndicator(modifier = Modifier.fillMaxSize())
34+
}
3235
}

core/ui/src/main/kotlin/com/nexters/ilab/core/ui/component/PagerIndicator.kt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import androidx.compose.ui.draw.clip
2020
import androidx.compose.ui.graphics.Color
2121
import androidx.compose.ui.unit.Dp
2222
import androidx.compose.ui.unit.dp
23+
import com.nexters.ilab.android.core.designsystem.theme.ILabTheme
2324
import com.nexters.ilab.core.ui.ComponentPreview
2425
import kotlin.math.absoluteValue
2526

@@ -78,11 +79,13 @@ fun PagerIndicator(
7879
@ComponentPreview
7980
@Composable
8081
internal fun PagerIndicatorPreview() {
81-
val pagerState = rememberPagerState(pageCount = { 4 })
82-
PagerIndicator(
83-
pageCount = pagerState.pageCount,
84-
currentPage = pagerState.currentPage,
85-
targetPage = pagerState.currentPage,
86-
currentPageOffsetFraction = pagerState.currentPageOffsetFraction,
87-
)
82+
ILabTheme {
83+
val pagerState = rememberPagerState(pageCount = { 4 })
84+
PagerIndicator(
85+
pageCount = pagerState.pageCount,
86+
currentPage = pagerState.currentPage,
87+
targetPage = pagerState.currentPage,
88+
currentPageOffsetFraction = pagerState.currentPageOffsetFraction,
89+
)
90+
}
8891
}

core/ui/src/main/kotlin/com/nexters/ilab/core/ui/component/TopAppBar.kt

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import androidx.compose.ui.res.stringResource
2020
import androidx.compose.ui.res.vectorResource
2121
import androidx.compose.ui.unit.dp
2222
import com.nexters.ilab.android.core.designsystem.R
23+
import com.nexters.ilab.android.core.designsystem.theme.ILabTheme
2324
import com.nexters.ilab.android.core.designsystem.theme.Subtitle1
2425
import com.nexters.ilab.core.ui.ComponentPreview
2526

@@ -102,30 +103,36 @@ enum class TopAppBarNavigationType { Back, Close, Setting }
102103
@ComponentPreview
103104
@Composable
104105
fun ILabTopAppBarBackPreview() {
105-
ILabTopAppBar(
106-
titleRes = android.R.string.untitled,
107-
navigationType = TopAppBarNavigationType.Back,
108-
navigationIconContentDescription = "Navigation back icon",
109-
)
106+
ILabTheme {
107+
ILabTopAppBar(
108+
titleRes = android.R.string.untitled,
109+
navigationType = TopAppBarNavigationType.Back,
110+
navigationIconContentDescription = "Navigation back icon",
111+
)
112+
}
110113
}
111114

112115
@ComponentPreview
113116
@Composable
114117
fun ILabTopAppBarClosePreview() {
115-
ILabTopAppBar(
116-
titleRes = android.R.string.untitled,
117-
navigationType = TopAppBarNavigationType.Close,
118-
navigationIconContentDescription = "Navigation close icon",
119-
)
118+
ILabTheme {
119+
ILabTopAppBar(
120+
titleRes = android.R.string.untitled,
121+
navigationType = TopAppBarNavigationType.Close,
122+
navigationIconContentDescription = "Navigation close icon",
123+
)
124+
}
120125
}
121126

122127
@ComponentPreview
123128
@Composable
124129
fun ILabTopAppBarSettingPreview() {
125-
ILabTopAppBar(
126-
titleRes = android.R.string.untitled,
127-
navigationType = TopAppBarNavigationType.Setting,
128-
navigationIconContentDescription = "Navigation Setting icon",
129-
isTextLogo = true,
130-
)
130+
ILabTheme {
131+
ILabTopAppBar(
132+
titleRes = android.R.string.untitled,
133+
navigationType = TopAppBarNavigationType.Setting,
134+
navigationIconContentDescription = "Navigation Setting icon",
135+
isTextLogo = true,
136+
)
137+
}
131138
}

0 commit comments

Comments
 (0)