-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/#111 news notice UI #116
Conversation
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.
๋์ถฉ ์ค๋ช ๋๋ ธ๋๋ฐ ์์ฒญ ์ํ์ จ๋ค์ ์งฑ!
val parentNavController = requireParentFragment().findNavController() | ||
val action = NewsFragmentDirections.actionNavigationNewsToNavigationNewsDetail(notice) | ||
parentNavController.navigate(action) |
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.
์ parent๊ฑฐ ๊ฐ์ ธ์ค๋ ๋ฒ์ ์ฒ์์์๋ค์ ์งฑ!
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.
ํ๋์ด๋ค๊ฐ.. ์ฌ์ฉํด๋ณด์์ด๋ค
feature/news/src/main/java/com/teamwable/news/notice/NewsNoticeItem.kt
Outdated
Show resolved
Hide resolved
@RequiresApi(Build.VERSION_CODES.O) | ||
@Composable | ||
fun NewsNoticeItem(context: Context, data: NewsInfoModel, navigateToDetail: (NewsInfoModel) -> Unit) { | ||
Box(modifier = Modifier.clickable { navigateToDetail(data) }) { |
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.
p1 : ์ฐ๋ฆฌ๋ ๋ฐ๋ก ๋ฆฌํ ํจ๊ณผ๊ฐ ์๊ธฐ ๋๋ฌธ์
package com.teamwable.designsystem.extension.modifier
์ฌ๊ธฐ์ noRippleDebounceClickable ํ์ฅํจ์๋ฅผ ๋ง๋ค์๋๋ฐ ์ด๊ฑฐ ์ฌ์ฉํด์ฃผ์ธ์!
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.
์ฃ์กํฉ๋๋ค ์ด๊ฑธ ์ฐ๋ฉด pointerInteropFilter๊ฐ lazycolumn์ ์คํฌ๋กค ๋ชจ์ ์ ๋ฐฉํดํด์ ๋ฌด์กฐ๊ฑด ํฐ์น๋ง ๋๊ณ ๋ค์ํ๋ฉด์ผ๋ก ๋์ด๊ฐ๊ฒ ๋๋ค์ noRippleClickable์ด๋ ๊ทธ๋ฅ clickable ์จ๋ ์ข์๊ฒ ๊ฐ์์!
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.
์คํธ๋ผ ๊ทธ๋ ๊ตฐ์..
) { | ||
val context = LocalContext.current | ||
|
||
viewModel.dummyNotice.apply { |
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.
p1 :์ด๊ฑด ์ถํ์ ์๋ฒํต์ ํ๋ฉด์ state๋ฅผ collectํ๋ ๋ฐฉ์์ผ๋ก ๋ฐ๊พธ์ด์ฃผ์ธ์!
val showEmptyText by viewModel.showDialog.collectAsStateWithLifecycle()
์ด๋ฐ์์ผ๋ก์! ๋ค์ด๋ฐ์ ์์๋ฑ๊ฐ์ผ์ผ๋ก~
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.
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.
ImmutableList์ PersistentList๋ฅผ ์ฌ์ฉ๊ฐ๋ฅํ๋๋ก ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ค์น ํด๋์์ต๋๋ค~
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.
๋น ์๋ฒํต์ ํ ๋ ์ ์ฉํด๋ณผ๊ฒ์ฉ ^.<
feature/news/src/main/java/com/teamwable/news/notice/NewsNoticeItem.kt
Outdated
Show resolved
Hide resolved
) { | ||
Box(modifier = Modifier.fillMaxSize()) { | ||
LazyColumn(modifier = Modifier.fillMaxSize()) { | ||
items(notices) { notice -> |
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.
p1 :
items(notices) { notice -> | |
items(items = notices, key = {item -> item.id}) { |
์ด๋ฐ์์ผ๋ก LazyColumn์์๋ key๋ฅผ ๋ช ์ํด์ฃผ์ด์ผ ์คํฌ๋กค ์์ ์ฌ์ฌ์ฉ ๋๋ ์ปดํฌ์ ๋ธ ๋ทฐ(item)์ด stable๋ก ์ธ์ํ๊ณ ๋ฆฌ์ปดํฌ์ง์ ์ ์ ๋ฐํ์ง ์๋ ๊ฒ์ผ๋ก ์๊ณ ์์ด์!
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.
๊ทธ๋ฆฌ๊ณ ์ฌ๊ธฐ์ Box์ LazyColuunm๋ชจ๋ fillMaxSize()๊ฐ ๋์ด์๋๋ฐ fillMaxWidth()๋ฅผ ์ฌ์ฌ์ฉ๊ฐ๋ฅํ ์ปดํฌ์ ๋ธ์ ์ ์ฉํ๊ฒ ๋๋ฉด ์ฌ์ฌ์ฉ ๊ฐ๋ฅํ ์ปดํฌ์ ๋ธ์ ๋ถ๋ชจ๋ ์ด์์์ ํญ์ ์ ์ฒด ๋๋น๋ฅผ ์ฐจ์งํ๋ฏ๋ก ์์ผ๋ก ๋ฐฐ์นํ๋ค๊ฑฐ๋, ํฌ๊ธฐ๋ฅผ ์กฐ์ ๊ฐ๋ฅํ ์ ์ฐ์ฑ์ ์์ ์ ์์ด์!
์ฌ์ฌ์ฉ ๊ฐ๋ฅํ ์ปดํฌ์ ๋ธ์์๋ ์ต์์ ๋ ๋ฒจ์ ํฌ๊ธฐ๋ฅผ ๊ฐ์ ํ๋ Modifier๋ฅผ ์๋ตํ๊ณ , ํฌ๊ธฐ ๊ด๋ จ Modifier๋ ํธ์ถ ์์ ์ ์ธ๋ถ์์ ์ ๊ณตํ๋๊ฒ์ด ๋ซ์ต๋๋ค.
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.
๋ฐฐ์ฐจ์์ฐ ๊ทธ๋ ์ด์ ์ปดํฌ์ฆ ์ฅ์ธ์ด ๋์ด ๋ฒ๋ ธ๋ค ..
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.
์ ๋ง์์ 34๊ธฐ์ ๋ค์๋ ๊ธฐ์ต์ด ์๋๋ฐ
์ ๋ถํ์ํ ์ปดํฌ์ง์
์ด ๋๋ฌด ์ซ์ด์... ๊ทผ๋ฐ ์ค์ด๋๊ฒ ๋๋ฌด ๋นก์
^^;
์ข์ ์๋ฃ ๊ฐ์ฌํด์ฉ ๊ตฟ
feature/news/src/main/java/com/teamwable/news/notice/NewsNoticeRoute.kt
Outdated
Show resolved
Hide resolved
feature/news/src/main/java/com/teamwable/news/notice/NewsNoticeFragment.kt
Show resolved
Hide resolved
) { | ||
Box(modifier = Modifier.fillMaxSize()) { | ||
LazyColumn(modifier = Modifier.fillMaxSize()) { | ||
items(notices) { notice -> |
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.
๋ฐฐ์ฐจ์์ฐ ๊ทธ๋ ์ด์ ์ปดํฌ์ฆ ์ฅ์ธ์ด ๋์ด ๋ฒ๋ ธ๋ค ..
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.
์๊ณ ํ์ด๋ฅ!
feature/news/src/main/java/com/teamwable/news/notice/NewsNoticeRoute.kt
Outdated
Show resolved
Hide resolved
๊ณ ์ํ๋ค !!! LGTM ๊ธฐ๋จผ์ง ๐ฏ |
โ ๐๐ต๐ฒ๐ฐ๐ธ-๐๐ถ๐๐
๐ ๐๐๐๐๐ฒ๐
๐๐ช๐ผ๐ฟ๐ธ ๐๐ฒ๐๐ฐ๐ฟ๐ถ๐ฝ๐๐ถ๐ผ๐ป
๐ท ๐ฆ๐ฐ๐ฟ๐ฒ๐ฒ๐ป๐๐ต๐ผ๐
2024-11-24.5.41.04.mov
๐ฌ ๐ง๐ผ ๐ฅ๐ฒ๐๐ถ๐ฒ๐๐ฒ๐ฟ๐
๊ท์ฐฎ์์ ์์ ์์๋ฅด๊ณ ํ๋๋ ์ข ๊ธธ์ด์ฌ..