-
Notifications
You must be signed in to change notification settings - Fork 0
fix: 채팅방 UI 개선 및 토큰 사용량 알림 토스트 전환 #60
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
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
e4c2aaf
fix: TopNavigation 메뉴 아이콘 설정 아이콘으로 변경
seunghee17 07dc67f
fix: TopNavigation 메뉴 아이콘 설정 아이콘으로 변경
seunghee17 cb5041b
feat: 스낵바 컴포넌트 추가
seunghee17 869bb82
feat: 채팅방 진입 애니메이션 안끊기도록 개선
seunghee17 b034f71
feat: 토큰 사용량 10% 미만·소진 알림을 전역 1회로 통합
seunghee17 fd39936
feat: 채팅방 빈 화면 탭할때 키보드 내려가는 동작 추가
seunghee17 ac0e2cf
fix: 현재 화면에 보이는 메시지가 키보드 스크롤에 의해 가려지지 않도록 수정
seunghee17 d0a6ca2
fix: 토큰 소모 스낵바 표시 위치 변경
seunghee17 86a805f
fix: 대화 목록 손그림 시안 적용 및 디자인 반영
seunghee17 0ccdfd4
fix: 대화목록 헤더 컬러값 변경
seunghee17 2241626
Merge remote-tracking branch 'origin/develop' into fix/chatting-room-ui
seunghee17 d026c80
Merge remote-tracking branch 'origin/develop' into fix/chatting-room-ui
seunghee17 8121cab
fix: 채팅방 텍스트 필드 테두리 손그림 시안 적용 및 세부 디자인 수정
seunghee17 6113dd7
chore: 주석 삭제
seunghee17 f167543
feat: 토큰 소모 알림을 스낵바에서 토스트로 전환하고 전송 버튼 잠금 추가
seunghee17 a9f92cd
fix: 토큰 소진 토스트를 하루 1회로 제한하고 소진 시 입력창 잠금 추가
seunghee17 a68e7a8
fix: 토큰 소진 시 canSend에서도 전송을 막도록 방어 추가
seunghee17 9ac7f80
chore: detekt 정렬 수정
seunghee17 8d340db
fix: 메시지 전송 시 서버 응답을 기다리지 않고 입력칸을 즉시 비움
seunghee17 302b6e1
Merge remote-tracking branch 'origin/develop' into fix/chatting-room-ui
seunghee17 99408ae
fix: 아이콘명 불일치 문제 해결
seunghee17 ca87d15
Merge remote-tracking branch 'origin/develop' into fix/chatting-room-ui
seunghee17 4a42526
chore: 미사용 함수 제거
seunghee17 abb9bfd
fix: IME 인셋 보정 스크롤이 다른 스크롤에 뮤텍스를 뺏겨도 멈추지 않도록 수정
seunghee17 b9c9540
fix: 토큰 소진으로 입력창이 잠길 때 남아있던 입력 초안을 비움
seunghee17 ee4162e
fix: 토큰 사용량 알림이 소진 시점 화면에서만, 정확히 한 번만 뜨게 합니다
seunghee17 1039c8d
Merge branch 'develop' into fix/chatting-room-ui
seunghee17 6895469
chore: 주석 수정
seunghee17 dd18b3f
fix: ChatRoomScreen import 순서를 detekt 규칙에 맞게 정렬합니다
seunghee17 1728ec3
Merge remote-tracking branch 'origin/develop' into fix/chatting-room-ui
seunghee17 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
13 changes: 13 additions & 0 deletions
13
core/designsystem/src/main/java/com/gamss/android/core/designsystem/modifier/ClearFocus.kt
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 |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package com.gamss.android.core.designsystem.modifier | ||
| import androidx.compose.foundation.gestures.detectTapGestures | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.focus.FocusManager | ||
| import androidx.compose.ui.input.pointer.pointerInput | ||
|
|
||
| fun Modifier.addFocusCleaner(focusManager: FocusManager): Modifier { | ||
| return this.pointerInput(Unit) { | ||
| detectTapGestures(onTap = { | ||
| focusManager.clearFocus() | ||
| }) | ||
| } | ||
| } | ||
114 changes: 114 additions & 0 deletions
114
.../designsystem/src/main/java/com/gamss/android/core/designsystem/snackbar/GamssSnackBar.kt
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 |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| package com.gamss.android.core.designsystem.snackbar | ||
|
|
||
| import android.content.res.Configuration | ||
| import androidx.compose.foundation.background | ||
| import androidx.compose.foundation.layout.Arrangement | ||
| import androidx.compose.foundation.layout.Box | ||
| import androidx.compose.foundation.layout.Column | ||
| import androidx.compose.foundation.layout.Row | ||
| import androidx.compose.foundation.layout.fillMaxWidth | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.layout.size | ||
| import androidx.compose.foundation.shape.RoundedCornerShape | ||
| import androidx.compose.material3.Icon | ||
| import androidx.compose.material3.Text | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Alignment | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.draw.clip | ||
| import androidx.compose.ui.graphics.painter.Painter | ||
| import androidx.compose.ui.res.painterResource | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import androidx.compose.ui.unit.dp | ||
| import com.gamss.android.core.designsystem.component.GamssIcons | ||
| import com.gamss.android.core.designsystem.theme.GamssTheme | ||
|
|
||
| private val SnackBarIconSize = 20.dp | ||
|
|
||
| /** | ||
| * 화면 하단에 뜨는 스낵바. 아이콘은 화면마다 다른 것을 붙일 수 있어 nullable 로 둔다. | ||
| * 다른 디자인시스템 컴포넌트들과 마찬가지로 drawable을 painterResource()로 그려 넘기는 | ||
| * [Painter]를 받는다 — ImageVector는 material-icons 의존성이 따로 필요해 이 모듈엔 없다. | ||
| * 시안 문구는 한 줄 사용을 권장하지만, 길어지면 그대로 줄바꿈된다. | ||
| */ | ||
| @Composable | ||
| fun GamssSnackBar( | ||
| message: String, | ||
| modifier: Modifier = Modifier, | ||
| snackBarIcon: (@Composable () -> Unit)? = null, | ||
| ) { | ||
| Row( | ||
| modifier = modifier | ||
| .fillMaxWidth() | ||
| .clip(RoundedCornerShape(GamssTheme.radius.radius100)) | ||
| .background(color = GamssTheme.colors.gray900) | ||
| .padding( | ||
| horizontal = GamssTheme.spacing.spacing300, | ||
| vertical = GamssTheme.spacing.spacing200, | ||
| ), | ||
| horizontalArrangement = Arrangement.spacedBy(GamssTheme.spacing.spacing100), | ||
| verticalAlignment = Alignment.CenterVertically, | ||
| ) { | ||
| if (snackBarIcon != null) { | ||
| Box( | ||
| modifier = Modifier.size(SnackBarIconSize), | ||
| contentAlignment = Alignment.Center, | ||
| ) { | ||
| snackBarIcon() | ||
| } | ||
| } | ||
| Text( | ||
| text = message, | ||
| style = GamssTheme.typography.body4Medium, | ||
| color = GamssTheme.colors.gray025, | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| @Preview(name = "Light", showBackground = true, widthDp = 402) | ||
| @Suppress("UnusedPrivateMember") | ||
| @Composable | ||
| private fun GamssSnackBarLightPreview() { | ||
| GamssTheme(darkTheme = false) { | ||
| GamssSnackBarPreviewContent() | ||
| } | ||
| } | ||
|
|
||
| @Preview( | ||
| name = "Dark", | ||
| showBackground = true, | ||
| backgroundColor = 0xFF000000, | ||
| uiMode = Configuration.UI_MODE_NIGHT_YES, | ||
| widthDp = 402, | ||
| ) | ||
| @Suppress("UnusedPrivateMember") | ||
| @Composable | ||
| private fun GamssSnackBarDarkPreview() { | ||
| GamssTheme(darkTheme = true) { | ||
| GamssSnackBarPreviewContent() | ||
| } | ||
| } | ||
|
|
||
| @Composable | ||
| private fun GamssSnackBarPreviewContent() { | ||
| Column( | ||
| modifier = Modifier.padding(GamssTheme.spacing.spacing300), | ||
| verticalArrangement = Arrangement.spacedBy(GamssTheme.spacing.spacing200), | ||
| ) { | ||
| // 아이콘이 있는 스낵바. | ||
| GamssSnackBar( | ||
| message = "이것은 아이콘이 있는 스낵바입니다.\n스낵바는 한 줄로 사용하기를 권장합니다.", | ||
| snackBarIcon = { | ||
| Icon( | ||
| painter = painterResource(GamssIcons.InfoFilled), | ||
| contentDescription = null, | ||
| tint = GamssTheme.colors.yellow, | ||
| ) | ||
| }, | ||
| ) | ||
| // 아이콘이 없는 스낵바. | ||
| GamssSnackBar( | ||
| message = "이것은 아이콘이 없는 스낵바입니다.", | ||
| ) | ||
| } | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:width="20dp" | ||
| android:height="20dp" | ||
| android:viewportWidth="20" | ||
| android:viewportHeight="20"> | ||
| <path | ||
| android:pathData="M9.672,2C10.724,2 11.714,2.201 12.641,2.602C13.568,2.997 14.383,3.549 15.086,4.258C15.794,4.966 16.349,5.784 16.75,6.711C17.156,7.633 17.359,8.62 17.359,9.672C17.359,10.724 17.159,11.714 16.758,12.641C16.357,13.568 15.802,14.383 15.094,15.086C14.385,15.794 13.568,16.349 12.641,16.75C11.719,17.151 10.732,17.352 9.68,17.352C8.628,17.352 7.638,17.151 6.711,16.75C5.784,16.349 4.966,15.794 4.258,15.086C3.555,14.383 3.003,13.568 2.602,12.641C2.201,11.714 2,10.724 2,9.672C2,8.62 2.201,7.633 2.602,6.711C3.003,5.784 3.555,4.966 4.258,4.258C4.966,3.549 5.784,2.997 6.711,2.602C7.638,2.201 8.625,2 9.672,2ZM9.68,11.75C9.419,11.75 9.195,11.833 9.008,12C8.826,12.161 8.734,12.367 8.734,12.617C8.734,12.867 8.826,13.075 9.008,13.242C9.195,13.404 9.419,13.484 9.68,13.484C9.935,13.484 10.154,13.404 10.336,13.242C10.523,13.081 10.617,12.872 10.617,12.617C10.617,12.367 10.526,12.161 10.344,12C10.161,11.833 9.94,11.75 9.68,11.75ZM9.672,5.789C9.417,5.789 9.211,5.865 9.055,6.016C8.898,6.167 8.826,6.362 8.836,6.602L8.945,10.195C8.961,10.669 9.206,10.906 9.68,10.906C10.138,10.906 10.375,10.667 10.391,10.188L10.508,6.602C10.513,6.367 10.438,6.174 10.281,6.023C10.125,5.867 9.922,5.789 9.672,5.789Z" | ||
| android:fillColor="#FFC552"/> | ||
| </vector> |
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.
Uh oh!
There was an error while loading. Please reload this page.