-
Notifications
You must be signed in to change notification settings - Fork 1
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
[FEAT/#313] 직무 필터링 추가 #318
Conversation
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.
고생많으셨습니다!! 얼른 머지해서 사용해보고 싶네요ㅎㅋㅎㅋㅎ
|
||
@OptIn(ExperimentalMaterial3Api::class) | ||
@Composable | ||
fun HomeFilteringBottomSheet( |
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.
저는 개인적으로 특정 모듈이나 파일 내에서만 사용되는 컴포넌트의 경우 접근제어자를 명시해주는 것을 선호하는데요, 불필요한 접근을 방지할 수도 있고, 컴포넌트 수 증가 시 발생하는 여러 혼란을 최소화할 수 있다고 생각합니다~!
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.
오 진짜 너무 좋은 생각이에요!! 바아로 적용해보겠습니다
if (isCheckBoxChecked) { | ||
selectedIndex = -1 | ||
} |
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.
isCheckBoxChecked
의 변화가 감지된 경우에만 selectedIndex
의 값이 바뀌도록 설정해주면 불필요하게 변수가 초기화되는 것을 방지할 수 있을 것 같네요!
var currentFilteringInfo by remember { | ||
mutableStateOf(defaultFilteringInfo) | ||
} | ||
val pagerState = rememberPagerState { 2 } |
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.
하드코딩보단 2
라는 값이 발생한 이유? 그 정보를 여기에 담아주면 코드를 이해하기 편하고 나중에 수정하기도 편해질 것 같네요!
제가 이해한 바론 2는 filterType
의 크기 같은데 크기 정보로 대체하면 좋을 것 같습니당~
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.
바쁜데도 수고 많았어요!! 👍👍
그리고 영상에서도 볼 수 있는 건데 처음 체크박스를 눌렀을 때 저장하기 버튼은 활성화가 돼야하는데 비활성화 되어있네용,, 이거 제가 로그 찍어보니까 데이트피커에서 좀 오류가 나는 것 같아서 한번 날잡고 다시 봐볼게요!!
else -> HomeFilteringInfo(null, null, null, null, JobType.TOTAL.stringValue) | ||
} |
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.
아무래도 파라미터가 많아져서 named arguments를 사용해서 명시해주는 게 좋을 것 같아요..!
fun HomeFilteringBottomSheet( | ||
modifier: Modifier = Modifier, | ||
defaultFilteringInfo: HomeFilteringInfo, | ||
onDismiss: () -> Unit, | ||
onChangeButtonClick: (String?, String?, Int?, Int?, String) -> Unit, | ||
) { |
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.
modifier는 기본값이 있으므로 가장 아래로 내려주세요!
} | ||
}) | ||
} |
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.
진짜 사소한 거긴하지만... 이렇게 해주면 더 코드가 예뻐질 것 같아요...!
} | |
}) | |
} | |
} | |
} | |
) | |
} |
private fun checkButtonEnable(currentFilteringInfo: HomeFilteringInfo): Boolean = | ||
with(currentFilteringInfo) { | ||
(grade == null && workingPeriod == null && startYear == null && startMonth == null) | ||
|| (grade != null && workingPeriod != null && startYear != null && startMonth != null) | ||
} |
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.
아래와 같은 방식으로도 바꿀 수 있을 것 같아요..! 이건 그냥 참고만 해주세요!
private fun checkButtonEnable(currentFilteringInfo: HomeFilteringInfo): Boolean = | |
with(currentFilteringInfo) { | |
(grade == null && workingPeriod == null && startYear == null && startMonth == null) | |
|| (grade != null && workingPeriod != null && startYear != null && startMonth != null) | |
} | |
private fun checkButtonEnable(currentFilteringInfo: HomeFilteringInfo): Boolean = | |
with(currentFilteringInfo) { | |
listOf(grade, workingPeriod, startYear, startMonth).all { it == null } || | |
listOf(grade, workingPeriod, startYear, startMonth).none { it == null } | |
} |
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.
헐 안그래도 이거 진짜 너무너무너무 신경쓰였던건데 속이 다 시원하네요 진짜 감사합니다
modifier = modifier | ||
.fillMaxWidth() | ||
.wrapContentHeight() | ||
.padding(bottom = 60.dp, start = 23.dp, end = 23.dp), | ||
|
||
) { |
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.
파라미터가 3개 이상 넘어가면 줄바꿈을 해주는 게 가독성에 좋을 것 같아요....!!
modifier = modifier | |
.fillMaxWidth() | |
.wrapContentHeight() | |
.padding(bottom = 60.dp, start = 23.dp, end = 23.dp), | |
) { | |
modifier = modifier | |
.fillMaxWidth() | |
.wrapContentHeight() | |
.padding( | |
bottom = 60.dp, | |
start = 23.dp, | |
end = 23.dp), | |
) { |
@Composable | ||
fun ChangePlanFilteringRadioGroup( | ||
optionList: List<Int>, | ||
initOption: Int, | ||
isCheckBoxChecked: Boolean, | ||
onButtonClick: (Int) -> Unit, | ||
columns: Int = 3, | ||
modifier: Modifier = Modifier, | ||
) { |
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.
순서랑 List 바꿔주시면 감사하겠습니당...!!
@Composable | |
fun ChangePlanFilteringRadioGroup( | |
optionList: List<Int>, | |
initOption: Int, | |
isCheckBoxChecked: Boolean, | |
onButtonClick: (Int) -> Unit, | |
columns: Int = 3, | |
modifier: Modifier = Modifier, | |
) { | |
@Composable | |
fun ChangePlanFilteringRadioGroup( | |
optionList: ImmutableList<Int>, | |
initOption: Int, | |
isCheckBoxChecked: Boolean, | |
onButtonClick: (Int) -> Unit, | |
modifier: Modifier = Modifier, | |
columns: Int = 3, | |
) { |
modifier = modifier | ||
.fillMaxWidth() | ||
.fillMaxHeight(3 / 4f), |
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.
…ilter-jobtype # Conflicts: # feature/home/src/main/java/com/terning/feature/home/HomeRoute.kt
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.
확인했습니다! 머지해도 될 것 같아요!!!
이런 인재를 다른 앱잼팀에게 빼앗길순없다.......
.padding(top = 16.dp), | ||
) { currentPage -> | ||
when (currentPage) { |
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.
오호 이렇게 해결하면 되는군용
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.
뭐지뭐지 했는데 이게 범인이었던..ㅎㅎ
@Composable | ||
private fun GetPagerHeight( | ||
onHeightMeasured: (Int) -> Unit, | ||
) { | ||
PlanFilteringScreen( | ||
currentFilteringInfo = HomeFilteringInfo(null, null, null, null, "total"), | ||
modifier = Modifier | ||
.onGloballyPositioned { | ||
onHeightMeasured(it.size.height) | ||
} | ||
) | ||
} |
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.
onGloballyPositioned
가 크기를 측정하는 친구인가요?
정말... 대단하네요....ㄷㄷㄷ
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.
네네!! 위치랑 크기 정보를 알 수 있다고 하더라구요..!! 사실 이게 PlanFilteringScreen
을 한번 그려보고 높이를 측정한건데 이렇게 안하고는 높이를 알아낼 방법을 찾아내지 못해서,,, 그냥 냅다 해버렸어요😂
with(currentFilteringInfo) { | ||
listOf(grade, workingPeriod, startYear, startMonth).all { it == null || it == 0 } || | ||
listOf(grade, workingPeriod, startYear, startMonth).none { it == null || it == 0 } | ||
} |
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.
어머 이 부분은 제가 놓쳤네요 ! 😂 0일 때도 확인하는 조건 넣어주셔서 감사합니당~
⛳️ Work Description
📸 Screenshot
Screen_Recording_20241231_041604_terning.mp4
📢 To Reviewers