Skip to content

Scaffold 구현#15

Open
kangyuri1114 wants to merge 8 commits intomainfrom
feature/rein/scaffold
Open

Scaffold 구현#15
kangyuri1114 wants to merge 8 commits intomainfrom
feature/rein/scaffold

Conversation

@kangyuri1114
Copy link
Member

@kangyuri1114 kangyuri1114 commented Oct 29, 2024

작업 내용

Scaffold 구현

Preview 사진

image
아직 component들이 구현 중이라 색상으로 대체했습니다.

구성요소

  • TopBar
  • BottomBar
  • FAB (우측하단 고정위치)
  • SnackBar

옵션 설명

그려지는 순서
semantic의 traversalIndex값이 작은 순서대로
topBar -> bottomBar -> content -> FAB -> snackBar

*padding값
화면에서의 padding values -> object로 관리

snackBar : horizontal 16.dp, bottom 16.dp
FAB : end 16.dp, bottom 32.dp
(SnackBar가 FAB보다 상단에 있어야 함)

2025.04.08 업데이트

스크린샷 2025-04-08 오후 12 50 32
  • 모든 컴포넌트가 항상 있으리라는 법이 없어 적절하 preview 케이스를 추가했습니다
  • mainContentPlaceable의 content padding value 동적으로 수정
  • 코드리뷰를 반영했습니다
  • 질문이나 또다른 리뷰 있으시면 부탁드려요!!

@kangyuri1114 kangyuri1114 self-assigned this Oct 29, 2024
Copy link
Member

@cometj03 cometj03 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다~ 추가로 PR 설명에 적어주신 내용이 주석에도 포함되면 좋을 것 같아요! (그려지는 순서에 대한 설명)

Comment on lines +139 to +142
val bottomBarVerticalOffset = layoutHeight - bottomBarPlaceable.height
val fabVerticalOffset =
bottomBarVerticalOffset - fabPlaceable.height - fabBottomMarginPxValue
val snackBarVerticalOffset = fabVerticalOffset - snackBarPlaceable.height - snackBarPxValue
Copy link
Member

Choose a reason for hiding this comment

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

fab이 없을 땐 fabVerticalOffset이 bottomBarVerticalOffset과 같아야 할 것 같아요.

쉽게 설명하자면 지금 상황에서 fab이 없을 때 snackBar가 어디에 배치될지 생각해보심 됩니다. 아마 생각보다 높은 곳에 배치될거예요. (fab 마진 + snackBar 마진 만큼)

Copy link
Member

Choose a reason for hiding this comment

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

@kangyuri1114
업데이트 해주신 프리뷰 확인했어요. 근데 FAB랑 SnackBar가 같이 있는 경우에는 SnackBar가 FAB 위에 그려지는 게 맞지 않을까요? 가장 처음에 첨부해주신 프리뷰처럼요
image


val snackBarPlaceable = subcompose(ScaffoldLayoutContent.Snackbar) {
Box(modifier = Modifier
.padding()
Copy link
Member

Choose a reason for hiding this comment

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

이거 padding(horizontal = 0.dp, vertical = 0.dp)랑 같은거 맞을까요? 그렇다면 없어도 될 것 같습니다!

@cometj03 cometj03 requested review from cometj03 and leeeyubin April 8, 2025 04:27
Comment on lines +160 to +164
object ScaffoldSpacingValues {
val FabBottomSpacing = 32.dp
val FabEndSpacing = 16.dp
val SnackBarBottomSpacing = 16.dp
}
Copy link
Member

Choose a reason for hiding this comment

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

ScaffoldLayoutContent 이넘클래스는 private인데 ScaffoldSpacingValues는 아닌 이유가 궁금해졌어요...!

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.

3 participants