diff --git a/feature/lectureevaluation/editor/src/main/java/com/suwiki/feature/lectureevaluation/editor/lectureevaluation/LectureEvaluationEditorScreen.kt b/feature/lectureevaluation/editor/src/main/java/com/suwiki/feature/lectureevaluation/editor/lectureevaluation/LectureEvaluationEditorScreen.kt index 6dfdb5e8..a4650bf4 100644 --- a/feature/lectureevaluation/editor/src/main/java/com/suwiki/feature/lectureevaluation/editor/lectureevaluation/LectureEvaluationEditorScreen.kt +++ b/feature/lectureevaluation/editor/src/main/java/com/suwiki/feature/lectureevaluation/editor/lectureevaluation/LectureEvaluationEditorScreen.kt @@ -36,7 +36,6 @@ import com.suwiki.core.designsystem.component.chips.SuwikiContainedChip import com.suwiki.core.designsystem.component.container.SuwikiSelectionContainer import com.suwiki.core.designsystem.component.loading.LoadingScreen import com.suwiki.core.designsystem.component.ratingbar.SuwikiRatingBar -import com.suwiki.feature.lectureevaluation.editor.lectureevaluation.component.slider.SuwikiSlider import com.suwiki.core.designsystem.component.textfield.SuwikiReviewInputBox import com.suwiki.core.designsystem.theme.Primary import com.suwiki.core.designsystem.theme.SuwikiTheme @@ -46,6 +45,7 @@ import com.suwiki.core.model.enums.HomeworkLevel import com.suwiki.core.model.enums.TeamLevel import com.suwiki.core.ui.extension.toText import com.suwiki.feature.lectureevaluation.editor.R +import com.suwiki.feature.lectureevaluation.editor.lectureevaluation.component.slider.SuwikiSlider import org.orbitmvi.orbit.compose.collectAsState import org.orbitmvi.orbit.compose.collectSideEffect import java.util.Locale diff --git a/feature/lectureevaluation/editor/src/main/java/com/suwiki/feature/lectureevaluation/editor/lectureevaluation/component/slider/SuwikiSlider.kt b/feature/lectureevaluation/editor/src/main/java/com/suwiki/feature/lectureevaluation/editor/lectureevaluation/component/slider/SuwikiSlider.kt index 10da28ec..b06859be 100644 --- a/feature/lectureevaluation/editor/src/main/java/com/suwiki/feature/lectureevaluation/editor/lectureevaluation/component/slider/SuwikiSlider.kt +++ b/feature/lectureevaluation/editor/src/main/java/com/suwiki/feature/lectureevaluation/editor/lectureevaluation/component/slider/SuwikiSlider.kt @@ -24,9 +24,9 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import com.suwiki.feature.lectureevaluation.editor.lectureevaluation.component.slider.material.Slider import com.suwiki.core.designsystem.theme.Primary import com.suwiki.core.designsystem.theme.SuwikiTheme +import com.suwiki.feature.lectureevaluation.editor.lectureevaluation.component.slider.material.Slider import kotlin.math.round @OptIn(ExperimentalMaterial3Api::class) diff --git a/feature/lectureevaluation/editor/src/main/java/com/suwiki/feature/lectureevaluation/editor/lectureevaluation/component/slider/material/Slider.kt b/feature/lectureevaluation/editor/src/main/java/com/suwiki/feature/lectureevaluation/editor/lectureevaluation/component/slider/material/Slider.kt index 7296f175..9b6f3b91 100644 --- a/feature/lectureevaluation/editor/src/main/java/com/suwiki/feature/lectureevaluation/editor/lectureevaluation/component/slider/material/Slider.kt +++ b/feature/lectureevaluation/editor/src/main/java/com/suwiki/feature/lectureevaluation/editor/lectureevaluation/component/slider/material/Slider.kt @@ -33,18 +33,18 @@ import kotlin.math.roundToInt @Composable @ExperimentalMaterial3Api fun Slider( - value: Float, - onValueChange: (Float) -> Unit, - modifier: Modifier = Modifier, - trackOffset: Float, - enabled: Boolean = true, - onValueChangeFinished: (() -> Unit)? = null, - interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, - @IntRange(from = 0) + value: Float, + onValueChange: (Float) -> Unit, + modifier: Modifier = Modifier, + trackOffset: Float, + enabled: Boolean = true, + onValueChangeFinished: (() -> Unit)? = null, + interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, + @IntRange(from = 0) steps: Int = 0, - thumb: @Composable (SliderState) -> Unit = { _ -> }, - track: @Composable (SliderState) -> Unit = { _ -> }, - valueRange: ClosedFloatingPointRange = 0f..1f, + thumb: @Composable (SliderState) -> Unit = { _ -> }, + track: @Composable (SliderState) -> Unit = { _ -> }, + valueRange: ClosedFloatingPointRange = 0f..1f, ) { val state = remember( steps, @@ -77,14 +77,14 @@ fun Slider( @Composable @ExperimentalMaterial3Api fun Slider( - state: SliderState, - modifier: Modifier = Modifier, - trackOffset: Float, - enabled: Boolean = true, - interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, - thumb: @Composable (SliderState) -> Unit = { + state: SliderState, + modifier: Modifier = Modifier, + trackOffset: Float, + enabled: Boolean = true, + interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, + thumb: @Composable (SliderState) -> Unit = { }, - track: @Composable (SliderState) -> Unit = { sliderState -> + track: @Composable (SliderState) -> Unit = { sliderState -> }, ) { require(state.steps >= 0) { "steps should be >= 0" } @@ -103,13 +103,13 @@ fun Slider( @OptIn(ExperimentalMaterial3Api::class) @Composable private fun SliderImpl( - modifier: Modifier, - state: SliderState, - enabled: Boolean, - interactionSource: MutableInteractionSource, - trackOffset: Float, - thumb: @Composable (SliderState) -> Unit, - track: @Composable (SliderState) -> Unit, + modifier: Modifier, + state: SliderState, + enabled: Boolean, + interactionSource: MutableInteractionSource, + trackOffset: Float, + thumb: @Composable (SliderState) -> Unit, + track: @Composable (SliderState) -> Unit, ) { val press = Modifier.sliderTapModifier( state, @@ -194,9 +194,9 @@ private enum class SliderComponents { @OptIn(ExperimentalMaterial3Api::class) private fun Modifier.sliderTapModifier( - state: SliderState, - interactionSource: MutableInteractionSource, - enabled: Boolean, + state: SliderState, + interactionSource: MutableInteractionSource, + enabled: Boolean, ) = if (enabled) { pointerInput(state, interactionSource) { detectTapGestures( @@ -213,8 +213,8 @@ private fun Modifier.sliderTapModifier( @OptIn(ExperimentalMaterial3Api::class) private fun Modifier.sliderSemantics( - state: SliderState, - enabled: Boolean, + state: SliderState, + enabled: Boolean, ): Modifier { return semantics { if (!enabled) disabled() diff --git a/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/LectureEvaluationScreen.kt b/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/LectureEvaluationScreen.kt index 9d67881f..f25d615a 100644 --- a/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/LectureEvaluationScreen.kt +++ b/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/LectureEvaluationScreen.kt @@ -24,12 +24,9 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel -import com.suwiki.feature.lectureevaluation.viewerreporter.component.EvaluationAppBar import com.suwiki.core.designsystem.component.bottomsheet.SuwikiAgreementBottomSheet import com.suwiki.core.designsystem.component.bottomsheet.SuwikiSelectBottomSheet -import com.suwiki.feature.lectureevaluation.viewerreporter.component.EvaluationCard import com.suwiki.core.designsystem.component.loading.LoadingScreen -import com.suwiki.feature.lectureevaluation.viewerreporter.component.EvaluationSearchBar import com.suwiki.core.designsystem.theme.Gray95 import com.suwiki.core.designsystem.theme.SuwikiTheme import com.suwiki.core.model.lectureevaluation.lecture.LectureEvaluationAverage @@ -38,6 +35,9 @@ import com.suwiki.core.ui.extension.lectureAlignList import com.suwiki.core.ui.extension.toText import com.suwiki.core.ui.util.PRIVACY_POLICY_SITE import com.suwiki.core.ui.util.TERMS_SITE +import com.suwiki.feature.lectureevaluation.viewerreporter.component.EvaluationAppBar +import com.suwiki.feature.lectureevaluation.viewerreporter.component.EvaluationCard +import com.suwiki.feature.lectureevaluation.viewerreporter.component.EvaluationSearchBar import com.suwiki.feature.lectureevaluation.viewerreporter.component.ONBOARDING_PAGE_COUNT import com.suwiki.feature.lectureevaluation.viewerreporter.component.OnboardingBottomSheet import kotlinx.collections.immutable.PersistentList diff --git a/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/detail/LectureEvaluationDetailScreen.kt b/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/detail/LectureEvaluationDetailScreen.kt index 452fdbde..9acbd83a 100644 --- a/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/detail/LectureEvaluationDetailScreen.kt +++ b/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/detail/LectureEvaluationDetailScreen.kt @@ -38,8 +38,6 @@ import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel import com.suwiki.core.designsystem.component.appbar.SuwikiAppBarWithTitle import com.suwiki.core.designsystem.component.button.SuwikiOutlinedButton -import com.suwiki.feature.lectureevaluation.viewerreporter.detail.component.ExamEvaluationContainer -import com.suwiki.feature.lectureevaluation.viewerreporter.detail.component.LectureEvaluationContainer import com.suwiki.core.designsystem.component.dialog.SuwikiDialog import com.suwiki.core.designsystem.component.loading.LoadingScreen import com.suwiki.core.designsystem.component.tabbar.SuwikiTabBar @@ -53,6 +51,8 @@ import com.suwiki.core.ui.extension.OnBottomReached import com.suwiki.core.ui.extension.collectWithLifecycle import com.suwiki.core.ui.extension.suwikiClickable import com.suwiki.feature.lectureevaluation.viewerreporter.R +import com.suwiki.feature.lectureevaluation.viewerreporter.detail.component.ExamEvaluationContainer +import com.suwiki.feature.lectureevaluation.viewerreporter.detail.component.LectureEvaluationContainer import com.suwiki.feature.lectureevaluation.viewerreporter.detail.component.SuwikiReviewStatisticsContainer import me.onebone.toolbar.CollapsingToolbarScaffold import me.onebone.toolbar.ExperimentalToolbarApi diff --git a/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/detail/component/ExamEvaluationContainer.kt b/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/detail/component/ExamEvaluationContainer.kt index c5bf825a..c672e5f3 100644 --- a/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/detail/component/ExamEvaluationContainer.kt +++ b/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/detail/component/ExamEvaluationContainer.kt @@ -34,7 +34,13 @@ fun ExamEvaluationContainer( isAuthor: Boolean = false, onClickButton: () -> Unit, ) { - val buttonText = if (isAuthor) stringResource(id = com.suwiki.core.ui.R.string.word_edit) else stringResource(id = com.suwiki.core.ui.R.string.word_report) + val buttonText = if (isAuthor) { + stringResource(id = com.suwiki.core.ui.R.string.word_edit) + } else { + stringResource( + id = com.suwiki.core.ui.R.string.word_report, + ) + } Column( modifier = Modifier diff --git a/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/detail/component/LectureEvaluationContainer.kt b/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/detail/component/LectureEvaluationContainer.kt index bc8f3549..cb18126c 100644 --- a/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/detail/component/LectureEvaluationContainer.kt +++ b/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/detail/component/LectureEvaluationContainer.kt @@ -13,7 +13,6 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import com.suwiki.core.ui.R import com.suwiki.core.designsystem.component.badge.BadgeColor import com.suwiki.core.designsystem.component.badge.SuwikiBadge import com.suwiki.core.designsystem.component.button.SuwikiContainedSmallButton @@ -21,6 +20,7 @@ import com.suwiki.core.designsystem.component.ratingbar.SuwikiRatingBar import com.suwiki.core.designsystem.theme.Black import com.suwiki.core.designsystem.theme.SuwikiTheme import com.suwiki.core.designsystem.theme.White +import com.suwiki.core.ui.R @Composable fun LectureEvaluationContainer( diff --git a/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/detail/component/StatisticsContainer.kt b/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/detail/component/StatisticsContainer.kt index 4934cd42..07dd2359 100644 --- a/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/detail/component/StatisticsContainer.kt +++ b/feature/lectureevaluation/viewerreporter/src/main/java/com/suwiki/feature/lectureevaluation/viewerreporter/detail/component/StatisticsContainer.kt @@ -27,7 +27,6 @@ import androidx.compose.ui.graphics.StrokeCap import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import com.suwiki.core.ui.R import com.suwiki.core.designsystem.component.badge.BadgeColor import com.suwiki.core.designsystem.component.badge.SuwikiBadge import com.suwiki.core.designsystem.component.ratingbar.SuwikiRatingBar @@ -51,6 +50,7 @@ import com.suwiki.core.model.enums.HomeworkLevel import com.suwiki.core.model.enums.TeamLevel import com.suwiki.core.model.lectureevaluation.lecture.LectureEvaluationExtraAverage import com.suwiki.core.model.lectureevaluation.lecture.LectureInfo +import com.suwiki.core.ui.R import com.suwiki.core.ui.extension.toText import java.util.Locale diff --git a/feature/navigator/src/main/java/com/suwiki/feature/navigator/MainScreen.kt b/feature/navigator/src/main/java/com/suwiki/feature/navigator/MainScreen.kt index 5eb22cc6..b3b36d72 100644 --- a/feature/navigator/src/main/java/com/suwiki/feature/navigator/MainScreen.kt +++ b/feature/navigator/src/main/java/com/suwiki/feature/navigator/MainScreen.kt @@ -30,7 +30,6 @@ import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel import androidx.navigation.compose.NavHost import com.suwiki.core.designsystem.component.dialog.SuwikiDialog -import com.suwiki.feature.navigator.component.SuwikiToast import com.suwiki.core.designsystem.shadow.bottomNavigationShadow import com.suwiki.core.designsystem.theme.GrayDA import com.suwiki.core.designsystem.theme.Primary @@ -43,6 +42,7 @@ import com.suwiki.feature.lectureevaluation.my.navigation.myEvaluationNavGraph import com.suwiki.feature.lectureevaluation.viewerreporter.navigation.lectureEvaluationNavGraph import com.suwiki.feature.login.navigation.loginNavGraph import com.suwiki.feature.myinfo.navigation.myInfoNavGraph +import com.suwiki.feature.navigator.component.SuwikiToast import com.suwiki.feature.notice.navigation.noticeNavGraph import com.suwiki.feature.openmajor.navigation.OpenMajorRoute import com.suwiki.feature.openmajor.navigation.openMajorNavGraph diff --git a/feature/timetable/src/main/java/com/suwiki/feature/timetable/openlecture/OpenLectureScreen.kt b/feature/timetable/src/main/java/com/suwiki/feature/timetable/openlecture/OpenLectureScreen.kt index ba940821..5f8c97e2 100644 --- a/feature/timetable/src/main/java/com/suwiki/feature/timetable/openlecture/OpenLectureScreen.kt +++ b/feature/timetable/src/main/java/com/suwiki/feature/timetable/openlecture/OpenLectureScreen.kt @@ -45,7 +45,6 @@ import com.suwiki.core.designsystem.component.appbar.SuwikiAppBarWithTextButton import com.suwiki.core.designsystem.component.bottomsheet.SuwikiBottomSheet import com.suwiki.core.designsystem.component.bottomsheet.SuwikiSelectBottomSheet import com.suwiki.core.designsystem.component.button.SuwikiContainedLargeButton -import com.suwiki.feature.timetable.openlecture.component.OpenLectureCard import com.suwiki.core.designsystem.component.loading.LoadingScreen import com.suwiki.core.designsystem.component.searchbar.SuwikiSearchBar import com.suwiki.core.designsystem.theme.Gray6A @@ -61,6 +60,7 @@ import com.suwiki.core.ui.extension.suwikiClickable import com.suwiki.core.ui.util.timetableCellColorHexMap import com.suwiki.feature.timetable.R import com.suwiki.feature.timetable.navigation.argument.CellEditorArgument +import com.suwiki.feature.timetable.openlecture.component.OpenLectureCard import com.suwiki.feature.timetable.openlecture.model.SchoolLevel import kotlinx.collections.immutable.toPersistentList import kotlinx.coroutines.android.awaitFrame diff --git a/feature/timetable/src/main/java/com/suwiki/feature/timetable/openlecture/component/OpenLectureCard.kt b/feature/timetable/src/main/java/com/suwiki/feature/timetable/openlecture/component/OpenLectureCard.kt index 5b4f1df9..fb6c490d 100644 --- a/feature/timetable/src/main/java/com/suwiki/feature/timetable/openlecture/component/OpenLectureCard.kt +++ b/feature/timetable/src/main/java/com/suwiki/feature/timetable/openlecture/component/OpenLectureCard.kt @@ -21,7 +21,6 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import com.suwiki.core.ui.R import com.suwiki.core.designsystem.component.button.SuwikiContainedSmallButton import com.suwiki.core.designsystem.theme.Black import com.suwiki.core.designsystem.theme.Gray6A @@ -29,6 +28,7 @@ import com.suwiki.core.designsystem.theme.GrayDA import com.suwiki.core.designsystem.theme.GrayF6 import com.suwiki.core.designsystem.theme.SuwikiTheme import com.suwiki.core.designsystem.theme.White +import com.suwiki.core.ui.R import com.suwiki.core.ui.extension.suwikiClickable @Composable diff --git a/feature/timetable/src/main/java/com/suwiki/feature/timetable/timetable/component/timetable/Common.kt b/feature/timetable/src/main/java/com/suwiki/feature/timetable/timetable/component/timetable/Common.kt index b262e449..a4f15832 100644 --- a/feature/timetable/src/main/java/com/suwiki/feature/timetable/timetable/component/timetable/Common.kt +++ b/feature/timetable/src/main/java/com/suwiki/feature/timetable/timetable/component/timetable/Common.kt @@ -3,8 +3,8 @@ package com.suwiki.feature.timetable.timetable.component.timetable import androidx.compose.runtime.Composable import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp -import com.suwiki.core.ui.R import com.suwiki.core.model.timetable.TimetableDay +import com.suwiki.core.ui.R internal val timetableHeightPerHour = 48.dp diff --git a/feature/timetable/src/main/java/com/suwiki/feature/timetable/widget/timetable/Common.kt b/feature/timetable/src/main/java/com/suwiki/feature/timetable/widget/timetable/Common.kt index 142819a4..15c5a14b 100644 --- a/feature/timetable/src/main/java/com/suwiki/feature/timetable/widget/timetable/Common.kt +++ b/feature/timetable/src/main/java/com/suwiki/feature/timetable/widget/timetable/Common.kt @@ -3,8 +3,8 @@ package com.suwiki.feature.timetable.widget.timetable import android.content.Context import androidx.compose.runtime.Composable import androidx.compose.ui.unit.dp -import com.suwiki.core.ui.R import com.suwiki.core.model.timetable.TimetableDay +import com.suwiki.core.ui.R internal val glanceTimetableHeightPerHour = 48.dp