-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: 피드 비공개 반영 관련 세부 디테일 수정 #670
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
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
3732fa3
refactor: 피드 좋아요 아이콘 하단 간격 조정
junseo511 307c0ad
refactor: 피드 상세 좋아요 아이콘 하단 간격 조정
junseo511 91895a7
refactor: 린트 해결을 위한 리소스 모듈 minSdk 추가
junseo511 336f08a
refactor: 비공개 관련 UX 라이팅 수정 반영
junseo511 23c01fc
refactor: 리소스 모듈 minSdk 제거
junseo511 b4b1c50
refactor: 비공개 관련 UX 라이팅 수정 반영
junseo511 f128009
feat: 피드 생성 이미지 레이아웃 추가
junseo511 0d003a0
feat: 피드 생성 이미지 컴포넌트 추가
junseo511 1a994ea
refactor: 불필요한 더미데이터 제거
junseo511 5465d2a
refactor: index 변수값 명시
junseo511 1ea58fd
refactor: 이미지 함수 변경
junseo511 557b1f5
Merge pull request #707 from Team-WSS/feat/706
junseo511 3a43785
Merge branch 'develop' of https://github.com/Team-WSS/WSS-Android int…
junseo511 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
89 changes: 89 additions & 0 deletions
89
app/src/main/java/com/into/websoso/ui/createFeed/component/CreateFeedImageContainer.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| package com.into.websoso.ui.createFeed.component | ||
|
|
||
| import androidx.compose.foundation.Image | ||
| import androidx.compose.foundation.layout.Arrangement | ||
| import androidx.compose.foundation.layout.Box | ||
| import androidx.compose.foundation.layout.PaddingValues | ||
| import androidx.compose.foundation.layout.aspectRatio | ||
| import androidx.compose.foundation.layout.fillMaxWidth | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.layout.size | ||
| import androidx.compose.foundation.lazy.LazyRow | ||
| import androidx.compose.foundation.shape.RoundedCornerShape | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Alignment | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.draw.clip | ||
| import androidx.compose.ui.layout.ContentScale | ||
| import androidx.compose.ui.res.painterResource | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import androidx.compose.ui.unit.dp | ||
| import com.into.websoso.core.common.ui.component.AdaptationImage | ||
| import com.into.websoso.core.common.util.clickableWithoutRipple | ||
| import com.into.websoso.core.designsystem.component.NetworkImage | ||
| import com.into.websoso.core.designsystem.theme.WebsosoTheme | ||
| import com.into.websoso.core.resource.R.drawable.ic_feed_remove_image | ||
|
|
||
| @Composable | ||
| fun CreateFeedImageContainer( | ||
| imageUrls: List<String>, | ||
| onRemoveClick: (index: Int) -> Unit, | ||
| ) { | ||
| LazyRow( | ||
| modifier = Modifier | ||
| .fillMaxWidth(), | ||
| horizontalArrangement = Arrangement.spacedBy(10.dp), | ||
| contentPadding = PaddingValues(horizontal = 20.dp), | ||
| ) { | ||
| items(imageUrls.size) { index -> | ||
| CreateFeedImageBox( | ||
| imageUrl = imageUrls[index], | ||
| onRemoveClick = { | ||
| onRemoveClick(index) | ||
| }, | ||
| ) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @Composable | ||
| private fun CreateFeedImageBox( | ||
| imageUrl: String, | ||
| onRemoveClick: () -> Unit, | ||
| ) { | ||
| Box( | ||
| modifier = Modifier | ||
| .size(100.dp) | ||
| .aspectRatio(1f) | ||
| .clip(RoundedCornerShape(8.dp)), | ||
| ) { | ||
| Image( | ||
| painter = painterResource(ic_feed_remove_image), | ||
| contentDescription = null, | ||
| modifier = Modifier | ||
| .size(38.dp) | ||
| .padding(10.dp) | ||
| .align(Alignment.TopEnd) | ||
| .clickableWithoutRipple { onRemoveClick() }, | ||
| ) | ||
| NetworkImage( | ||
| imageUrl = imageUrl, | ||
| contentScale = ContentScale.Crop, | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| @Preview | ||
| @Composable | ||
| private fun CreateFeedImageContainerPreview() { | ||
| WebsosoTheme { | ||
| CreateFeedImageContainer( | ||
| imageUrls = listOf( | ||
| "https://github.com/user-attachments/assets/e89a02bb-549f-414d-809f-0ab1e8f72c5f", | ||
| "https://github.com/user-attachments/assets/e89a02bb-549f-414d-809f-0ab1e8f72c5f", | ||
| "https://github.com/user-attachments/assets/e89a02bb-549f-414d-809f-0ab1e8f72c5f", | ||
| ), | ||
| onRemoveClick = {}, | ||
| ) | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
core/resource/src/main/res/drawable/ic_feed_remove_image.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:width="19dp" | ||
| android:height="18dp" | ||
| android:viewportWidth="19" | ||
| android:viewportHeight="18"> | ||
| <path | ||
| android:pathData="M9.469,9m-9,0a9,9 0,1 1,18 0a9,9 0,1 1,-18 0" | ||
| android:fillColor="#EEEEF2"/> | ||
| <path | ||
| android:strokeWidth="1" | ||
| android:pathData="M12.469,6L6.469,12" | ||
| android:fillColor="#00000000" | ||
| android:strokeColor="#949399" | ||
| android:strokeLineCap="round"/> | ||
| <path | ||
| android:strokeWidth="1" | ||
| android:pathData="M6.469,6L12.469,12" | ||
| android:fillColor="#00000000" | ||
| android:strokeColor="#949399" | ||
| android:strokeLineCap="round"/> | ||
| </vector> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [ktlint] standard:no-unused-imports reported by reviewdog 🐶
Unused import