Skip to content

[Campus][Refactor] 메인 화면 식단을 Compose로 리팩토링 #660

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

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

kongwoojin
Copy link
Collaborator

close #659

개요

  • 메인 화면 식단을 Compose로 리팩토링

작업 내용

  • 메인 화면의 식단 위젯을 Compose로 리팩토링 했습니다.
  • Balloon compose 버전을 추가했습니다.
  • onboardingManager애서 createTooltip 함수를 createTooltip과 createBuilder로 분리했습니다.
  • ShowOnboardingTooltipIfNeeded Composable을 추가했습니다. 기존의 showOnboardingTooltipIfNeeded를 대체합니다.
  • 사용하지 않게 된 기존의 식단 코드를 삭제했습니다.

@kongwoojin kongwoojin self-assigned this May 9, 2025
@kongwoojin kongwoojin requested a review from a team as a code owner May 9, 2025 06:04
@github-actions github-actions bot added the refactor Code refactoring label May 9, 2025
@github-actions github-actions bot requested a review from jusang3057 May 9, 2025 06:05
diningComposeView.apply {
setContent {
KoinTheme {
val diningData by viewModel.diningData.collectAsState()
Copy link
Contributor

Choose a reason for hiding this comment

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

collectAsStateWithLifecycle을 사용하지 않은 이유가 있나여 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

수정하겠습니다!

Comment on lines +8 to +15

composeOptions {
kotlinCompilerExtensionVersion = "1.5.10"
}

buildFeatures {
compose = true
}
Copy link
Contributor

Choose a reason for hiding this comment

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

build-logic에 compose plugin이 정의되어 있는 거로 아는데, 활용되어도 좋을 거 같아여

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

오... 수정하겠습니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

library가 아니라 application 모듈용 플러그인이라, 사용이 불가한 것 같습니다!

Copy link
Contributor

Choose a reason for hiding this comment

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

아하 나중에 라이브러리용으로도 추가되면 좋겠네여~

Comment on lines 78 to 86
EventLogger.logClickEvent(
EventAction.CAMPUS,
AnalyticsConstant.Label.MAIN_MENU_MOVEDETAILVIEW,
"${
context.getString(
if (type == DiningType.NextBreakfast) R.string.dining_tomorrow else R.string.dining_today
)
} ${context.getString(R.string.navigation_item_dining)}"
)
Copy link
Contributor

Choose a reason for hiding this comment

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

이 로깅은 혹시 왜 이 위치에 있나요 ??

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

이 위치가 맞는 것 같아서 여기에 두었습니다! 혹시 다른 위치가 적합할까요?

Copy link
Contributor

Choose a reason for hiding this comment

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

어떤 로깅인지 정확힌 모르겠지만... 리컴포지션마다 실행될 수 있을 것 같아서요!!
LaunchedEffect 같은 곳으로 옮기는 게 어떨까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

수정했습니다!

Text(
modifier = Modifier.padding(start = 20.dp),
text = "${
context.getString(
Copy link
Contributor

Choose a reason for hiding this comment

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

stringResource를 사용하시지 않은 이유가 있나요 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

이건... 밤 새다가 정신줄을 놓았네요
수정하겠습니다!

Comment on lines 176 to 180
.clickable {
Intent(context, DiningActivity::class.java).let {
context.startActivity(it)
}
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Card 자체에 있는 onClick 매개변수를 써도 좋을듯해용

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

수정하겠습니다!

fun DiningContent(
diningData: Dining,
selectedType: DiningType,
modifier: Modifier = Modifier
Copy link
Contributor

Choose a reason for hiding this comment

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

이 Modifier는 안쓰이고 있는거 같아요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

수정하겠습니다!

@KYM-P KYM-P added the campus BCSD campus ream label May 22, 2025
@kongwoojin kongwoojin linked an issue Jun 19, 2025 that may be closed by this pull request
2 tasks
@kongwoojin kongwoojin marked this pull request as draft June 22, 2025 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
campus BCSD campus ream refactor Code refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Campus] 메인 화면 식단을 Compose로 리팩토링
3 participants