-
Notifications
You must be signed in to change notification settings - Fork 1
feat: 컬렉션 기능 추가 #928
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
base: develop
Are you sure you want to change the base?
feat: 컬렉션 기능 추가 #928
Changes from 12 commits
ed79214
8ef6498
1d920b3
d5613f6
f86631e
23a17d9
e1777ed
89bbc45
5027cb0
63b0259
233767c
8e94a05
e8ee43c
462a4b3
82b98f0
55f7aab
297de49
6444759
a88bea1
e7c39cb
142052d
bf8acfa
bccf4ef
2b1a3b6
33b02f9
4b72b18
a5add47
5c4c650
66f75e1
7618ed9
5ca78ec
cf66bbb
8611773
40495c7
103e3d3
fe6c6d7
c151f1a
6800b0d
47ecaa8
f1c82ce
6f1ab63
3f3190c
8bd7f27
a3e392b
9e36cde
5ed8c99
2f7fbf3
21f62c0
592c049
9cf8a68
11b553e
1c3f56e
f606ff5
50450e1
d3f82c8
8e279b3
b0b33ef
e7bb147
88af5a2
6d5131e
be65f54
16c62f2
952ae43
5e7ccea
1e0de84
572675f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| package com.into.websoso.ui.collection | ||
|
|
||
| import android.content.Context | ||
| import android.content.Intent | ||
| import android.os.Bundle | ||
| import androidx.activity.ComponentActivity | ||
| import androidx.activity.compose.setContent | ||
| import com.into.websoso.core.designsystem.theme.WebsosoTheme | ||
| import com.into.websoso.feature.collection.CollectionNavHost | ||
| import dagger.hilt.android.AndroidEntryPoint | ||
|
|
||
| @AndroidEntryPoint | ||
| class CollectionActivity : ComponentActivity() { | ||
| override fun onCreate(savedInstanceState: Bundle?) { | ||
| super.onCreate(savedInstanceState) | ||
|
|
||
| setContent { | ||
| WebsosoTheme { | ||
| CollectionNavHost(onNavigateBack = ::finish) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| companion object { | ||
| fun getIntent(context: Context): Intent = Intent(context, CollectionActivity::class.java) | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import com.into.websoso.setNamespace | ||
|
|
||
| plugins { | ||
| id("websoso.android.feature") | ||
| } | ||
|
|
||
| android { | ||
| setNamespace("feature.collection") | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation(libs.navigation.compose) | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <manifest> | ||
|
|
||
| </manifest> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| package com.into.websoso.feature.collection | ||
|
|
||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.navigation.compose.NavHost | ||
| import androidx.navigation.compose.composable | ||
| import androidx.navigation.compose.rememberNavController | ||
|
|
||
| private const val COLLECTION_ROUTE = "collection" | ||
|
|
||
| @Composable | ||
| fun CollectionNavHost( | ||
| onNavigateBack: () -> Unit, | ||
| modifier: Modifier = Modifier, | ||
| ) { | ||
| val navController = rememberNavController() | ||
|
|
||
| NavHost( | ||
| navController = navController, | ||
| startDestination = COLLECTION_ROUTE, | ||
| modifier = modifier, | ||
| ) { | ||
| composable(route = COLLECTION_ROUTE) { | ||
| CollectionScreen(onNavigateBack = onNavigateBack) | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| package com.into.websoso.feature.collection | ||
|
|
||
| import androidx.compose.foundation.background | ||
| import androidx.compose.foundation.layout.Arrangement | ||
| import androidx.compose.foundation.layout.Box | ||
| import androidx.compose.foundation.layout.Column | ||
| import androidx.compose.foundation.layout.fillMaxSize | ||
| import androidx.compose.foundation.layout.fillMaxWidth | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.layout.statusBarsPadding | ||
| import androidx.compose.material3.Text | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Alignment | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import androidx.compose.ui.unit.dp | ||
| import com.into.websoso.core.designsystem.theme.Black | ||
| import com.into.websoso.core.designsystem.theme.Gray200 | ||
| import com.into.websoso.core.designsystem.theme.WebsosoTheme | ||
| import com.into.websoso.core.designsystem.theme.White | ||
| import com.into.websoso.feature.collection.component.CollectionAppBar | ||
|
|
||
| @Composable | ||
| fun CollectionScreen( | ||
| onNavigateBack: () -> Unit, | ||
| modifier: Modifier = Modifier, | ||
| ) { | ||
| Column( | ||
| modifier = modifier | ||
| .fillMaxSize() | ||
| .background(White) | ||
| .statusBarsPadding(), | ||
| ) { | ||
| CollectionAppBar(onNavigateBack = onNavigateBack) | ||
| Box( | ||
| modifier = Modifier | ||
| .fillMaxWidth() | ||
| .weight(1f) | ||
| .padding(horizontal = 20.dp), | ||
| contentAlignment = Alignment.Center, | ||
| ) { | ||
| Column( | ||
| horizontalAlignment = Alignment.CenterHorizontally, | ||
| verticalArrangement = Arrangement.Center, | ||
| ) { | ||
| Text( | ||
| text = "컬렉션", | ||
| color = Black, | ||
| style = WebsosoTheme.typography.headline1, | ||
| ) | ||
| Text( | ||
| text = "임시화면", | ||
| color = Gray200, | ||
| style = WebsosoTheme.typography.body2, | ||
| ) | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @Preview(showBackground = true) | ||
| @Composable | ||
| private fun CollectionScreenPreview() { | ||
| WebsosoTheme { | ||
| CollectionScreen(onNavigateBack = {}) | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| package com.into.websoso.feature.collection.component | ||
|
|
||
| import androidx.compose.foundation.Image | ||
| import androidx.compose.foundation.background | ||
| import androidx.compose.foundation.layout.Box | ||
| 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.material3.IconButton | ||
| 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.painterResource | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import androidx.compose.ui.unit.dp | ||
| import com.into.websoso.core.designsystem.theme.Black | ||
| import com.into.websoso.core.designsystem.theme.WebsosoTheme | ||
| import com.into.websoso.core.designsystem.theme.White | ||
| import com.into.websoso.core.resource.R.drawable.ic_navigate_left | ||
|
|
||
| @Composable | ||
| internal fun CollectionAppBar( | ||
| onNavigateBack: () -> Unit, | ||
| modifier: Modifier = Modifier, | ||
| ) { | ||
| Box( | ||
| modifier = modifier | ||
| .fillMaxWidth() | ||
| .height(44.dp) | ||
| .background(White), | ||
| contentAlignment = Alignment.Center, | ||
| ) { | ||
| IconButton( | ||
| onClick = onNavigateBack, | ||
| modifier = Modifier | ||
| .align(Alignment.CenterStart) | ||
| .padding(start = 6.dp) | ||
| .size(44.dp), | ||
| ) { | ||
| Image( | ||
| painter = painterResource(id = ic_navigate_left), | ||
| contentDescription = null, | ||
| modifier = Modifier.size(24.dp), | ||
|
Comment on lines
+50
to
+53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== locate file =="
fd -a 'CollectionAppBar\.kt$' .
echo "== file excerpt =="
file=$(fd 'CollectionAppBar\.kt$' . | head -n1)
if [ -n "${file:-}" ]; then
wc -l "$file"
sed -n '1,120p' "$file" | cat -n
fi
echo "== accessibility contentDescription occurrences in Jetpack Compose Image usage =="
rg -n "Image\\(|contentDescription\\s*=" feature/collection/src/main/java/com/into/websoso/feature/collection/component/CollectionAppBar.ktRepository: Team-WSS/WSS-Android Length of output: 2963 뒤로가기 버튼에 접근성 라벨을 지정해 주세요.
🤖 Prompt for AI Agents |
||
| ) | ||
| } | ||
| Text( | ||
| text = "컬렉션", | ||
| color = Black, | ||
| style = WebsosoTheme.typography.title2, | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| @Preview(showBackground = true) | ||
| @Composable | ||
| private fun CollectionAppBarPreview() { | ||
| WebsosoTheme { | ||
| CollectionAppBar(onNavigateBack = {}) | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| package com.into.websoso.feature.collection.component | ||
|
|
||
| import androidx.compose.foundation.Image | ||
| import androidx.compose.foundation.background | ||
| import androidx.compose.foundation.clickable | ||
| import androidx.compose.foundation.layout.Row | ||
| import androidx.compose.foundation.layout.Spacer | ||
| import androidx.compose.foundation.layout.fillMaxWidth | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.layout.size | ||
| import androidx.compose.material3.Text | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Alignment | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.graphics.vector.ImageVector | ||
| import androidx.compose.ui.res.vectorResource | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import androidx.compose.ui.unit.dp | ||
| import com.into.websoso.core.designsystem.theme.Gray300 | ||
| import com.into.websoso.core.designsystem.theme.Primary100 | ||
| import com.into.websoso.core.designsystem.theme.WebsosoTheme | ||
| import com.into.websoso.core.designsystem.theme.White | ||
| import com.into.websoso.core.resource.R | ||
|
|
||
| @Composable | ||
| fun CollectionEntry( | ||
| onClick: () -> Unit, | ||
| modifier: Modifier = Modifier, | ||
| collectionCount: Int = 0, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win 실제 컬렉션 수를 전달하거나 기본값을 제거해 주세요.
🤖 Prompt for AI Agents |
||
| ) { | ||
| Row( | ||
| modifier = modifier | ||
| .fillMaxWidth() | ||
| .background(White) | ||
| .clickable(onClick = onClick) | ||
| .padding( | ||
| horizontal = 20.dp, | ||
| vertical = 20.dp, | ||
| ), | ||
| verticalAlignment = Alignment.CenterVertically, | ||
| ) { | ||
| Text( | ||
| text = "컬렉션 ", | ||
| color = Gray300, | ||
| style = WebsosoTheme.typography.title2, | ||
| ) | ||
| Text( | ||
| text = collectionCount.toString(), | ||
| color = Primary100, | ||
| style = WebsosoTheme.typography.title2, | ||
| ) | ||
| Text( | ||
| text = "개", | ||
| color = Gray300, | ||
| style = WebsosoTheme.typography.title2, | ||
| ) | ||
| Spacer(modifier = Modifier.weight(1f)) | ||
| Image( | ||
| imageVector = ImageVector.vectorResource(R.drawable.btn_setting_right), | ||
| contentDescription = null, | ||
| modifier = Modifier.size(24.dp), | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| @Preview(showBackground = true) | ||
| @Composable | ||
| private fun CollectionEntryPreview() { | ||
| WebsosoTheme { | ||
| CollectionEntry(onClick = {}) | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.