Skip to content
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

πŸš€ 4단계 - μž₯λ°”κ΅¬λ‹ˆ(μˆ˜λŸ‰) #70

Open
wants to merge 85 commits into
base: s9hn
Choose a base branch
from

Conversation

s9hn
Copy link

@s9hn s9hn commented Sep 2, 2024

πŸ“Žπ˜žπ˜°π˜³π˜¬ π˜‹π˜¦π˜΄π˜€π˜³π˜ͺ𝘱𝘡π˜ͺ𝘰𝘯

  • μƒν’ˆ λͺ©λ‘μ—μ„œ μž₯λ°”κ΅¬λ‹ˆμ— 담을/λ‹΄κΈ΄ μƒν’ˆμ˜ μˆ˜λŸ‰μ„ μ‘°μ ˆν•  수 μžˆλ‹€.
  • μ•„μ΄μ½˜μ„ λˆ„λ₯΄λ©΄ μž₯λ°”κ΅¬λ‹ˆμ— μƒν’ˆμ΄ 좔가됨과 λ™μ‹œμ— μˆ˜λŸ‰ 쑰절 λ²„νŠΌμ΄ λ…ΈμΆœλœλ‹€.
  • μƒν’ˆ λͺ©λ‘μ˜ μƒν’ˆ μˆ˜κ°€ λ³€ν™”ν•˜λ©΄ μž₯λ°”κ΅¬λ‹ˆμ—λ„ λ°˜μ˜λ˜μ–΄μ•Ό ν•œλ‹€. (B마트 UX μ°Έκ³ )
  • μž₯λ°”κ΅¬λ‹ˆμ˜ μƒν’ˆ μˆ˜κ°€ λ³€ν™”ν•˜λ©΄ μƒν’ˆ λͺ©λ‘μ—λ„ λ°˜μ˜λ˜μ–΄μ•Ό ν•œλ‹€. (B마트 UX μ°Έκ³ )

πŸ“·π˜šπ˜€π˜³π˜¦π˜¦π˜―π˜΄π˜©π˜°π˜΅

22.webm

πŸ’¬π˜›π˜° π˜™π˜¦π˜·π˜ͺ𝘦𝘸𝘦𝘳𝘴

ν—ˆν—ˆ....... 2024λ…„ κ°€μž₯ λ°”μœ 2μ£Όλ₯Ό 보내고 λŒμ•„μ™”μλ‹ˆλ‹€.. μ˜€λžœλ§Œμ— μ»΄ν¬μ¦ˆν•˜λ‹ˆκΉŒ λ„ˆλ¬΄ μž¬λ°Œμ–΄μš” πŸ˜‚

Q. IconButton λ‚΄λΆ€λ₯Ό λ³΄μ•˜λŠ”λ° Box둜 ν•œλ²ˆ λž˜ν•‘λ˜μ–΄μžˆκ³ , κ²°κ΅­ Box에 Clickable λ©”μ„œλ“œλ₯Ό κ΅¬ν˜„ν•˜κ³  μžˆλŠ”λ° Icon보닀 μ„ ν˜Έν•˜μ‹œλŠ” μ΄μœ κ°€ μžˆμœΌμ‹ κ°€μš”?
CompositionLocalProviderλ₯Ό ν†΅ν•œ μ–΄λ–€ 클릭 이벀트 μ΅œμ ν™”κ°€ λ˜μ–΄μžˆλ‚˜μš”?

μ΄λ²ˆμ—” μ œκ°€ μ§ˆλ¬Έμ„ λ“œλ¦¬κ² μŠ΅λ‹ˆλ‹€ γ…Žγ…Ž
νŒŒλΌλ―Έν„°λ‘œ String을 λ°›λŠ” 것과 idλ₯Ό λ°›λŠ” 것 쀑 μ–΄λ–€ 것이 더 μ μ ˆν•˜λ‹€κ³  μƒκ°ν•˜μ‹œλ‚˜μš”?

idλŠ” λ¦¬μ†ŒμŠ€μ•„μ΄λ””λ₯Ό λ§ν•˜λŠ”κ±ΈκΉŒμš”?
λ¦¬μ†ŒμŠ€ 아이디라면 ν•΄λ‹Ή μ»΄ν¬λ„ŒνŠΈλ§Œ μ‚¬μš©ν•  λ¬Έμžμ—΄ κ°’μ΄λ‹ˆκΉŒ μ»΄ν¬λ„ŒνŠΈ λ‚΄λΆ€κ°€ μ μ ˆν•˜λ‹€κ³  μƒκ°ν•©λ‹ˆλ‹€!
ν•΄λ‹Ή String 값을 λ“€κ³  μžˆλŠ” μ–΄λ–€ μƒνƒœκ°’μ˜ idλ₯Ό λ§μ”€ν•˜μ‹ κ±°λΌλ©΄,, μ „ Composable μ»΄ν¬λ„ŒνŠΈλ“€μ€ μ§„μ§œ UI 껍데기 κ·Έ 자체둜 μƒκ°ν•˜κΈ°λ•Œλ¬Έμ— idλΌλŠ” 값보단 μ‚¬μš©μžμ—κ²Œ 보여져야할 λ¬Έμžμ—΄ κ°’λ§Œ μ•Œκ³  μžˆμ–΄λ„ μΆ©λΆ„ν•  것 κ°™μ•„μš”!

ν…ŒμŠ€νŠΈ μ½”λ“œμΈ 만큼 testTagλ₯Ό λΆ€μ—¬ν•˜μ—¬ μ˜λ„ν•œ μƒν’ˆ μ‚­μ œλœ 것이 λ§žλŠ”μ§€ μ •ν™•ν•˜κ²Œ 확인해봐도 쒋을 것 κ°™μ•„μš”

κ°•μ˜μ—μ„œ λ§μ”€ν•΄μ£Όμ…¨λ˜λŒ€λ‘œ μ‹€μ œ μ½”λ“œμ— testλ§Œμ„ μœ„ν•œ νƒœκ·Έλ₯Ό ν‘œκΈ°ν•΄μ£ΌλŠ” 게 λ§ˆμŒμ— μ•ˆλ“€μ—ˆμ”λ‹ˆλ‹€! κ·Έλž˜μ„œ λͺ¨λ‘ description으둜 ν†΅μΌν•œ μ΄μœ μ΄κΈ°λ„ ν•©λ‹ˆλ‹€!

였래 κΈ°λ‹€λ €μ£Όμ…”μ„œ κ°μ‚¬ν•˜κ³  μ£„μ†‘ν•©λ‹ˆλ‹€!
κΌ­ λκΉŒμ§€ μ™„μˆ˜ν•˜κ² μŠ΅λ‹ˆλ‹€ :)

s9hn added 30 commits August 17, 2024 14:08
s9hn added 28 commits August 21, 2024 14:54
@s9hn s9hn changed the title Step4 πŸš€ 4단계 - μž₯λ°”κ΅¬λ‹ˆ(μˆ˜λŸ‰) Sep 2, 2024
Copy link
Member

@wisemuji wisemuji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ•ˆλ…•ν•˜μ„Έμš” μ„Έν›ˆλ‹˜! μ•„μ£Ό λ°”μœ 주간을 보내고 μ˜€μ…¨κ΅°μš” γ…‹γ…‹γ…‹
직전 단계 리뷰 반영과 μš”κ΅¬ 사항 κ΅¬ν˜„μ„ λ„ˆλ¬΄ 잘 ν•΄μ£Όμ…¨μŠ΅λ‹ˆλ‹€ πŸ’―
직전 λ‹¨κ³„κΉŒμ§€ ꡬ쑰λ₯Ό 잘 μ„€κ³„ν•΄μ£Όμ…”μ„œ 이번 λ‹¨κ³„λŠ” 크게 λ“œλ¦΄ ν”Όλ“œλ°±μ΄ μ—†μ—ˆλŠ”λ°μš”,

ν”Όλ“œλ°± 반영 이후에 νŠΉλ³„νžˆ 도전해보고 μ‹ΆμœΌμ‹  게 μ—†μœΌμ‹œλ‹€λ©΄ λ‹€μŒ 리뷰 μš”μ²­μ—μ„œ λ―Έμ…˜μ„ λ§ˆλ¬΄λ¦¬ν•˜κ² μŠ΅λ‹ˆλ‹€ πŸ™‚

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q. IconButton λ‚΄λΆ€λ₯Ό λ³΄μ•˜λŠ”λ° Box둜 ν•œλ²ˆ λž˜ν•‘λ˜μ–΄μžˆκ³ , κ²°κ΅­ Box에 Clickable λ©”μ„œλ“œλ₯Ό κ΅¬ν˜„ν•˜κ³  μžˆλŠ”λ° Icon보닀 μ„ ν˜Έν•˜μ‹œλŠ” μ΄μœ κ°€ μžˆμœΌμ‹ κ°€μš”? CompositionLocalProviderλ₯Ό ν†΅ν•œ μ–΄λ–€ 클릭 이벀트 μ΅œμ ν™”κ°€ λ˜μ–΄μžˆλ‚˜μš”?

κ°€μž₯ 큰 효과라고 ν•œλ‹€λ©΄ Material λ””μžμΈ κ°€μ΄λ“œμ—μ„œ μ΄μ•ΌκΈ°ν•˜λŠ” λͺ…μ‹œμ μΈ 역할을 κ°€μž₯ μ‰½κ²Œ κ΅¬ν˜„ν•˜λ„λ‘ λ„μ™€μ£ΌλŠ” 것이라고 ν•  수 μžˆκ² λ„€μš”.
https://m3.material.io/components/icon-buttons

예λ₯Ό λ“€μ–΄ Divider도 λ‚΄λΆ€μ—μ„œ Boxλ₯Ό κ΅¬ν˜„ν•˜κ³  μžˆλŠ”λ°μš”, Boxλ₯Ό Modifier둜 μ‘°μž‘ν•˜λŠ” 것과 λ‹€λ₯΄μ§€ μ•Šλ‹€κ³  생각할 수 μžˆμ§€λ§Œ
λͺ…μ‹œμ μœΌλ‘œ λ ˆμ΄μ•„μ›ƒμ„ λ‚˜λˆ„λŠ” 데에 ν™œμš©ν•˜λŠ” μ»΄ν¬λ„ŒνŠΈλ₯Ό ν™œμš©ν•˜λŠ” 것을 더 μ„ ν˜Έν•©λ‹ˆλ‹€.

A divider is a thin line that groups content in lists and layouts.

import org.junit.Rule
import org.junit.Test

class ShoppingListScreenTest {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

의미 μžˆλŠ” μ‹œλ‚˜λ¦¬μ˜€λ₯Ό 정말 잘 λ„μΆœν•΄μ£Όμ…¨λ„€μš” πŸ‘
이제 ν…ŒμŠ€νŠΈλŠ” 더 ν”Όλ“œλ°± μ•ˆ λ“œλ €λ„ λ˜κ² μ–΄μš”~

// given:
composeTestRule.apply {
setContent {
ShoppingProductHeader(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HeaderλΌλŠ” 이름은 보톡 νŽ˜μ΄μ§€ 상단에 μžˆλŠ” 전체적인 머릿글을 일컬을 λ•Œ μ‚¬μš©ν•˜κ³€ ν•˜λŠ”λ°μš”, 더 μ μ ˆν•œ 이름이 μžˆμ„κΉŒμš”?


@Composable
fun ShoppingListRoute(
onShoppingCartClick: () -> Unit,
onItemClick: (productId: Long) -> Unit,
) {
val products = dummyProducts
var products by remember { mutableStateOf(dummyProducts.updateProducts()) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이미 잘 μ•Œκ³  κ³„μ‹œκ² μ§€λ§Œ μ§€κΈˆμ˜ μ €μž₯μ†ŒλŠ” μƒνƒœ 관리 μΈ‘λ©΄μ—μ„œ μ „μ—­μœΌλ‘œ κ΄€λ¦¬λ˜μ–΄ λ‚˜μ€‘μ— 큰 문제둜 μ΄μ–΄μ§ˆ 수 μžˆμŠ΅λ‹ˆλ‹€.

μ΄μ–΄μ§€λŠ” λ―Έμ…˜λ“€μ—μ„œ μ΄λŸ¬ν•œ μƒνƒœ 관리λ₯Ό 더 μœ μ§€λ³΄μˆ˜ κ°€λŠ₯ν•˜κ²Œ λ§Œλ“œλŠ” 방법에 λŒ€ν•΄ λ‹€λ£¨κ²Œ λ κ±°μ˜ˆμš” πŸ™‚

import org.junit.Rule
import org.junit.Test

class ShoppingProductHeaderTest {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 ν…ŒμŠ€νŠΈ μ‹œλ‚˜λ¦¬μ˜€μ— λŒ€ν•΄ μ»΄ν¬λ„ŒνŠΈμ˜ Previewλ‘œλ„ λ…ΈμΆœν•΄λ³΄λ©΄ μ–΄λ–¨κΉŒμš”? PreviewParameterλ₯Ό ν™œμš©ν•΄λ³Ό 수 μžˆμ„ 것 κ°™μ•„μš”!

product = product,
modifier = Modifier.size(size = 156.dp),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ„Έν›ˆλ‹˜μ€ μ΄λŸ¬ν•œ Modifier의 λ‚΄λΆ€μ—μ„œ μΊ‘μŠν™”λ˜μ–΄μ•Ό ν•˜λŠ” 속성과 μ™ΈλΆ€μ—μ„œ μ£Όμž…λ˜μ–΄μ•Ό ν•˜λŠ” 속성을 μ–΄λ–»κ²Œ κ΅¬λΆ„ν•˜μ‹œλ‚˜μš”?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants