Skip to content

[Refactor/#74] Acon 2.0 컴포넌트#80

Merged
ThirFir merged 9 commits intodevelopfrom
refactor/#74-component
Apr 29, 2025
Merged

[Refactor/#74] Acon 2.0 컴포넌트#80
ThirFir merged 9 commits intodevelopfrom
refactor/#74-component

Conversation

@ThirFir
Copy link
Copy Markdown
Collaborator

@ThirFir ThirFir commented Apr 28, 2025

🧨 Issue

💻 Work Description

  • Acon 2.0 컴포넌트 제작
  • 다이얼로그, 텍스트필드, 태그, 버튼

📸 Screenshot

버튼 (Filled)

image

버튼 (Outlined)

image

다이얼로그

image image

태그

image

💭 To Reviewers

  • 버튼, 텍스트필드, 다이얼로그는 이전 컴포넌트들과 헷갈릴 여지가 있어 v2 패키지 아래에 위치시켰습니다.
  • 이후에 2.0 마이그레이션이 완료되면 이전 컴포넌트들을 삭제할 예정입니다.

@ThirFir ThirFir added FEATURE✨ 새로운 기능 구현 REFACTOR🔃 전면 수정 labels Apr 28, 2025
@ThirFir ThirFir self-assigned this Apr 28, 2025
Copy link
Copy Markdown
Member

@1971123-seongmin 1971123-seongmin left a comment

Choose a reason for hiding this comment

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

컴포넌트 하나 하나들이 버릴 곳 없이 확장해서 쓰기가 정말 좋은 완성도 높은 코드라고 생각해요.
고생 많으셨습니다 😋😋

keyboardActions = keyboardActions,
maxLines = 1,
visualTransformation = visualTransformation,
onTextLayout = onTextLayout,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

onTextLayout은 텍스트가 화면에 배치된 결과를 받아서 추가적인 로직을 구현할 수 있는 콜백이라고 하는데 이걸 어떻게 활용할 수 있을지 궁금합니다. (써본적이 없어서..)

Copy link
Copy Markdown
Collaborator Author

@ThirFir ThirFir Apr 29, 2025

Choose a reason for hiding this comment

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

예전에 텍스트 오버플로를 검사하면서 동적으로 폰트 사이즈를 줄일 때 사용하긴 했는데 (이거도 현재는 더 좋은 방법을 제공해줘서 이제 이렇게 안해도 됨),
그 외에는 딱히 실제 사용 사례는 없긴합니다.

다만 오로지 확장성만을 생각하고 매개변수로 넣은 것입니다.

color = AconTheme.color.GlassWhiteDisabled,
),
contentPadding: PaddingValues = PaddingValues(vertical = 12.dp, horizontal = 46.dp),
interactionSource: MutableInteractionSource? = null,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

interactionSource는 컴포넌트와 사용자의 상호작용을 추적하는 데 사용되는 도구,

  • 예를 들어 유저가 버튼 클릭, 터치할 때 발생하는 다양한 상호작용(press, drag 등)을 감지하는 속성이라고 하는데 어떤식으로 활용할 수 있나요>??

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

현재로썬 사용할 수 있는 케이스는 딱히 없는 거 같네여,,
(실제로 사용해 본 적도 없어요... ㅎㅎ)

요것도 그냥 확장성을 생각한 부분이라고 생각해주시면 될거같아용

),
contentPadding: PaddingValues = PaddingValues(vertical = 12.dp, horizontal = 46.dp),
interactionSource: MutableInteractionSource? = null,
content: @Composable() (RowScope.() -> Unit)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

RowScope를 사용하신 이유가 궁금해요.
content로 들어오는 composable이 꼭 Row안에 만들지 않아도 row의 속성을 활용하기 위함?? 이해가 잘 안되네요 ㅠ

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

깊게 이해할 필요없이 (저도 디테일하게는 잘 모름) RowScope는 Row 내부에서 사용할 수 있는 객체입니다. 즉 content가 Row로 감싸져있음을 나타냅니다.

기본 Button 컴포넌트를 확인해보시면, content를 RowScope로 수신 객체로 받습니다.
즉, Button 내부에서 요소들을 수평 방향으로 배치하고자 할 때, 별다른 Row를 내부에 지정해주지 않아도 내부에선 자동으로 수평 배치됩니다.

onDismissRequest = onDismissRequest,
properties = properties,
) {
Surface(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Surface를 사용하신 이유가 궁금합니다 !

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

다이얼로그에서 glassmorphism을 적용하기 위함입니다.
(일반적인 방식으론 제대로 동작하지 않음)

@ThirFir ThirFir merged commit 130fda0 into develop Apr 29, 2025
1 check passed
@ThirFir ThirFir deleted the refactor/#74-component branch April 29, 2025 20:01
ThirFir pushed a commit that referenced this pull request May 1, 2025
ThirFir pushed a commit that referenced this pull request May 1, 2025
…JAM-ANDROID-ACON into feat/#80-login-orbit

# Conflicts:
#	.idea/deploymentTargetSelector.xml
#	app/src/main/java/com/acon/acon/navigation/AconNavigation.kt
#	data/src/main/kotlin/com/acon/data/di/RepositoryModule.kt
ThirFir pushed a commit that referenced this pull request May 1, 2025
[Feat/#80] 로그인 orbit 적용, 스플래시 추가
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FEATURE✨ 새로운 기능 구현 REFACTOR🔃 전면 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor] 컴포넌트 리팩토링

2 participants