Repository navigation
refactor(mindrecord,home): presentation 정리 3종 — 로딩 통합·참조 0건 카드 삭제·no-op 디폴트 50건 (#1540) #1563
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
Sadturtleman
merged 14 commits into
develop
from
refactor/1540-mindrecord-presentation-cleanup
Sep 3, 2026
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c4d2f41
refactor(mindrecord): 로딩 스피너 5곳을 core:ui LoadingBody 로 모은다
Sadturtleman 5ad6679
refactor(mindrecord): 참조 0건 카드 3건을 시안 대조 후 삭제한다
Sadturtleman 20b6d41
refactor(mindrecord,home): no-op 콜백 디폴트 50건을 걷고 가려져 있던 배선 누락 2건을 고친다
Sadturtleman dbb5741
fix(test): 계측·screenshotTest 호출부에도 걷어낸 디폴트를 명시한다
Sadturtleman d4ae742
Merge remote-tracking branch 'origin/develop' into refactor/1540-mind…
Sadturtleman 93ef049
Merge origin/develop into refactor/1540-mindrecord-presentation-cleanup
Sadturtleman e25ae7a
Merge origin/develop into refactor/1540-mindrecord-presentation-cleanup
Sadturtleman 2cbbb16
Merge origin/develop into refactor/1540-mindrecord-presentation-cleanup
Sadturtleman ea3755e
fix(mindrecord): 읽기 전용 카드에 클릭 semantics 를 붙이지 않는다
Sadturtleman 4951c6e
style(mindrecord): 파라미터 KDoc 이 두 겹으로 남은 것을 합친다
Sadturtleman fbd69a1
test(mindrecord): 목록 항목까지 스크롤한 뒤 눌러 달 전달을 검증한다
Sadturtleman 0fd1683
Merge remote-tracking branch 'origin/develop' into refactor/1540-mind…
Sadturtleman 897cade
Merge remote-tracking branch 'origin/develop' into refactor/1540-mind…
Sadturtleman 3948c01
test(mindrecord): develop 에서 온 호출부에도 걷어낸 디폴트를 명시한다 (#1540)
Sadturtleman 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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,10 +50,17 @@ private val DateFormatter = DateTimeFormatter.ofPattern("yyyy.MM.dd") | |
| fun DailyQuestionListCard( | ||
| answer: DailyQuestion, | ||
| modifier: Modifier = Modifier, | ||
| /** 카드 전체 탭 — 저장된 기록 본문을 여는 상세 화면으로 간다 (#759). */ | ||
| onClick: () -> Unit = {}, | ||
| onEdit: () -> Unit = {}, | ||
| onDelete: () -> Unit = {}, | ||
| /** | ||
| * 카드 전체 탭 — 저장된 기록 본문을 여는 상세 화면으로 간다 (#759). | ||
| * | ||
| * **`null` 이면 클릭 자체를 붙이지 않는다** (#1540 리뷰). | ||
| * | ||
| * no-op 을 넘기면 `Role.Button` 이 그대로 실려 스크린리더가 「버튼」으로 읽는데 눌러도 | ||
| * 아무 일이 없다 — 읽기 전용으로 쓰는 자리(주간 리포트 HISTORY)가 그랬다. | ||
| */ | ||
| onClick: (() -> Unit)?, | ||
| onEdit: (() -> Unit)?, | ||
| onDelete: (() -> Unit)?, | ||
| ) { | ||
| OutlinedCard( | ||
| colors = | ||
|
|
@@ -62,7 +69,10 @@ fun DailyQuestionListCard( | |
| ), | ||
| border = BorderStroke(1.dp, color = AfternoteDesign.colors.gray2), | ||
| shape = CardShape, | ||
| modifier = modifier.fillMaxWidth().clickable(role = Role.Button, onClick = onClick), | ||
| modifier = | ||
| modifier | ||
| .fillMaxWidth() | ||
| .then(if (onClick != null) Modifier.clickable(role = Role.Button, onClick = onClick) else Modifier), | ||
| ) { | ||
| if (answer.imageUrl != null) { | ||
| ThumbnailCardContent(answer = answer, onEdit = onEdit, onDelete = onDelete) | ||
|
|
@@ -76,8 +86,8 @@ fun DailyQuestionListCard( | |
| @Composable | ||
| private fun TextCardContent( | ||
| answer: DailyQuestion, | ||
| onEdit: () -> Unit, | ||
| onDelete: () -> Unit, | ||
| onEdit: (() -> Unit)?, | ||
| onDelete: (() -> Unit)?, | ||
| ) { | ||
| Column( | ||
| modifier = Modifier.padding(16.dp), | ||
|
|
@@ -106,8 +116,8 @@ private fun TextCardContent( | |
| @Composable | ||
| private fun ThumbnailCardContent( | ||
| answer: DailyQuestion, | ||
| onEdit: () -> Unit, | ||
| onDelete: () -> Unit, | ||
| onEdit: (() -> Unit)?, | ||
| onDelete: (() -> Unit)?, | ||
| ) { | ||
| Row( | ||
| modifier = Modifier.padding(12.dp), | ||
|
|
@@ -149,8 +159,8 @@ private fun ThumbnailCardContent( | |
| @Composable | ||
| private fun CardHeaderRow( | ||
| date: LocalDate, | ||
| onEdit: () -> Unit, | ||
| onDelete: () -> Unit, | ||
| onEdit: (() -> Unit)?, | ||
| onDelete: (() -> Unit)?, | ||
| ) { | ||
| var menuExpanded by remember { mutableStateOf(false) } | ||
|
|
||
|
|
@@ -172,28 +182,35 @@ private fun CardHeaderRow( | |
| ) | ||
| } | ||
|
|
||
| Box { | ||
| Icon( | ||
| painter = painterResource(R.drawable.mindrecord_horizontal), | ||
| tint = AfternoteDesign.colors.gray5, | ||
| contentDescription = stringResource(R.string.mindrecord_more_menu_cd), | ||
| modifier = | ||
| Modifier | ||
| .size(20.dp) | ||
| .clickable(role = Role.Button) { menuExpanded = true }, | ||
| ) | ||
| if (menuExpanded) { | ||
| RecordActionPopup( | ||
| onDismiss = { menuExpanded = false }, | ||
| onDelete = { | ||
| menuExpanded = false | ||
| onDelete() | ||
| }, | ||
| onEdit = { | ||
| menuExpanded = false | ||
| onEdit() | ||
| }, | ||
| // **핸들러가 없으면 «더보기» 자체를 그리지 않는다** (#1540). | ||
| // | ||
| // 종전에는 `= {}` 디폴트라, 핸들러를 안 넘긴 화면(주간 리포트 HISTORY)에서도 메뉴가 | ||
| // 뜨고 «수정»·«삭제» 를 눌러도 아무 일이 없었다. 눌러도 아무 일 없는 버튼을 그리는 | ||
| // 대신 없는 상호작용은 보여 주지 않는다. | ||
| if (onEdit != null && onDelete != null) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nit] |
||
| Box { | ||
| Icon( | ||
| painter = painterResource(R.drawable.mindrecord_horizontal), | ||
| tint = AfternoteDesign.colors.gray5, | ||
| contentDescription = stringResource(R.string.mindrecord_more_menu_cd), | ||
| modifier = | ||
| Modifier | ||
| .size(20.dp) | ||
| .clickable(role = Role.Button) { menuExpanded = true }, | ||
| ) | ||
| if (menuExpanded) { | ||
| RecordActionPopup( | ||
| onDismiss = { menuExpanded = false }, | ||
| onDelete = { | ||
| menuExpanded = false | ||
| onDelete() | ||
| }, | ||
| onEdit = { | ||
| menuExpanded = false | ||
| onEdit() | ||
| }, | ||
| ) | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -210,6 +227,9 @@ private fun DailyQuestionCardPreview() { | |
| content = "아무 말 없이 그저 나의 곁을 지켜주는 아내가 고맙다.", | ||
| date = LocalDate.now(), | ||
| ), | ||
| onClick = {}, | ||
| onDelete = {}, | ||
| onEdit = {}, | ||
| ) | ||
| } | ||
| } | ||
|
|
@@ -226,6 +246,9 @@ private fun DailyQuestionCardWithImagePreview() { | |
| date = LocalDate.now(), | ||
| imageUrl = "https://example.com/image.jpg", | ||
| ), | ||
| onClick = {}, | ||
| onDelete = {}, | ||
| onEdit = {}, | ||
| ) | ||
| } | ||
| } | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.
[nit] 이 절은 «더보기» 숨김만 적고, 재리뷰에서 추가된 카드 탭(#759 상세 이동)도 안 붙인다는 판단은
WeeklyReportScreen.kt주석에만 있습니다. 나중에 「주간 리포트에서 상세로 못 가네」가 나올 때 문서 근거가 되도록 한 줄 보태 주세요.