Skip to content
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

[REFACTOR/#212] 다이얼로그 / 리팩토링 #213

Merged
merged 27 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
be7abcb
[MOD/#212] 스크랩 취소 다이얼로그 추출
boiledEgg-s Sep 1, 2024
7a0fa35
[FEAT/#212] 스크랩 취소와 캘린더 연동
boiledEgg-s Sep 1, 2024
5f95377
[UI/#212] 스크랩 취소 프리뷰
boiledEgg-s Sep 1, 2024
337c03c
[MOD
boiledEgg-s Sep 1, 2024
72279a2
[FEAT/#212] 공고 다이얼로그와 달력 연동
boiledEgg-s Sep 1, 2024
610a9a1
[DEL/#212] 스크랩 관리 코드 제거
boiledEgg-s Sep 1, 2024
b483d56
[DEL/#212] 라이브러리 import 정리
boiledEgg-s Sep 1, 2024
0a94565
[CHORE/#212] Resource 의존성 수정
boiledEgg-s Sep 1, 2024
8bb8578
[ADD/#212] 스크랩 색상 추가
boiledEgg-s Sep 3, 2024
4dfff2a
[ADD/#212] 컬러 타입 추가
boiledEgg-s Sep 3, 2024
67dfbf9
[ADD/#212] 컬러 코드 추가
boiledEgg-s Sep 3, 2024
37c8b2b
[FIX/#212] 컬러 타입 수정
boiledEgg-s Sep 3, 2024
a7ccfe7
[FEAT/#212] 컬러 팔레트 수정 및 연동
boiledEgg-s Sep 3, 2024
f856344
[FEAT/#212] 스크랩 다이얼로그 UI 및 기능 수정
boiledEgg-s Sep 3, 2024
cd13ab8
[DEL/#212] 라이브러리 정리
boiledEgg-s Sep 3, 2024
c424ad6
[FIX/#212] 버튼 관련 로직 수정
boiledEgg-s Sep 3, 2024
40156b6
[UI/#212] 스크랩창 기타 UI 수정
boiledEgg-s Sep 3, 2024
dd3d488
[UI/#212] 취소창 기타 UI 수정
boiledEgg-s Sep 3, 2024
6f91c70
[DEL/#212] 라이브러리 정리
boiledEgg-s Sep 3, 2024
222a636
[FIX/#212] 스크랩수정 버튼 오류 해결
boiledEgg-s Sep 3, 2024
ddc1cc1
[DEL/#212] 로그 삭제
boiledEgg-s Sep 3, 2024
536c53c
[DEL/#212] 라이브러리 삭제
boiledEgg-s Sep 3, 2024
05ffbe0
[REFACTOR/#212] 리뷰 기반 코드 수정
boiledEgg-s Sep 4, 2024
49b2275
[DOC/#212] RadioButtonGroups 문서화
boiledEgg-s Sep 4, 2024
0eac245
[CHORE/#212] 리소스 주석 추가
boiledEgg-s Sep 4, 2024
571e43e
[UI/#212] 토스트메시지 추가
boiledEgg-s Sep 4, 2024
52e6c48
Merge remote-tracking branch 'origin/develop' into refactor/#212-dialog
boiledEgg-s Sep 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Contributor

Choose a reason for hiding this comment

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

요기 import 정리 부탁드려요!

Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,20 @@ import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Constraints
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
import com.terning.core.R
import com.terning.core.designsystem.component.button.RoundButton
import com.terning.core.designsystem.theme.Grey300
import com.terning.core.designsystem.theme.TerningTheme
import com.terning.core.designsystem.theme.White
import com.terning.core.extension.noRippleClickable

Expand Down Expand Up @@ -58,7 +48,8 @@ fun TerningBasicDialog(
Row(
modifier = Modifier
.fillMaxWidth()
.padding(18.dp),
.padding(top = 18.dp, bottom = 16.dp)
.padding(horizontal = 16.dp),
horizontalArrangement = Arrangement.End
) {
Icon(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.Dp

/**
* 라디오버튼 그룹을 관리하기 위한 컴포넌트입니다.
*
* @param options 라디오버튼에 표시될 옵션 목록입니다.
* @param buttonComposable 라디오버튼을 표시하는 컴포저블입니다.
* @param gridCellCount Row 하나에 들어갈 버튼 개수입니다.
* @param verticalArrangementSpace Row 간격입니다.
* @param horizontalArrangementSpace Column 간격입니다.
* @param modifier 수정자입니다.
* @param onOptionSelected 옵션이 선택되었을 때 호출되는 콜백입니다.
*/

@Composable
fun <T> RadioButtonGroups(
options: List<T>,
Expand Down
16 changes: 16 additions & 0 deletions core/src/main/java/com/terning/core/designsystem/theme/Color.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,22 @@ val CalBlue2 = Color(0xFF4AA9F2)
val CalPurple = Color(0xFF9B64E2)
val CalPink = Color(0xFFF260AC)

// Calendar Color (Border)
val CalRedLi = Color(0xFFDD2F36)
val CalOrangeLi = Color(0xFFF39D35)
val CalGreenLi = Color(0xFF74CE44)
val CalBlueLi = Color(0xFF3B9CE8)
val CalPurpleLi = Color(0xFF8D4EDE)
val CalPinkLi = Color(0xFFF9439A)

// Calendar Color (Background)
val CalRedBc = Color(0x7FED4E54)
val CalOrangeBc = Color(0x7FF3A649)
val CalGreenBc = Color(0x7F84D558)
val CalBlueBc = Color(0x7F4AA9F2)
val CalPurpleBc = Color(0x7F9B64E2)
val CalPinkBc = Color(0x7FF260AC)

// Other
val WarningRed = Color(0xFFF54645)
val SundayRed = Color(0xFFEB1211)
Expand Down
11 changes: 11 additions & 0 deletions core/src/main/java/com/terning/core/extension/TextStyle.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.terning.core.extension

import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.unit.Dp

@Composable
fun TextStyle.getFixHeightByMaxLine(maxLine: Int): Dp = with(LocalDensity.current) {
lineHeight.toDp() * maxLine
}
Comment on lines +8 to +11
Copy link
Contributor

Choose a reason for hiding this comment

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

확장성이 너무 좋으네요

38 changes: 38 additions & 0 deletions core/src/main/java/com/terning/core/type/ColorType.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.terning.core.type

import androidx.compose.ui.graphics.Color
import com.terning.core.designsystem.theme.CalBlue2
import com.terning.core.designsystem.theme.CalBlueBc
import com.terning.core.designsystem.theme.CalBlueLi
import com.terning.core.designsystem.theme.CalGreen2
import com.terning.core.designsystem.theme.CalGreenBc
import com.terning.core.designsystem.theme.CalGreenLi
import com.terning.core.designsystem.theme.CalOrange2
import com.terning.core.designsystem.theme.CalOrangeBc
import com.terning.core.designsystem.theme.CalOrangeLi
import com.terning.core.designsystem.theme.CalPink
import com.terning.core.designsystem.theme.CalPinkBc
import com.terning.core.designsystem.theme.CalPinkLi
import com.terning.core.designsystem.theme.CalPurple
import com.terning.core.designsystem.theme.CalPurpleBc
import com.terning.core.designsystem.theme.CalPurpleLi
import com.terning.core.designsystem.theme.CalRed
import com.terning.core.designsystem.theme.CalRedBc
import com.terning.core.designsystem.theme.CalRedLi

enum class ColorType(
val main: Color,
val border: Color,
val sub: Color
) {
RED(main = CalRed, border = CalRedLi, sub = CalRedBc),
ORANGE(main = CalOrange2, border = CalOrangeLi, sub = CalOrangeBc),
GREEN(main = CalGreen2, border = CalGreenLi, sub = CalGreenBc),
BLUE(main = CalBlue2, border = CalBlueLi, sub = CalBlueBc),
PURPLE(main = CalPurple, border = CalPurpleLi, sub = CalPurpleBc),
PINK(main = CalPink, border = CalPinkLi, sub = CalPinkBc);

companion object {
fun findColorType(mainColor: Color): ColorType? = entries.find { it.main == mainColor }
}
}
6 changes: 3 additions & 3 deletions core/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@

<!--Dialog-->
<string name="dialog_content_scrap_sub_title">공고를 캘린더에 스크랩하시겠어요?</string>
<string name="dialog_content_color_button">색상</string>
<string name="dialog_content_calendar_color_change">색상 저장하기</string>
<string name="dialog_content_color_button">스크랩 색상</string>
<string name="dialog_content_calendar_color_change">색상 변경하기</string>
<string name="dialog_scrap_button">내 캘린더에 스크랩하기</string>
<string name="dialog_content_scrap_cancel_main_title">관심 공고가 캘린더에서 사라져요!</string>
<string name="dialog_content_scrap_cancel_sub_title">스크랩을 취소하시겠어요?</string>
<string name="dialog_scrap_cancel_button">스크랩 취소하기</string>
<string name="dialog_scrap_mine">내가 스크랩한 관심 공고에요!</string>
<string name="dialog_scrap_move_to_intern">공고 상세 정보 보러가기</string>
<string name="dialog_scrap_move_to_intern">공고 상세 정보 보기</string>
<string name="dialog_today_deadline">오늘 마감되는 공고예요!</string>

<!--Intern-->
Expand Down
1 change: 1 addition & 0 deletions feature/src/main/assets/terning_scrap_cancel.json

Large diffs are not rendered by default.

This file was deleted.

Loading
Loading