From e654dc57f12bc9ad17e072372cc5f038f83821eb Mon Sep 17 00:00:00 2001 From: tick-taku Date: Fri, 18 Aug 2023 19:01:40 +0900 Subject: [PATCH 01/32] Run anlysis on pull request --- .github/workflows/Analyze.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/Analyze.yml diff --git a/.github/workflows/Analyze.yml b/.github/workflows/Analyze.yml new file mode 100644 index 000000000..a15d2d166 --- /dev/null +++ b/.github/workflows/Analyze.yml @@ -0,0 +1,36 @@ +name: Analyze + +on: + pull_request: + workflow_dispatch: + +jobs: + analyze: + name: Analyze + runs-on: 'ubuntu-latest' + permissions: + actions: read + contents: read + security-events: write + strategy: + fail-fast: false + matrix: + language: [ 'java' ] + + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-java + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + + - name: Build project + run: | + ./gradlew clean assemble --stacktrace + + - name: Perform analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" From 389d15daf4db0cfde7fedf726ebfed8955ce1204 Mon Sep 17 00:00:00 2001 From: tick-taku Date: Mon, 21 Aug 2023 13:57:09 +0900 Subject: [PATCH 02/32] Remove quatation --- .github/workflows/Analyze.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Analyze.yml b/.github/workflows/Analyze.yml index a15d2d166..4c2ee3c8a 100644 --- a/.github/workflows/Analyze.yml +++ b/.github/workflows/Analyze.yml @@ -7,7 +7,7 @@ on: jobs: analyze: name: Analyze - runs-on: 'ubuntu-latest' + runs-on: ubuntu-latest permissions: actions: read contents: read From 280fd042a915b9ab2efd9730fc251ff75388fa3c Mon Sep 17 00:00:00 2001 From: tick-taku Date: Mon, 21 Aug 2023 13:58:55 +0900 Subject: [PATCH 03/32] Align with other actions --- .github/workflows/Analyze.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Analyze.yml b/.github/workflows/Analyze.yml index 4c2ee3c8a..5321004a7 100644 --- a/.github/workflows/Analyze.yml +++ b/.github/workflows/Analyze.yml @@ -18,7 +18,8 @@ jobs: language: [ 'java' ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@vc85c95e3d7251135ab7dc9ce3241c5835cc595a9 + - uses: ./.github/actions/setup-java - name: Initialize CodeQL @@ -27,8 +28,10 @@ jobs: languages: ${{ matrix.language }} - name: Build project - run: | - ./gradlew clean assemble --stacktrace + uses: gradle/gradle-build-action@243af859f8ca30903d9d7f7936897ca0358ba691 # v2 + with: + gradle-home-cache-cleanup: true + arguments: assemble --stacktrace - name: Perform analysis uses: github/codeql-action/analyze@v2 From 621c3eb47e90ab8ab11b98d1591eb8473882c813 Mon Sep 17 00:00:00 2001 From: tick-taku Date: Mon, 21 Aug 2023 16:44:02 +0900 Subject: [PATCH 04/32] Fix typo --- .github/workflows/Analyze.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Analyze.yml b/.github/workflows/Analyze.yml index 5321004a7..56b8dbc6b 100644 --- a/.github/workflows/Analyze.yml +++ b/.github/workflows/Analyze.yml @@ -18,7 +18,7 @@ jobs: language: [ 'java' ] steps: - - uses: actions/checkout@vc85c95e3d7251135ab7dc9ce3241c5835cc595a9 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - uses: ./.github/actions/setup-java From c2a3ab9917d3102bfa8dec6f298409b35905d4c4 Mon Sep 17 00:00:00 2001 From: tick-taku Date: Wed, 23 Aug 2023 18:35:38 +0900 Subject: [PATCH 05/32] Build only :android-app module --- .github/workflows/Analyze.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/Analyze.yml b/.github/workflows/Analyze.yml index 56b8dbc6b..11dd0024d 100644 --- a/.github/workflows/Analyze.yml +++ b/.github/workflows/Analyze.yml @@ -28,10 +28,7 @@ jobs: languages: ${{ matrix.language }} - name: Build project - uses: gradle/gradle-build-action@243af859f8ca30903d9d7f7936897ca0358ba691 # v2 - with: - gradle-home-cache-cleanup: true - arguments: assemble --stacktrace + run: ./gradlew :app-android:assemble --stacktrace - name: Perform analysis uses: github/codeql-action/analyze@v2 From aa9f16a704b874c2a650a68cd6749e86d41fe7ca Mon Sep 17 00:00:00 2001 From: tick-taku Date: Wed, 23 Aug 2023 18:53:23 +0900 Subject: [PATCH 06/32] Run when swift --- .github/workflows/Analyze.yml | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Analyze.yml b/.github/workflows/Analyze.yml index 11dd0024d..1d01c39a3 100644 --- a/.github/workflows/Analyze.yml +++ b/.github/workflows/Analyze.yml @@ -7,7 +7,7 @@ on: jobs: analyze: name: Analyze - runs-on: ubuntu-latest + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} permissions: actions: read contents: read @@ -15,21 +15,42 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'java' ] + language: [ 'java', 'swift' ] steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - uses: ./.github/actions/setup-java + - if: matrix.language == 'swift' + uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0 + with: + bundler-cache: true + + - if: matrix.language == 'swift' + uses: ./.github/actions/xcode-select + + - if: matrix.language == 'swift' + name: Set up XCFramework arch filter + run: echo "arch=x86_64" >> local.properties + + - if: matrix.language == 'swift' + uses: ./.github/actions/spm + - name: Initialize CodeQL uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} - - name: Build project + - if: matrix.language == 'java' + name: Build android run: ./gradlew :app-android:assemble --stacktrace + - if: matrix.language == 'swift' + name: Build ios + run: bundle exec fastlane build + working-directory: app-ios + - name: Perform analysis uses: github/codeql-action/analyze@v2 with: From eadcc094244c8e0b0d6865c17f9e73186a199a96 Mon Sep 17 00:00:00 2001 From: tick-taku Date: Thu, 24 Aug 2023 00:44:12 +0900 Subject: [PATCH 07/32] Cancel in progress --- .github/workflows/Analyze.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/Analyze.yml b/.github/workflows/Analyze.yml index 1d01c39a3..f22498e84 100644 --- a/.github/workflows/Analyze.yml +++ b/.github/workflows/Analyze.yml @@ -4,6 +4,10 @@ on: pull_request: workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: analyze: name: Analyze From f25a5ff825663c8dba295dba8ec23c241f262b34 Mon Sep 17 00:00:00 2001 From: tick-taku Date: Thu, 24 Aug 2023 00:53:23 +0900 Subject: [PATCH 08/32] Pin image to match the build --- .github/workflows/Analyze.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Analyze.yml b/.github/workflows/Analyze.yml index f22498e84..faf854615 100644 --- a/.github/workflows/Analyze.yml +++ b/.github/workflows/Analyze.yml @@ -11,7 +11,7 @@ concurrency: jobs: analyze: name: Analyze - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + runs-on: ${{ (matrix.language == 'swift' && 'macos-13') || 'ubuntu-latest' }} permissions: actions: read contents: read From a59defb1c0e5ffda5bb5dd804f001665233b04cb Mon Sep 17 00:00:00 2001 From: matsudamper Date: Sat, 26 Aug 2023 00:42:58 +0900 Subject: [PATCH 09/32] Pass WindowInset to child --- .../java/io/github/droidkaigi/confsched2023/KaigiApp.kt | 7 ++++++- .../github/droidkaigi/confsched2023/about/AboutScreen.kt | 3 ++- .../confsched2023/contributors/ContributorsScreen.kt | 4 +++- .../droidkaigi/confsched2023/floormap/FloorMapScreen.kt | 1 + .../io/github/droidkaigi/confsched2023/main/MainScreen.kt | 3 +-- .../droidkaigi/confsched2023/sessions/TimetableScreen.kt | 1 + .../github/droidkaigi/confsched2023/stamps/StampsScreen.kt | 2 ++ 7 files changed, 16 insertions(+), 5 deletions(-) diff --git a/app-android/src/main/java/io/github/droidkaigi/confsched2023/KaigiApp.kt b/app-android/src/main/java/io/github/droidkaigi/confsched2023/KaigiApp.kt index 74a19f120..227b8f71e 100644 --- a/app-android/src/main/java/io/github/droidkaigi/confsched2023/KaigiApp.kt +++ b/app-android/src/main/java/io/github/droidkaigi/confsched2023/KaigiApp.kt @@ -135,12 +135,13 @@ private fun NavGraphBuilder.mainScreen( windowSize = windowSize, displayFeatures = displayFeatures, mainNestedGraphStateHolder = KaigiAppMainNestedGraphStateHolder(), - mainNestedGraph = { mainNestedNavController, _ -> + mainNestedGraph = { mainNestedNavController, paddingValues -> nestedSessionScreens( modifier = Modifier, onSearchClick = navController::navigateSearchScreen, onTimetableItemClick = navController::navigateToTimetableItemDetailScreen, onBookmarkIconClick = navController::navigateToBookmarkScreen, + contentPadding = paddingValues, ) nestedAboutScreen( onAboutItemClick = { aboutItem -> @@ -157,15 +158,18 @@ private fun NavGraphBuilder.mainScreen( } }, onLinkClick = externalNavController::navigate, + contentPadding = paddingValues, ) nestedFloorMapScreen( windowSize = windowSize, onSideEventClick = externalNavController::navigate, + contentPadding = paddingValues, ) nestedStampsScreen( onStampsClick = { TODO() }, + contentPadding = paddingValues, ) // For KMP, we are not using navigation abstraction for contributors screen composable(contributorsScreenRoute) { @@ -173,6 +177,7 @@ private fun NavGraphBuilder.mainScreen( viewModel = hiltViewModel(), onNavigationIconClick = navController::popBackStack, onContributorItemClick = externalNavController::navigate, + contentPadding = paddingValues, ) } }, diff --git a/feature/about/src/main/java/io/github/droidkaigi/confsched2023/about/AboutScreen.kt b/feature/about/src/main/java/io/github/droidkaigi/confsched2023/about/AboutScreen.kt index debea5f7b..83443d32f 100644 --- a/feature/about/src/main/java/io/github/droidkaigi/confsched2023/about/AboutScreen.kt +++ b/feature/about/src/main/java/io/github/droidkaigi/confsched2023/about/AboutScreen.kt @@ -4,6 +4,7 @@ import android.content.Context import android.content.pm.PackageManager.PackageInfoFlags import android.os.Build.VERSION import android.os.Build.VERSION_CODES +import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.calculateEndPadding import androidx.compose.foundation.layout.calculateStartPadding import androidx.compose.foundation.layout.padding @@ -17,7 +18,6 @@ import androidx.compose.material3.Text import androidx.compose.material3.TopAppBar import androidx.compose.material3.TopAppBarDefaults import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.draw.alpha @@ -41,6 +41,7 @@ const val aboutScreenRoute = "about" fun NavGraphBuilder.nestedAboutScreen( onAboutItemClick: (AboutItem) -> Unit, onLinkClick: (url: String) -> Unit, + contentPadding: PaddingValues, ) { composable(aboutScreenRoute) { AboutScreen( diff --git a/feature/contributors/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/contributors/ContributorsScreen.kt b/feature/contributors/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/contributors/ContributorsScreen.kt index a9e62140f..c52d5be4b 100644 --- a/feature/contributors/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/contributors/ContributorsScreen.kt +++ b/feature/contributors/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/contributors/ContributorsScreen.kt @@ -1,5 +1,6 @@ package io.github.droidkaigi.confsched2023.contributors +import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth @@ -35,7 +36,8 @@ data class ContributorsUiState(val contributors: PersistentList) fun ContributorsScreen( viewModel: ContributorsViewModel, onNavigationIconClick: () -> Unit, - onContributorItemClick: (url: String) -> Unit + onContributorItemClick: (url: String) -> Unit, + contentPadding: PaddingValues ) { val uiState by viewModel.uiState.collectAsState() ContributorsScreen( diff --git a/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt b/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt index 43f6beadd..3a6e49db9 100644 --- a/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt +++ b/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt @@ -67,6 +67,7 @@ const val floorMapScreenRoute = "floorMap" fun NavGraphBuilder.nestedFloorMapScreen( windowSize: WindowSizeClass, onSideEventClick: (url: String) -> Unit, + contentPadding: PaddingValues, ) { composable(floorMapScreenRoute) { FloorMapScreen( diff --git a/feature/main/src/main/java/io/github/droidkaigi/confsched2023/main/MainScreen.kt b/feature/main/src/main/java/io/github/droidkaigi/confsched2023/main/MainScreen.kt index b2b52cd87..aa63af8ed 100644 --- a/feature/main/src/main/java/io/github/droidkaigi/confsched2023/main/MainScreen.kt +++ b/feature/main/src/main/java/io/github/droidkaigi/confsched2023/main/MainScreen.kt @@ -201,12 +201,11 @@ private fun MainScreen( ) } }, - contentWindowInsets = WindowInsets(0.dp), ) { padding -> NavHost( navController = mainNestedNavController, startDestination = "timetable", - modifier = Modifier.padding(padding), + modifier = Modifier, enterTransition = { materialFadeThroughIn() }, exitTransition = { materialFadeThroughOut() }, ) { diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableScreen.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableScreen.kt index 6547455af..23fbecaad 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableScreen.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableScreen.kt @@ -54,6 +54,7 @@ fun NavGraphBuilder.nestedSessionScreens( onTimetableItemClick: (TimetableItem) -> Unit, onBookmarkIconClick: () -> Unit, modifier: Modifier = Modifier, + contentPadding: PaddingValues, ) { composable(timetableScreenRoute) { TimetableScreen( diff --git a/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/StampsScreen.kt b/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/StampsScreen.kt index 28066dd6b..81db8ac30 100644 --- a/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/StampsScreen.kt +++ b/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/StampsScreen.kt @@ -1,5 +1,6 @@ package io.github.droidkaigi.confsched2023.stamps +import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.calculateEndPadding import androidx.compose.foundation.layout.calculateStartPadding import androidx.compose.foundation.layout.padding @@ -25,6 +26,7 @@ import kotlinx.collections.immutable.ImmutableList const val stampsScreenRoute = "stamps" fun NavGraphBuilder.nestedStampsScreen( onStampsClick: () -> Unit, + contentPadding: PaddingValues, ) { composable(stampsScreenRoute) { StampsScreen( From f243f55463ea047b1c5b8a8f283f28b03a4724bc Mon Sep 17 00:00:00 2001 From: matsudamper Date: Fri, 25 Aug 2023 23:50:26 +0900 Subject: [PATCH 10/32] fix timeline window insets --- .../confsched2023/sessions/TimetableScreen.kt | 23 +++++++++++-- .../sessions/section/TimetableGrid.kt | 9 +++++- .../sessions/section/TimetableList.kt | 3 ++ .../sessions/section/TimetableSheet.kt | 32 +++++++++++++++++-- .../sessions/section/TimetableShimmerList.kt | 7 +++- 5 files changed, 67 insertions(+), 7 deletions(-) diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableScreen.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableScreen.kt index 23fbecaad..0bb95c86d 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableScreen.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableScreen.kt @@ -4,8 +4,11 @@ import android.content.res.Configuration import androidx.compose.foundation.background import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.asPaddingValues +import androidx.compose.foundation.layout.calculateEndPadding +import androidx.compose.foundation.layout.calculateStartPadding import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding @@ -26,6 +29,7 @@ import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.layout.layout import androidx.compose.ui.layout.onGloballyPositioned import androidx.compose.ui.platform.LocalConfiguration +import androidx.compose.ui.platform.LocalLayoutDirection import androidx.compose.ui.platform.testTag import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel @@ -61,6 +65,7 @@ fun NavGraphBuilder.nestedSessionScreens( onSearchClick = onSearchClick, onTimetableItemClick = onTimetableItemClick, onBookmarkIconClick = onBookmarkIconClick, + contentPadding = contentPadding, modifier = modifier, ) } @@ -81,6 +86,7 @@ fun TimetableScreen( onTimetableItemClick: (TimetableItem) -> Unit, onBookmarkIconClick: () -> Unit, modifier: Modifier = Modifier, + contentPadding: PaddingValues = PaddingValues(), viewModel: TimetableScreenViewModel = hiltViewModel(), ) { val uiState by viewModel.uiState.collectAsState() @@ -98,6 +104,7 @@ fun TimetableScreen( onBookmarkIconClick = onBookmarkIconClick, onSearchClick = onSearchClick, onTimetableUiChangeClick = viewModel::onUiTypeChange, + contentPadding = contentPadding, modifier = modifier, ) } @@ -139,8 +146,10 @@ private fun TimetableScreen( onSearchClick: () -> Unit, onTimetableUiChangeClick: () -> Unit, modifier: Modifier = Modifier, + contentPadding: PaddingValues = PaddingValues(), ) { val state = rememberTimetableScreenScrollState() + val layoutDirection = LocalLayoutDirection.current val gradientEndRatio = if (LocalConfiguration.current.orientation == Configuration.ORIENTATION_PORTRAIT) { 0.2f @@ -174,11 +183,16 @@ private fun TimetableScreen( onBookmarkIconClick, ) }, + contentWindowInsets = WindowInsets( + left = contentPadding.calculateLeftPadding(layoutDirection), + top = contentPadding.calculateTopPadding(), + right = contentPadding.calculateRightPadding(layoutDirection), + bottom = contentPadding.calculateBottomPadding(), + ), containerColor = Color.Transparent, - contentWindowInsets = WindowInsets(0.dp), ) { innerPadding -> Box( - modifier = Modifier.padding(innerPadding), + modifier = Modifier.padding(top = innerPadding.calculateTopPadding()), ) { TimetableHeader( modifier = Modifier @@ -208,6 +222,11 @@ private fun TimetableScreen( uiState = uiState.contentUiState, timetableScreenScrollState = state, onFavoriteClick = onBookmarkClick, + windowInsetsPadding = PaddingValues( + bottom = innerPadding.calculateBottomPadding(), + start = innerPadding.calculateStartPadding(layoutDirection), + end = innerPadding.calculateEndPadding(layoutDirection), + ), ) } } diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableGrid.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableGrid.kt index 3d006d333..9b767eb93 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableGrid.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableGrid.kt @@ -73,15 +73,22 @@ fun TimetableGrid( uiState: TimetableGridUiState, nestedScrollDispatcher: NestedScrollDispatcher, onTimetableItemClick: (TimetableItem) -> Unit, + contentPadding: PaddingValues, modifier: Modifier = Modifier, ) { val timetableGridState = rememberTimetableGridState() + val layoutDirection = LocalLayoutDirection.current TimetableGrid( timetable = uiState.timetable, timetableState = timetableGridState, nestedScrollDispatcher = nestedScrollDispatcher, modifier = modifier, - contentPadding = PaddingValues(16.dp), + contentPadding = PaddingValues( + top = 16.dp + contentPadding.calculateTopPadding(), + bottom = 16.dp + contentPadding.calculateBottomPadding(), + start = 16.dp + contentPadding.calculateStartPadding(layoutDirection), + end = 16.dp + contentPadding.calculateEndPadding(layoutDirection), + ), ) { timetableItem, itemHeightPx -> TimetableGridItem( timetableItem = timetableItem, diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableList.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableList.kt index 927f37fb5..26e938a35 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableList.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableList.kt @@ -4,6 +4,7 @@ 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.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.height @@ -51,12 +52,14 @@ fun TimetableList( scrollState: LazyListState, onBookmarkClick: (TimetableItem) -> Unit, onTimetableItemClick: (TimetableItem) -> Unit, + contentPadding: PaddingValues, modifier: Modifier = Modifier, ) { val density = LocalDensity.current LazyColumn( modifier = modifier.testTag(TimetableListTestTag), state = scrollState, + contentPadding = contentPadding, ) { itemsIndexed(uiState.timetableItemMap.toList(), key = { _, (key, _) -> key }) { index, (_, timetableItems) -> var rowHeight by remember { mutableIntStateOf(0) } diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableSheet.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableSheet.kt index ea94c5f80..a0f918d0f 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableSheet.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableSheet.kt @@ -2,7 +2,11 @@ package io.github.droidkaigi.confsched2023.sessions.section import androidx.compose.animation.core.animateIntAsState import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.calculateEndPadding +import androidx.compose.foundation.layout.calculateStartPadding import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Surface @@ -19,6 +23,7 @@ import androidx.compose.ui.input.nestedscroll.NestedScrollConnection import androidx.compose.ui.input.nestedscroll.NestedScrollDispatcher import androidx.compose.ui.input.nestedscroll.NestedScrollSource import androidx.compose.ui.input.nestedscroll.nestedScroll +import androidx.compose.ui.platform.LocalLayoutDirection import androidx.compose.ui.unit.dp import io.github.droidkaigi.confsched2023.model.DroidKaigi2023Day import io.github.droidkaigi.confsched2023.model.TimetableItem @@ -48,6 +53,7 @@ fun TimetableSheet( timetableScreenScrollState: TimetableScreenScrollState, onTimetableItemClick: (TimetableItem) -> Unit, onFavoriteClick: (TimetableItem) -> Unit, + windowInsetsPadding: PaddingValues, modifier: Modifier = Modifier, ) { var selectedDay by rememberSaveable { mutableStateOf(DroidKaigi2023Day.initialSelectedDay()) } @@ -55,8 +61,9 @@ fun TimetableSheet( if (timetableScreenScrollState.isScreenLayoutCalculating || timetableScreenScrollState.isSheetExpandable) 40 else 0, label = "Timetable corner state", ) + val layoutDirection = LocalLayoutDirection.current Surface( - modifier = modifier, + modifier = modifier.padding(windowInsetsPadding.calculateTopPadding()), shape = RoundedCornerShape(topStart = corner.dp, topEnd = corner.dp), ) { val timetableSheetContentScrollState = rememberTimetableSheetContentScrollState() @@ -66,6 +73,10 @@ fun TimetableSheet( .nestedScroll(timetableSheetContentScrollState.nestedScrollConnection), ) { TimetableTabRow( + modifier = Modifier.padding( + start = windowInsetsPadding.calculateStartPadding(layoutDirection), + end = windowInsetsPadding.calculateEndPadding(layoutDirection), + ), tabState = timetableSheetContentScrollState.tabScrollState, selectedTabIndex = DroidKaigi2023Day.entries.indexOf(selectedDay), ) { @@ -84,8 +95,13 @@ fun TimetableSheet( is Empty -> { TimetableShimmerList( modifier = Modifier - .fillMaxSize() - .weight(1f), + .weight(1f) + .fillMaxSize(), + contentPadding = PaddingValues( + bottom = windowInsetsPadding.calculateBottomPadding(), + start = windowInsetsPadding.calculateStartPadding(layoutDirection), + end = windowInsetsPadding.calculateEndPadding(layoutDirection), + ), ) } @@ -98,6 +114,11 @@ fun TimetableSheet( modifier = Modifier .fillMaxSize() .weight(1f), + contentPadding = PaddingValues( + bottom = windowInsetsPadding.calculateBottomPadding(), + start = windowInsetsPadding.calculateStartPadding(layoutDirection), + end = windowInsetsPadding.calculateEndPadding(layoutDirection), + ), ) } @@ -114,6 +135,11 @@ fun TimetableSheet( nestedScrollDispatcher, ) .weight(1f), + contentPadding = PaddingValues( + bottom = windowInsetsPadding.calculateBottomPadding(), + start = windowInsetsPadding.calculateStartPadding(layoutDirection), + end = windowInsetsPadding.calculateEndPadding(layoutDirection), + ), ) } } diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableShimmerList.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableShimmerList.kt index 0a48f2f98..8e6c5ef92 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableShimmerList.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableShimmerList.kt @@ -1,5 +1,6 @@ package io.github.droidkaigi.confsched2023.sessions.section +import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.padding @@ -14,9 +15,13 @@ import io.github.droidkaigi.confsched2023.sessions.component.TimetableShimmerLis const val TimetableShimmerListTestTag = "TimetableShimmerList" @Composable -fun TimetableShimmerList(modifier: Modifier = Modifier) { +fun TimetableShimmerList( + contentPadding: PaddingValues, + modifier: Modifier = Modifier, +) { LazyColumn( modifier = modifier.testTag(TimetableShimmerListTestTag), + contentPadding = contentPadding, ) { items(10) { Row(modifier = Modifier.padding(start = 16.dp, top = 10.dp, end = 16.dp)) { From 6e753b57e044bbd7eaa2733c7eb9edfe48dc4d52 Mon Sep 17 00:00:00 2001 From: matsudamper Date: Sat, 26 Aug 2023 01:24:30 +0900 Subject: [PATCH 11/32] fix floor window insets --- .../confsched2023/floormap/FloorMapScreen.kt | 61 +++++++++++++++---- .../section/FloorMapAndSideEventList.kt | 7 ++- 2 files changed, 56 insertions(+), 12 deletions(-) diff --git a/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt b/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt index 3a6e49db9..12210a175 100644 --- a/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt +++ b/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt @@ -7,6 +7,8 @@ import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.calculateEndPadding +import androidx.compose.foundation.layout.calculateStartPadding import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width @@ -38,7 +40,7 @@ import androidx.compose.ui.input.nestedscroll.NestedScrollConnection import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.layout.onGloballyPositioned import androidx.compose.ui.layout.positionInParent -import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.platform.LocalLayoutDirection import androidx.compose.ui.platform.testTag import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp @@ -73,6 +75,7 @@ fun NavGraphBuilder.nestedFloorMapScreen( FloorMapScreen( windowSize = windowSize, onSideEventClick = onSideEventClick, + contentPadding = contentPadding ) } } @@ -90,6 +93,7 @@ const val FloorMapScreenTestTag = "FloorMapScreen" fun FloorMapScreen( windowSize: WindowSizeClass, onSideEventClick: (url: String) -> Unit, + contentPadding: PaddingValues = PaddingValues(), viewModel: FloorMapScreenViewModel = hiltViewModel(), ) { val uiState by viewModel.uiState.collectAsState() @@ -106,6 +110,7 @@ fun FloorMapScreen( snackbarHostState = snackbarHostState, onSideEventClick = onSideEventClick, onClickFloorLevelSwitcher = viewModel::onClickFloorLevelSwitcher, + contentPadding = contentPadding, ) } @@ -135,10 +140,11 @@ private fun FloorMapScreen( snackbarHostState: SnackbarHostState, onSideEventClick: (url: String) -> Unit, onClickFloorLevelSwitcher: (FloorLevel) -> Unit, + contentPadding: PaddingValues = PaddingValues(), ) { val scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior() + val layoutDirection = LocalLayoutDirection.current Scaffold( - contentWindowInsets = WindowInsets(0.dp), // https://stackoverflow.com/a/75962622 snackbarHost = { SnackbarHost(snackbarHostState) }, modifier = Modifier.testTag(FloorMapScreenTestTag), topBar = { @@ -161,9 +167,15 @@ private fun FloorMapScreen( scrollBehavior = scrollBehavior, ) }, + contentWindowInsets = WindowInsets( + left = contentPadding.calculateLeftPadding(layoutDirection), + top = contentPadding.calculateTopPadding(), + right = contentPadding.calculateRightPadding(layoutDirection), + bottom = contentPadding.calculateBottomPadding(), + ), content = { innerPadding -> FloorMapContent( - innerPadding = innerPadding, + contentPadding = innerPadding, widthSizeClass = widthSizeClass, nestedScrollConnection = scrollBehavior.nestedScrollConnection, uiState = uiState, @@ -176,22 +188,28 @@ private fun FloorMapScreen( @Composable private fun FloorMapContent( - innerPadding: PaddingValues, + contentPadding: PaddingValues, widthSizeClass: WindowWidthSizeClass, nestedScrollConnection: NestedScrollConnection, uiState: FloorMapScreenUiState, onSideEventClick: (url: String) -> Unit, onClickFloorLevelSwitcher: (FloorLevel) -> Unit, ) { + val layoutDirection = LocalLayoutDirection.current + val childContentPadding = PaddingValues( + start = contentPadding.calculateStartPadding(layoutDirection) + 16.dp, + top = contentPadding.calculateTopPadding(), + end = contentPadding.calculateEndPadding(layoutDirection) + 16.dp, + bottom = contentPadding.calculateBottomPadding(), + ) BoxWithConstraints( - Modifier - .padding(innerPadding) - .padding(horizontal = 16.dp), + Modifier, ) { if (widthSizeClass != WindowWidthSizeClass.Compact) { LargeScreenContent( uiState = uiState.largeFloorMapContentUiState, onSideEventClick = onSideEventClick, + contentPadding = childContentPadding, ) } else { MobileContent( @@ -199,6 +217,7 @@ private fun FloorMapContent( uiState = uiState, onSideEventClick = onSideEventClick, onClickFloorLevelSwitcher = onClickFloorLevelSwitcher, + contentPadding = childContentPadding ) } } @@ -210,21 +229,24 @@ private fun MobileContent( uiState: FloorMapScreenUiState, onSideEventClick: (url: String) -> Unit, onClickFloorLevelSwitcher: (FloorLevel) -> Unit, + contentPadding: PaddingValues, ) { - val density = LocalDensity.current + val layoutDirection = LocalLayoutDirection.current var boxHeight by remember { mutableIntStateOf(0) } var switcherPosition by remember { mutableFloatStateOf(0f) } + val switcherBottomPadding = 24.dp val gradientStartRatio by remember { derivedStateOf { if (boxHeight == 0 || switcherPosition == 0f) { 1f } else { - switcherPosition / (boxHeight - with(density) { 24.dp.toPx() }) + switcherPosition / (boxHeight) } } } Box( Modifier + .fillMaxSize() .onGloballyPositioned { boxHeight = it.size.height }, @@ -243,13 +265,18 @@ private fun MobileContent( 1f to Color.Transparent, ), ), + contentPadding = contentPadding, ) FloorLevelSwitcher( selectingFloorLevel = uiState.floorLevel, onClickFloorLevelSwitcher = onClickFloorLevelSwitcher, modifier = Modifier .align(Alignment.BottomCenter) - .padding(bottom = 24.dp) + .padding( + start = contentPadding.calculateStartPadding(layoutDirection), + end = contentPadding.calculateEndPadding(layoutDirection), + ) + .padding(bottom = switcherBottomPadding + contentPadding.calculateBottomPadding()) .onGloballyPositioned { switcherPosition = it.positionInParent().y }, @@ -260,12 +287,15 @@ private fun MobileContent( @Composable private fun LargeScreenContent( uiState: LargeFloorMapContentUiState, + contentPadding: PaddingValues, onSideEventClick: (url: String) -> Unit, ) { + val layoutDirection = LocalLayoutDirection.current Row( Modifier .fillMaxSize(), ) { + Spacer(modifier = Modifier.width(contentPadding.calculateStartPadding(layoutDirection))) Column( modifier = Modifier.weight(0.8f), ) { @@ -273,6 +303,10 @@ private fun LargeScreenContent( floorMapUiState = FloorMapUiState.of(Basement), sideEventListUiState = uiState.baseSideEventListUiState, onSideEventClick = onSideEventClick, + contentPadding = PaddingValues( + top = contentPadding.calculateTopPadding(), + bottom = contentPadding.calculateBottomPadding(), + ), ) } Spacer(modifier = Modifier.width(16.dp)) @@ -283,8 +317,13 @@ private fun LargeScreenContent( floorMapUiState = FloorMapUiState.of(Ground), sideEventListUiState = uiState.groundSideEventListUiState, onSideEventClick = onSideEventClick, + contentPadding = PaddingValues( + top = contentPadding.calculateTopPadding(), + bottom = contentPadding.calculateBottomPadding(), + ), ) } + Spacer(modifier = Modifier.width(contentPadding.calculateEndPadding(layoutDirection))) } } @@ -295,6 +334,7 @@ fun PreviewFloorMapScreen() { KaigiTheme { Surface { FloorMapScreen( + widthSizeClass = WindowWidthSizeClass.Compact, uiState = FloorMapScreenUiState( floorLevel = Basement, largeFloorMapContentUiState = LargeFloorMapContentUiState( @@ -318,7 +358,6 @@ fun PreviewFloorMapScreen() { snackbarHostState = SnackbarHostState(), onSideEventClick = {}, onClickFloorLevelSwitcher = {}, - widthSizeClass = WindowWidthSizeClass.Compact, ) } } diff --git a/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/section/FloorMapAndSideEventList.kt b/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/section/FloorMapAndSideEventList.kt index 8be6febf5..084f26792 100644 --- a/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/section/FloorMapAndSideEventList.kt +++ b/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/section/FloorMapAndSideEventList.kt @@ -1,5 +1,6 @@ package io.github.droidkaigi.confsched2023.floormap.section +import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.height import androidx.compose.foundation.lazy.LazyColumn @@ -25,9 +26,13 @@ fun FloorMapAndSideEventList( floorMapUiState: FloorMapUiState, sideEventListUiState: FloorMapSideEventListUiState, onSideEventClick: (url: String) -> Unit, + contentPadding: PaddingValues, modifier: Modifier = Modifier, ) { - LazyColumn(modifier = modifier) { + LazyColumn( + modifier = modifier, + contentPadding = contentPadding, + ) { item { FloorMap(uiState = floorMapUiState) } From 19380e6b30ce481bf9eb28a2a62e467d4a19aaa8 Mon Sep 17 00:00:00 2001 From: matsudamper Date: Sat, 26 Aug 2023 01:28:19 +0900 Subject: [PATCH 12/32] fix contributor window insets --- .../contributors/ContributorsScreen.kt | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/feature/contributors/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/contributors/ContributorsScreen.kt b/feature/contributors/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/contributors/ContributorsScreen.kt index c52d5be4b..5c44ed3fe 100644 --- a/feature/contributors/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/contributors/ContributorsScreen.kt +++ b/feature/contributors/src/commonMain/kotlin/io/github/droidkaigi/confsched2023/contributors/ContributorsScreen.kt @@ -4,7 +4,6 @@ import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.material.icons.Icons @@ -21,8 +20,8 @@ import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier import androidx.compose.ui.input.nestedscroll.nestedScroll +import androidx.compose.ui.platform.LocalLayoutDirection import androidx.compose.ui.platform.testTag -import androidx.compose.ui.unit.dp import io.github.droidkaigi.confsched2023.contributors.component.ContributorListItem import io.github.droidkaigi.confsched2023.model.Contributor import kotlinx.collections.immutable.PersistentList @@ -37,13 +36,14 @@ fun ContributorsScreen( viewModel: ContributorsViewModel, onNavigationIconClick: () -> Unit, onContributorItemClick: (url: String) -> Unit, - contentPadding: PaddingValues + contentPadding: PaddingValues = PaddingValues(), ) { val uiState by viewModel.uiState.collectAsState() ContributorsScreen( uiState = uiState, onBackClick = onNavigationIconClick, - onContributorItemClick = onContributorItemClick + onContributorItemClick = onContributorItemClick, + contentPadding = contentPadding, ) } @@ -53,8 +53,10 @@ private fun ContributorsScreen( uiState: ContributorsUiState, onBackClick: () -> Unit, onContributorItemClick: (url: String) -> Unit, + contentPadding: PaddingValues, ) { val scrollBehavior = TopAppBarDefaults.exitUntilCollapsedScrollBehavior() + val localLayoutDirection = LocalLayoutDirection.current Scaffold( modifier = Modifier.testTag(ContributorsScreenTestTag), topBar = { @@ -75,15 +77,20 @@ private fun ContributorsScreen( scrollBehavior = scrollBehavior ) }, - contentWindowInsets = WindowInsets(0.dp), - ) { padding -> + contentWindowInsets = WindowInsets( + left = contentPadding.calculateLeftPadding(localLayoutDirection), + top = contentPadding.calculateTopPadding(), + right = contentPadding.calculateRightPadding(localLayoutDirection), + bottom = contentPadding.calculateBottomPadding(), + ), + ) { innerContentPadding -> Contributors( contributors = uiState.contributors, onContributorItemClick = onContributorItemClick, modifier = Modifier .fillMaxSize() - .padding(padding) - .nestedScroll(scrollBehavior.nestedScrollConnection) + .nestedScroll(scrollBehavior.nestedScrollConnection), + contentPadding = innerContentPadding, ) } } @@ -93,10 +100,11 @@ private fun Contributors( contributors: PersistentList, onContributorItemClick: (url: String) -> Unit, modifier: Modifier = Modifier, + contentPadding: PaddingValues, ) { - // FIXME: Bottom Inset not implemented LazyColumn( - modifier = modifier + modifier = modifier, + contentPadding = contentPadding, ) { items(contributors) { ContributorListItem( @@ -106,4 +114,4 @@ private fun Contributors( ) } } -} \ No newline at end of file +} From 7ec1deb140e01ef2f801cfacafeefc0854bd1208 Mon Sep 17 00:00:00 2001 From: matsudamper Date: Sat, 26 Aug 2023 01:36:39 +0900 Subject: [PATCH 13/32] fix stampcard window insets --- .../confsched2023/stamps/StampsScreen.kt | 25 +++++++++++-------- .../confsched2023/stamps/section/StampList.kt | 11 ++++++-- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/StampsScreen.kt b/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/StampsScreen.kt index 81db8ac30..d6f88d300 100644 --- a/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/StampsScreen.kt +++ b/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/StampsScreen.kt @@ -1,9 +1,7 @@ package io.github.droidkaigi.confsched2023.stamps import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.foundation.layout.calculateEndPadding -import androidx.compose.foundation.layout.calculateStartPadding -import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.WindowInsets import androidx.compose.material3.Scaffold import androidx.compose.material3.SnackbarHost import androidx.compose.material3.SnackbarHostState @@ -31,6 +29,7 @@ fun NavGraphBuilder.nestedStampsScreen( composable(stampsScreenRoute) { StampsScreen( onStampsClick = onStampsClick, + contentPadding = contentPadding, ) } } @@ -47,6 +46,7 @@ const val StampsScreenTestTag = "StampsScreen" @Composable fun StampsScreen( onStampsClick: () -> Unit, + contentPadding: PaddingValues = PaddingValues(), viewModel: StampsScreenViewModel = hiltViewModel(), ) { val uiState by viewModel.uiState.collectAsState() @@ -60,6 +60,7 @@ fun StampsScreen( uiState = uiState, snackbarHostState = snackbarHostState, onStampsClick = onStampsClick, + contentPadding = contentPadding, ) } @@ -72,21 +73,23 @@ private fun StampsScreen( uiState: StampsScreenUiState, snackbarHostState: SnackbarHostState, onStampsClick: () -> Unit, + contentPadding: PaddingValues, ) { + val layoutDirection = LocalLayoutDirection.current Scaffold( modifier = Modifier.testTag(StampsScreenTestTag), snackbarHost = { SnackbarHost(snackbarHostState) }, - content = { padding -> - val layoutDirection = LocalLayoutDirection.current - + contentWindowInsets = WindowInsets( + left = contentPadding.calculateLeftPadding(layoutDirection), + top = contentPadding.calculateTopPadding(), + right = contentPadding.calculateRightPadding(layoutDirection), + bottom = contentPadding.calculateBottomPadding(), + ), + content = { innerPadding -> StampList( stamps = uiState.stamps, onStampsClick = onStampsClick, - modifier = Modifier.padding( - top = padding.calculateTopPadding(), - start = padding.calculateStartPadding(layoutDirection), - end = padding.calculateEndPadding(layoutDirection), - ), + contentPadding = innerPadding, ) }, ) diff --git a/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/section/StampList.kt b/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/section/StampList.kt index 04383250c..42d140ac8 100644 --- a/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/section/StampList.kt +++ b/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/section/StampList.kt @@ -2,12 +2,15 @@ package io.github.droidkaigi.confsched2023.stamps.section import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.calculateEndPadding +import androidx.compose.foundation.layout.calculateStartPadding import androidx.compose.foundation.lazy.grid.GridCells.Fixed import androidx.compose.foundation.lazy.grid.GridItemSpan import androidx.compose.foundation.lazy.grid.LazyVerticalGrid import androidx.compose.foundation.lazy.grid.items import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalLayoutDirection import androidx.compose.ui.unit.dp import io.github.droidkaigi.confsched2023.model.Stamp import io.github.droidkaigi.confsched2023.stamps.component.StampImage @@ -22,14 +25,18 @@ private const val DoubleItemSpanCount = 2 / 2 fun StampList( stamps: ImmutableList, onStampsClick: () -> Unit, + contentPadding: PaddingValues, modifier: Modifier = Modifier, ) { + val layoutDirection = LocalLayoutDirection.current LazyVerticalGrid( columns = Fixed(StampListColumns), modifier = modifier, contentPadding = PaddingValues( - horizontal = 16.dp, - vertical = 20.dp, + start = 16.dp + contentPadding.calculateStartPadding(layoutDirection), + end = 16.dp + contentPadding.calculateEndPadding(layoutDirection), + top = 20.dp + contentPadding.calculateTopPadding(), + bottom = 20.dp + contentPadding.calculateBottomPadding(), ), horizontalArrangement = Arrangement.spacedBy(8.dp), verticalArrangement = Arrangement.spacedBy(16.dp), From d3f9ed9f62a110e2140d728f58541dadef00afa4 Mon Sep 17 00:00:00 2001 From: matsudamper Date: Sat, 26 Aug 2023 01:39:20 +0900 Subject: [PATCH 14/32] fix about window insets --- .../confsched2023/about/AboutScreen.kt | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/feature/about/src/main/java/io/github/droidkaigi/confsched2023/about/AboutScreen.kt b/feature/about/src/main/java/io/github/droidkaigi/confsched2023/about/AboutScreen.kt index 83443d32f..66fada3da 100644 --- a/feature/about/src/main/java/io/github/droidkaigi/confsched2023/about/AboutScreen.kt +++ b/feature/about/src/main/java/io/github/droidkaigi/confsched2023/about/AboutScreen.kt @@ -5,6 +5,7 @@ import android.content.pm.PackageManager.PackageInfoFlags import android.os.Build.VERSION import android.os.Build.VERSION_CODES import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.calculateEndPadding import androidx.compose.foundation.layout.calculateStartPadding import androidx.compose.foundation.layout.padding @@ -47,6 +48,7 @@ fun NavGraphBuilder.nestedAboutScreen( AboutScreen( onAboutItemClick = onAboutItemClick, onLinkClick = onLinkClick, + contentPadding = contentPadding, ) } } @@ -64,6 +66,7 @@ const val AboutScreenTestTag = "AboutScreen" fun AboutScreen( onAboutItemClick: (AboutItem) -> Unit, viewModel: AboutScreenViewModel = hiltViewModel(), + contentPadding: PaddingValues = PaddingValues(), onLinkClick: (url: String) -> Unit, ) { // val uiState by viewModel.uiState.collectAsState() @@ -81,6 +84,7 @@ fun AboutScreen( onAboutItemClick = onAboutItemClick, versionName = versionName, onLinkClick = onLinkClick, + contentPadding = contentPadding, ) } @@ -94,8 +98,10 @@ private fun AboutScreen( onAboutItemClick: (AboutItem) -> Unit, versionName: String?, onLinkClick: (url: String) -> Unit, + contentPadding: PaddingValues, ) { val scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior() + val layoutDirection = LocalLayoutDirection.current Scaffold( modifier = Modifier.testTag(AboutScreenTestTag), topBar = { @@ -119,15 +125,17 @@ private fun AboutScreen( ) }, snackbarHost = { SnackbarHost(snackbarHostState) }, + contentWindowInsets = WindowInsets( + left = contentPadding.calculateLeftPadding(layoutDirection), + top = contentPadding.calculateTopPadding(), + right = contentPadding.calculateRightPadding(layoutDirection), + bottom = contentPadding.calculateBottomPadding(), + ), content = { padding -> LazyColumn( Modifier - .padding( - top = padding.calculateTopPadding(), - start = padding.calculateStartPadding(LocalLayoutDirection.current), - end = padding.calculateEndPadding(LocalLayoutDirection.current), - ) .nestedScroll(scrollBehavior.nestedScrollConnection), + contentPadding = padding, ) { item { AboutDroidKaigiDetail( From 2ab973de33bea66222620668fb335d1abc934fc9 Mon Sep 17 00:00:00 2001 From: matsudamper Date: Sat, 26 Aug 2023 01:45:58 +0900 Subject: [PATCH 15/32] fix bookmark window insets --- .../confsched2023/sessions/BookmarkScreen.kt | 7 ++----- .../confsched2023/sessions/section/BookmarkList.kt | 3 +++ .../sessions/section/BookmarkSheet.kt | 14 +++++++++++--- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/BookmarkScreen.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/BookmarkScreen.kt index ac622280c..0b4796915 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/BookmarkScreen.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/BookmarkScreen.kt @@ -1,7 +1,5 @@ package io.github.droidkaigi.confsched2023.sessions -import androidx.compose.foundation.layout.WindowInsets -import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.material3.Scaffold import androidx.compose.runtime.Composable @@ -9,7 +7,6 @@ import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier import androidx.compose.ui.platform.testTag -import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel import androidx.navigation.NavController import io.github.droidkaigi.confsched2023.model.TimetableItem @@ -68,10 +65,9 @@ private fun BookmarkScreen( onBackPressClick = onBackPressClick, ) }, - contentWindowInsets = WindowInsets(0.dp), ) { padding -> BookmarkSheet( - modifier = Modifier.padding(padding), + modifier = Modifier, scrollState = scrollState, onTimetableItemClick = onTimetableItemClick, onBookmarkClick = onBookmarkClick, @@ -79,6 +75,7 @@ private fun BookmarkScreen( onDayFirstChipClick = onDayFirstChipClick, onDaySecondChipClick = onDaySecondChipClick, onDayThirdChipClick = onDayThirdChipClick, + contentPadding = padding, uiState = uiState.contentUiState, ) } diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkList.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkList.kt index 7ee119366..6e2eea611 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkList.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkList.kt @@ -2,6 +2,7 @@ package io.github.droidkaigi.confsched2023.sessions.section import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.offset @@ -42,12 +43,14 @@ fun BookmarkList( timetableItemMap: PersistentMap>, onTimetableItemClick: (TimetableItem) -> Unit, onBookmarkIconClick: (TimetableItem) -> Unit, + contentPadding: PaddingValues, modifier: Modifier = Modifier, ) { val density = LocalDensity.current LazyColumn( state = scrollState, modifier = modifier, + contentPadding = contentPadding, ) { itemsIndexed(timetableItemMap.toList(), key = { _, (key, _) -> key }) { index, (_, values) -> var rowHeight by remember { mutableIntStateOf(0) } diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkSheet.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkSheet.kt index 357123266..942534943 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkSheet.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkSheet.kt @@ -4,9 +4,11 @@ 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.PaddingValues import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.lazy.LazyListState import androidx.compose.foundation.shape.RoundedCornerShape @@ -69,6 +71,7 @@ fun BookmarkSheet( onDayFirstChipClick: () -> Unit, onDaySecondChipClick: () -> Unit, onDayThirdChipClick: () -> Unit, + contentPadding: PaddingValues, modifier: Modifier = Modifier, ) { Column( @@ -87,7 +90,9 @@ fun BookmarkSheet( ) when (uiState) { is Empty -> { - EmptyView() + EmptyView( + modifier = Modifier.padding(contentPadding) + ) } is ListBookmark -> { @@ -97,6 +102,7 @@ fun BookmarkSheet( timetableItemMap = uiState.timetableItemMap, onTimetableItemClick = onTimetableItemClick, onBookmarkIconClick = onBookmarkClick, + contentPadding = contentPadding, ) } } @@ -104,9 +110,11 @@ fun BookmarkSheet( } @Composable -private fun EmptyView() { +private fun EmptyView( + modifier: Modifier, +) { Column( - modifier = Modifier.fillMaxSize(), + modifier = modifier.fillMaxSize(), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center, ) { From 71bfe23360ef361b4601721cdd588bd076139602 Mon Sep 17 00:00:00 2001 From: matsudamper Date: Sat, 26 Aug 2023 02:12:14 +0900 Subject: [PATCH 16/32] fix name --- .../io/github/droidkaigi/confsched2023/KaigiApp.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app-android/src/main/java/io/github/droidkaigi/confsched2023/KaigiApp.kt b/app-android/src/main/java/io/github/droidkaigi/confsched2023/KaigiApp.kt index 227b8f71e..22ba92232 100644 --- a/app-android/src/main/java/io/github/droidkaigi/confsched2023/KaigiApp.kt +++ b/app-android/src/main/java/io/github/droidkaigi/confsched2023/KaigiApp.kt @@ -135,13 +135,13 @@ private fun NavGraphBuilder.mainScreen( windowSize = windowSize, displayFeatures = displayFeatures, mainNestedGraphStateHolder = KaigiAppMainNestedGraphStateHolder(), - mainNestedGraph = { mainNestedNavController, paddingValues -> + mainNestedGraph = { mainNestedNavController, contentPadding -> nestedSessionScreens( modifier = Modifier, onSearchClick = navController::navigateSearchScreen, onTimetableItemClick = navController::navigateToTimetableItemDetailScreen, onBookmarkIconClick = navController::navigateToBookmarkScreen, - contentPadding = paddingValues, + contentPadding = contentPadding, ) nestedAboutScreen( onAboutItemClick = { aboutItem -> @@ -158,18 +158,18 @@ private fun NavGraphBuilder.mainScreen( } }, onLinkClick = externalNavController::navigate, - contentPadding = paddingValues, + contentPadding = contentPadding, ) nestedFloorMapScreen( windowSize = windowSize, onSideEventClick = externalNavController::navigate, - contentPadding = paddingValues, + contentPadding = contentPadding, ) nestedStampsScreen( onStampsClick = { TODO() }, - contentPadding = paddingValues, + contentPadding = contentPadding, ) // For KMP, we are not using navigation abstraction for contributors screen composable(contributorsScreenRoute) { @@ -177,7 +177,7 @@ private fun NavGraphBuilder.mainScreen( viewModel = hiltViewModel(), onNavigationIconClick = navController::popBackStack, onContributorItemClick = externalNavController::navigate, - contentPadding = paddingValues, + contentPadding = contentPadding, ) } }, From 9f7e2a4de3f7ed16443eb0b34046b76bdbfa17e4 Mon Sep 17 00:00:00 2001 From: matsudamper Date: Sat, 26 Aug 2023 02:32:42 +0900 Subject: [PATCH 17/32] fix require default parameter --- .../droidkaigi/confsched2023/sessions/section/BookmarkSheet.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkSheet.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkSheet.kt index 942534943..cd77d48c8 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkSheet.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkSheet.kt @@ -111,7 +111,7 @@ fun BookmarkSheet( @Composable private fun EmptyView( - modifier: Modifier, + modifier: Modifier = Modifier, ) { Column( modifier = modifier.fillMaxSize(), From fd50a272d5029f2c53bf74ce33b5486710780e5e Mon Sep 17 00:00:00 2001 From: matsudamper Date: Sat, 26 Aug 2023 02:39:17 +0900 Subject: [PATCH 18/32] fix TopAppBar Padding --- .../sessions/component/BookmarkTopArea.kt | 13 +++++++++++-- .../sessions/section/BookmarkSheet.kt | 18 +++++++++++++++--- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/BookmarkTopArea.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/BookmarkTopArea.kt index c5d0f6378..945c8c71c 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/BookmarkTopArea.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/BookmarkTopArea.kt @@ -6,10 +6,15 @@ import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.ExperimentalLayoutApi import androidx.compose.foundation.layout.FlowRow +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.WindowInsetsSides import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.only import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.systemBars +import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.foundation.lazy.LazyListState import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.material.icons.Icons @@ -109,8 +114,12 @@ fun BookmarkTopArea( Box( modifier = modifier - .height(topBarHeight) - .background(backgroundColor), + .background(backgroundColor) + .windowInsetsPadding( + WindowInsets.systemBars + .only(WindowInsetsSides.Horizontal + WindowInsetsSides.Top) + ) + .height(topBarHeight), ) { FlowRow( horizontalArrangement = Arrangement.Start, diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkSheet.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkSheet.kt index cd77d48c8..d18f55e46 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkSheet.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkSheet.kt @@ -20,8 +20,10 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalLayoutDirection import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.LayoutDirection import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import io.github.droidkaigi.confsched2023.model.DroidKaigi2023Day @@ -74,6 +76,7 @@ fun BookmarkSheet( contentPadding: PaddingValues, modifier: Modifier = Modifier, ) { + val layoutDirection = LocalLayoutDirection.current Column( modifier = modifier.fillMaxSize(), ) { @@ -86,12 +89,21 @@ fun BookmarkSheet( onDayFirstChipClick = onDayFirstChipClick, onDaySecondChipClick = onDaySecondChipClick, onDayThirdChipClick = onDayThirdChipClick, - modifier = Modifier, + modifier = Modifier.padding( + start = contentPadding.calculateLeftPadding(layoutDirection), + end = contentPadding.calculateRightPadding(layoutDirection), + top = contentPadding.calculateTopPadding() + ), + ) + val padding = PaddingValues( + start = contentPadding.calculateLeftPadding(layoutDirection), + end = contentPadding.calculateRightPadding(layoutDirection), + bottom = contentPadding.calculateBottomPadding(), ) when (uiState) { is Empty -> { EmptyView( - modifier = Modifier.padding(contentPadding) + modifier = Modifier.padding(padding) ) } @@ -102,7 +114,7 @@ fun BookmarkSheet( timetableItemMap = uiState.timetableItemMap, onTimetableItemClick = onTimetableItemClick, onBookmarkIconClick = onBookmarkClick, - contentPadding = contentPadding, + contentPadding = padding, ) } } From 08077c892c50b78c5757364e6e84a32bcec7c0fb Mon Sep 17 00:00:00 2001 From: matsudamper Date: Sat, 26 Aug 2023 03:11:51 +0900 Subject: [PATCH 19/32] Correct height offset by inset --- .../confsched2023/sessions/component/BookmarkTopArea.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/BookmarkTopArea.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/BookmarkTopArea.kt index 945c8c71c..8f1f92033 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/BookmarkTopArea.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/BookmarkTopArea.kt @@ -93,8 +93,8 @@ fun BookmarkTopArea( ) val topBarHeight = lerp( - 156.dp, - 96.dp, + 132.dp, + 72.dp, fraction, ) @@ -126,7 +126,7 @@ fun BookmarkTopArea( verticalArrangement = Arrangement.Center, maxItemsInEachRow = rowNum, modifier = Modifier - .padding(start = 16.dp, top = 46.dp) + .padding(start = 16.dp, top = 22.dp) .fillMaxWidth(), ) { Icon( From 425c20255fb4b39f42f6f38955ae35e116ca5084 Mon Sep 17 00:00:00 2001 From: matsudamper Date: Sat, 26 Aug 2023 21:48:55 +0900 Subject: [PATCH 20/32] Revert to the original design intent --- .../droidkaigi/confsched2023/floormap/FloorMapScreen.kt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt b/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt index 12210a175..6866fd4df 100644 --- a/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt +++ b/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt @@ -247,6 +247,7 @@ private fun MobileContent( Box( Modifier .fillMaxSize() + .padding(contentPadding) .onGloballyPositioned { boxHeight = it.size.height }, @@ -265,18 +266,14 @@ private fun MobileContent( 1f to Color.Transparent, ), ), - contentPadding = contentPadding, + contentPadding = PaddingValues(), ) FloorLevelSwitcher( selectingFloorLevel = uiState.floorLevel, onClickFloorLevelSwitcher = onClickFloorLevelSwitcher, modifier = Modifier .align(Alignment.BottomCenter) - .padding( - start = contentPadding.calculateStartPadding(layoutDirection), - end = contentPadding.calculateEndPadding(layoutDirection), - ) - .padding(bottom = switcherBottomPadding + contentPadding.calculateBottomPadding()) + .padding(bottom = switcherBottomPadding) .onGloballyPositioned { switcherPosition = it.positionInParent().y }, From 235f3e3bd5fde991dc784709c03a705f551ebaf9 Mon Sep 17 00:00:00 2001 From: matsudamper Date: Sat, 26 Aug 2023 21:50:00 +0900 Subject: [PATCH 21/32] format --- .../io/github/droidkaigi/confsched2023/about/AboutScreen.kt | 2 -- .../droidkaigi/confsched2023/floormap/FloorMapScreen.kt | 4 ++-- .../io/github/droidkaigi/confsched2023/main/MainScreen.kt | 2 -- .../confsched2023/sessions/component/BookmarkTopArea.kt | 2 +- .../confsched2023/sessions/section/BookmarkSheet.kt | 5 ++--- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/feature/about/src/main/java/io/github/droidkaigi/confsched2023/about/AboutScreen.kt b/feature/about/src/main/java/io/github/droidkaigi/confsched2023/about/AboutScreen.kt index 66fada3da..cb085eb6d 100644 --- a/feature/about/src/main/java/io/github/droidkaigi/confsched2023/about/AboutScreen.kt +++ b/feature/about/src/main/java/io/github/droidkaigi/confsched2023/about/AboutScreen.kt @@ -6,8 +6,6 @@ import android.os.Build.VERSION import android.os.Build.VERSION_CODES import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.WindowInsets -import androidx.compose.foundation.layout.calculateEndPadding -import androidx.compose.foundation.layout.calculateStartPadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material3.ExperimentalMaterial3Api diff --git a/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt b/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt index 6866fd4df..a170398c2 100644 --- a/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt +++ b/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt @@ -75,7 +75,7 @@ fun NavGraphBuilder.nestedFloorMapScreen( FloorMapScreen( windowSize = windowSize, onSideEventClick = onSideEventClick, - contentPadding = contentPadding + contentPadding = contentPadding, ) } } @@ -217,7 +217,7 @@ private fun FloorMapContent( uiState = uiState, onSideEventClick = onSideEventClick, onClickFloorLevelSwitcher = onClickFloorLevelSwitcher, - contentPadding = childContentPadding + contentPadding = childContentPadding, ) } } diff --git a/feature/main/src/main/java/io/github/droidkaigi/confsched2023/main/MainScreen.kt b/feature/main/src/main/java/io/github/droidkaigi/confsched2023/main/MainScreen.kt index aa63af8ed..b2cc36897 100644 --- a/feature/main/src/main/java/io/github/droidkaigi/confsched2023/main/MainScreen.kt +++ b/feature/main/src/main/java/io/github/droidkaigi/confsched2023/main/MainScreen.kt @@ -15,7 +15,6 @@ import androidx.compose.animation.fadeOut import androidx.compose.animation.scaleIn import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding import androidx.compose.material.icons.Icons @@ -36,7 +35,6 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel import androidx.navigation.NavController import androidx.navigation.NavGraphBuilder diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/BookmarkTopArea.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/BookmarkTopArea.kt index 8f1f92033..dceee839d 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/BookmarkTopArea.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/component/BookmarkTopArea.kt @@ -117,7 +117,7 @@ fun BookmarkTopArea( .background(backgroundColor) .windowInsetsPadding( WindowInsets.systemBars - .only(WindowInsetsSides.Horizontal + WindowInsetsSides.Top) + .only(WindowInsetsSides.Horizontal + WindowInsetsSides.Top), ) .height(topBarHeight), ) { diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkSheet.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkSheet.kt index d18f55e46..f08cc5cde 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkSheet.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/BookmarkSheet.kt @@ -23,7 +23,6 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalLayoutDirection import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign -import androidx.compose.ui.unit.LayoutDirection import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import io.github.droidkaigi.confsched2023.model.DroidKaigi2023Day @@ -92,7 +91,7 @@ fun BookmarkSheet( modifier = Modifier.padding( start = contentPadding.calculateLeftPadding(layoutDirection), end = contentPadding.calculateRightPadding(layoutDirection), - top = contentPadding.calculateTopPadding() + top = contentPadding.calculateTopPadding(), ), ) val padding = PaddingValues( @@ -103,7 +102,7 @@ fun BookmarkSheet( when (uiState) { is Empty -> { EmptyView( - modifier = Modifier.padding(padding) + modifier = Modifier.padding(padding), ) } From a3d295ebb3aa7e9e0d5218f1ab8973b2919a08a6 Mon Sep 17 00:00:00 2001 From: matsudamper Date: Sat, 26 Aug 2023 21:52:58 +0900 Subject: [PATCH 22/32] Match naming with other code --- .../confsched2023/sessions/TimetableScreen.kt | 2 +- .../sessions/section/TimetableSheet.kt | 26 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableScreen.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableScreen.kt index 0bb95c86d..03deba561 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableScreen.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableScreen.kt @@ -222,7 +222,7 @@ private fun TimetableScreen( uiState = uiState.contentUiState, timetableScreenScrollState = state, onFavoriteClick = onBookmarkClick, - windowInsetsPadding = PaddingValues( + contentPadding = PaddingValues( bottom = innerPadding.calculateBottomPadding(), start = innerPadding.calculateStartPadding(layoutDirection), end = innerPadding.calculateEndPadding(layoutDirection), diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableSheet.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableSheet.kt index a0f918d0f..3a08f4678 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableSheet.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/section/TimetableSheet.kt @@ -53,7 +53,7 @@ fun TimetableSheet( timetableScreenScrollState: TimetableScreenScrollState, onTimetableItemClick: (TimetableItem) -> Unit, onFavoriteClick: (TimetableItem) -> Unit, - windowInsetsPadding: PaddingValues, + contentPadding: PaddingValues, modifier: Modifier = Modifier, ) { var selectedDay by rememberSaveable { mutableStateOf(DroidKaigi2023Day.initialSelectedDay()) } @@ -63,7 +63,7 @@ fun TimetableSheet( ) val layoutDirection = LocalLayoutDirection.current Surface( - modifier = modifier.padding(windowInsetsPadding.calculateTopPadding()), + modifier = modifier.padding(contentPadding.calculateTopPadding()), shape = RoundedCornerShape(topStart = corner.dp, topEnd = corner.dp), ) { val timetableSheetContentScrollState = rememberTimetableSheetContentScrollState() @@ -74,8 +74,8 @@ fun TimetableSheet( ) { TimetableTabRow( modifier = Modifier.padding( - start = windowInsetsPadding.calculateStartPadding(layoutDirection), - end = windowInsetsPadding.calculateEndPadding(layoutDirection), + start = contentPadding.calculateStartPadding(layoutDirection), + end = contentPadding.calculateEndPadding(layoutDirection), ), tabState = timetableSheetContentScrollState.tabScrollState, selectedTabIndex = DroidKaigi2023Day.entries.indexOf(selectedDay), @@ -98,9 +98,9 @@ fun TimetableSheet( .weight(1f) .fillMaxSize(), contentPadding = PaddingValues( - bottom = windowInsetsPadding.calculateBottomPadding(), - start = windowInsetsPadding.calculateStartPadding(layoutDirection), - end = windowInsetsPadding.calculateEndPadding(layoutDirection), + bottom = contentPadding.calculateBottomPadding(), + start = contentPadding.calculateStartPadding(layoutDirection), + end = contentPadding.calculateEndPadding(layoutDirection), ), ) } @@ -115,9 +115,9 @@ fun TimetableSheet( .fillMaxSize() .weight(1f), contentPadding = PaddingValues( - bottom = windowInsetsPadding.calculateBottomPadding(), - start = windowInsetsPadding.calculateStartPadding(layoutDirection), - end = windowInsetsPadding.calculateEndPadding(layoutDirection), + bottom = contentPadding.calculateBottomPadding(), + start = contentPadding.calculateStartPadding(layoutDirection), + end = contentPadding.calculateEndPadding(layoutDirection), ), ) } @@ -136,9 +136,9 @@ fun TimetableSheet( ) .weight(1f), contentPadding = PaddingValues( - bottom = windowInsetsPadding.calculateBottomPadding(), - start = windowInsetsPadding.calculateStartPadding(layoutDirection), - end = windowInsetsPadding.calculateEndPadding(layoutDirection), + bottom = contentPadding.calculateBottomPadding(), + start = contentPadding.calculateStartPadding(layoutDirection), + end = contentPadding.calculateEndPadding(layoutDirection), ), ) } From 31ea4eeb0e749dbc4e16bf9f8840fc5057f3167e Mon Sep 17 00:00:00 2001 From: matsudamper Date: Sun, 27 Aug 2023 06:11:05 +0900 Subject: [PATCH 23/32] fix screenshot test diff --- .../droidkaigi/confsched2023/floormap/FloorMapScreen.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt b/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt index a170398c2..125463c2a 100644 --- a/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt +++ b/feature/floor-map/src/main/java/io/github/droidkaigi/confsched2023/floormap/FloorMapScreen.kt @@ -40,6 +40,7 @@ import androidx.compose.ui.input.nestedscroll.NestedScrollConnection import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.layout.onGloballyPositioned import androidx.compose.ui.layout.positionInParent +import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.platform.LocalLayoutDirection import androidx.compose.ui.platform.testTag import androidx.compose.ui.text.font.FontWeight @@ -231,7 +232,7 @@ private fun MobileContent( onClickFloorLevelSwitcher: (FloorLevel) -> Unit, contentPadding: PaddingValues, ) { - val layoutDirection = LocalLayoutDirection.current + val density = LocalDensity.current var boxHeight by remember { mutableIntStateOf(0) } var switcherPosition by remember { mutableFloatStateOf(0f) } val switcherBottomPadding = 24.dp @@ -240,7 +241,7 @@ private fun MobileContent( if (boxHeight == 0 || switcherPosition == 0f) { 1f } else { - switcherPosition / (boxHeight) + switcherPosition / (boxHeight - with(density) { switcherBottomPadding.toPx() }) } } } From 1a7fa8f923a6213937138a7476aa60ea96e79baa Mon Sep 17 00:00:00 2001 From: matsudamper Date: Sun, 27 Aug 2023 07:31:54 +0900 Subject: [PATCH 24/32] fix gradient diff --- .../confsched2023/sessions/TimetableScreen.kt | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableScreen.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableScreen.kt index 03deba561..f62bbeccf 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableScreen.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableScreen.kt @@ -23,12 +23,15 @@ import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.runtime.remember import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.drawWithCache +import androidx.compose.ui.geometry.Size import androidx.compose.ui.graphics.Brush import androidx.compose.ui.graphics.Color import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.layout.layout import androidx.compose.ui.layout.onGloballyPositioned import androidx.compose.ui.platform.LocalConfiguration +import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.platform.LocalLayoutDirection import androidx.compose.ui.platform.testTag import androidx.compose.ui.unit.dp @@ -148,6 +151,7 @@ private fun TimetableScreen( modifier: Modifier = Modifier, contentPadding: PaddingValues = PaddingValues(), ) { + val density = LocalDensity.current val state = rememberTimetableScreenScrollState() val layoutDirection = LocalLayoutDirection.current val gradientEndRatio = @@ -156,17 +160,27 @@ private fun TimetableScreen( } else { 0.5f } + val timetableTopGradient = timetableTopGradient() + val bottomPaddingPx = with(density) { contentPadding.calculateBottomPadding().toPx() } Scaffold( modifier = modifier .testTag(TimetableScreenTestTag) .nestedScroll(state.screenNestedScrollConnection) .background(timetableTopBackground()) - .background( - Brush.verticalGradient( - 0f to timetableTopGradient(), - gradientEndRatio to Color.Transparent, - ), - ), + .drawWithCache { + onDrawBehind { + drawRect( + brush = Brush.verticalGradient( + 0f to timetableTopGradient, + gradientEndRatio to Color.Transparent, + ), + size = Size( + size.width, + size.height - bottomPaddingPx, + ), + ) + } + }, snackbarHost = { SnackbarHost( hostState = snackbarHostState, From a5ffa509b3e90db8ee4463b918fed4f76ab75803 Mon Sep 17 00:00:00 2001 From: naoki-ishii Date: Sun, 27 Aug 2023 16:15:21 +0900 Subject: [PATCH 25/32] [fix]Fix TimetableItemDetailScreen automatic shrink description when bookmark --- .../confsched2023/sessions/TimetableItemDetailScreen.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableItemDetailScreen.kt b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableItemDetailScreen.kt index 3d6237029..e804c67ac 100644 --- a/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableItemDetailScreen.kt +++ b/feature/sessions/src/main/java/io/github/droidkaigi/confsched2023/sessions/TimetableItemDetailScreen.kt @@ -32,6 +32,7 @@ import io.github.droidkaigi.confsched2023.model.TimetableItem import io.github.droidkaigi.confsched2023.model.TimetableItem.Session import io.github.droidkaigi.confsched2023.model.fake import io.github.droidkaigi.confsched2023.sessions.TimetableItemDetailScreenUiState.Loaded +import io.github.droidkaigi.confsched2023.sessions.TimetableItemDetailScreenUiState.Loading import io.github.droidkaigi.confsched2023.sessions.component.TimetableItemDetailBottomAppBar import io.github.droidkaigi.confsched2023.sessions.component.TimetableItemDetailScreenTopAppBar import io.github.droidkaigi.confsched2023.sessions.section.TimetableItemDetail @@ -164,10 +165,11 @@ private fun TimetableItemDetailScreen( AnimatedContent( targetState = uiState, transitionSpec = { fadeIn().togetherWith(fadeOut()) }, + contentKey = { uiState is Loaded }, label = "TimetableItemDetailScreen", ) { when (it) { - TimetableItemDetailScreenUiState.Loading -> { + Loading -> { LoadingText( modifier = Modifier.fillMaxSize(), ) From a42155a540a8b02528395bd9349f55aa7c09c767 Mon Sep 17 00:00:00 2001 From: matsudamper Date: Mon, 28 Aug 2023 09:40:58 +0900 Subject: [PATCH 26/32] format --- .../io/github/droidkaigi/confsched2023/stamps/StampsScreen.kt | 2 +- .../github/droidkaigi/confsched2023/stamps/section/StampList.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/StampsScreen.kt b/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/StampsScreen.kt index 204860845..24ccfbb60 100644 --- a/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/StampsScreen.kt +++ b/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/StampsScreen.kt @@ -1,8 +1,8 @@ package io.github.droidkaigi.confsched2023.stamps +import androidx.annotation.RawRes import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.WindowInsets -import androidx.annotation.RawRes import androidx.compose.foundation.layout.calculateEndPadding import androidx.compose.foundation.layout.calculateStartPadding import androidx.compose.foundation.layout.padding diff --git a/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/section/StampList.kt b/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/section/StampList.kt index ba0884f89..648d07aeb 100644 --- a/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/section/StampList.kt +++ b/feature/stamps/src/main/java/io/github/droidkaigi/confsched2023/stamps/section/StampList.kt @@ -17,8 +17,8 @@ import androidx.compose.foundation.lazy.grid.items import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier -import androidx.compose.ui.platform.LocalLayoutDirection import androidx.compose.ui.graphics.Color +import androidx.compose.ui.platform.LocalLayoutDirection import androidx.compose.ui.unit.dp import com.airbnb.lottie.compose.LottieAnimation import com.airbnb.lottie.compose.LottieCompositionSpec.RawRes From 0cf4db4d59e0c61f2953eef0328deabb20e628a5 Mon Sep 17 00:00:00 2001 From: tick-taku Date: Mon, 28 Aug 2023 15:09:27 +0900 Subject: [PATCH 27/32] Revert "Run when swift" --- .github/workflows/Analyze.yml | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/.github/workflows/Analyze.yml b/.github/workflows/Analyze.yml index faf854615..a85250f5c 100644 --- a/.github/workflows/Analyze.yml +++ b/.github/workflows/Analyze.yml @@ -11,7 +11,7 @@ concurrency: jobs: analyze: name: Analyze - runs-on: ${{ (matrix.language == 'swift' && 'macos-13') || 'ubuntu-latest' }} + runs-on: ubuntu-latest permissions: actions: read contents: read @@ -19,42 +19,21 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'java', 'swift' ] + language: [ 'java' ] steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - uses: ./.github/actions/setup-java - - if: matrix.language == 'swift' - uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0 - with: - bundler-cache: true - - - if: matrix.language == 'swift' - uses: ./.github/actions/xcode-select - - - if: matrix.language == 'swift' - name: Set up XCFramework arch filter - run: echo "arch=x86_64" >> local.properties - - - if: matrix.language == 'swift' - uses: ./.github/actions/spm - - name: Initialize CodeQL uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} - - if: matrix.language == 'java' - name: Build android + - name: Build project run: ./gradlew :app-android:assemble --stacktrace - - if: matrix.language == 'swift' - name: Build ios - run: bundle exec fastlane build - working-directory: app-ios - - name: Perform analysis uses: github/codeql-action/analyze@v2 with: From b66419bf8e2ae30b7cdcd467d7ff5b5d087796fc Mon Sep 17 00:00:00 2001 From: woxtu Date: Mon, 28 Aug 2023 22:32:04 +0900 Subject: [PATCH 28/32] Fix the size of the navigation bar items on the timetable --- .../bookmarks.imageset/Contents.json | 2 +- .../bookmarks.imageset/bookmarks.pdf | Bin 1534 -> 0 bytes .../bookmarks.imageset/trailing-icon 2.pdf | Bin 0 -> 2947 bytes .../Sources/Timetable/TimetableView.swift | 2 ++ 4 files changed, 3 insertions(+), 1 deletion(-) delete mode 100644 app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/bookmarks.imageset/bookmarks.pdf create mode 100644 app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/bookmarks.imageset/trailing-icon 2.pdf diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/bookmarks.imageset/Contents.json b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/bookmarks.imageset/Contents.json index 8ae6d8617..a1eb9a569 100644 --- a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/bookmarks.imageset/Contents.json +++ b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/bookmarks.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "bookmarks.pdf", + "filename" : "trailing-icon 2.pdf", "idiom" : "universal" } ], diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/bookmarks.imageset/bookmarks.pdf b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/bookmarks.imageset/bookmarks.pdf deleted file mode 100644 index 1f28eb8e8cfa009952ad475f8cd9a62bb8b7bf01..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1534 zcmZvcUvHZ*5WwI4Defgw`%thA1dysqYqCz$HZ7xjtMlg-5pcyUjJp%=ix`y9>ya?2n%gBjJ+yPEZnN! zb)|}T_po{N|5XF~#YDg-0dAEW(&$@czY(cUj0ZB|dB*Xi%+@kZw6aD?VW?XCeC}8u zF-)wj)+}HW=P2k%ny0zIfCw`lPg)S;H*J^M z5Yj3RRZLuwA9AZC8WRvjIK}(wjd7HC5rd^JS;*N)J+O``9c>0Drj}m_U^HV{%D-X(mPikM6_uVTz;cA!*B}LLG zIn8=1)X=^3l^Q_5Dur>k>Dp1X7*Rhd7VgR(8Q@}1$a{D+q6aDbQ13BS&=nM5<7~PY zJS+aoe?a1SS}#250tX7{3g47t*>s2H(brx*GY%=6%h$iKPLe1A#6|=@Pg(#UBqO-U zljcyKog=|HCZ>g~gh=sWS|XX?T^cm@W!Dzn1#dcf`-AP@;RlUESn-UgXH-avB bYH;{i|5cd%^ir4oIF%zJA=zs6_VdF(#pOek diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/bookmarks.imageset/trailing-icon 2.pdf b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/bookmarks.imageset/trailing-icon 2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9dbba338c4b05b831b537810d95ca29c02347afa GIT binary patch literal 2947 zcmd^B-%r~x5PtVx;TI%$po#N45~>6(plL&}b`MBs4mUonU|c?i}arv_)*s z^8;Kz-<|J1U+#Q#H@!L)qnI(lU0yvtGtSS>xbyApMRMo<_VHQfEnu*mFS1;=EAD~f zOheaowSBP+)bDOj*>r|;@KB!6QiX z;-Y%x58NHOY8fF&ddNuM!4+6GZ7s76bEfjwI+wHS3qG0Kzw(CtWTH1G*QX@Wo(Ov_ z;rCL$VeZHa-869_8ZU{wI7A_W74s%9VS6`NG|`xddZ`$IVUWTCM#C=hV6%X2VI<5a+b048prq)`BSs7KUz{aFUenK*zJh=#l7m^8)^*r)h? z5Oz4A*+)Tfi-1m#MmoI#rWt{VNRwzP82C|(6Y~~fmfng{KA_pLxG~lt5UQ9}DH@lZ zq7B+NLoN@3bWXum%xF-c8w>QTP)Xr1NQXjHR3+XJ)jS%suakg#!ny-pD1cGPm`VY( zzgJT#P-Yz`rdCXta7Uy`S=eD(;EFx5l6_@NmJ9tUf`sjcVLR#iPLf8ruTY=R54utC ze|IDLN=Q(>NY^yg83}`4WbV>xMm`im5JqXhlTjK5z8mp?%#DS?a&`zUm~muujdW<& z_{o{kG-zR=6r6E%AWDMlAPFoOc_EC1{Vfv+_F7G`0rA6sx5}|hyDAT2kE$Gogf(;Z zv{mEuUT_@9Gc)xrU)$?>o3&EyUkdeaev>snl++Du{5cq}W(p4_=bGaursw!@Z||1_ z1N^*rS!Ex)?uYcA4+Qk9f--r}-FV!k4bJ+05Dl2pFOj%s=&z=`1Dq`z<^Z+R>ToYY zhx(RGD@q8&R&-vLRon0fd{>y1?y{xSz>Qq2vwwY|peOU#!LsOISd*%3WeF!D13h?$ z52=>J(?CHMPY87xV6dOp3ka2C1~cAAJgK%|EB4}V0I@s?c*KPYfO%f^}aB{^d~^`XL8gFFXJjhu4u>LWJ;{;Ig0?@*YAkCU&7zK#Bt`&l9^^ zp1-f<`#{*xFcdJ6cA&)gYU^xW$eJO&pQb?WaZ_#N2|r#hPCAO6SychQNT0edXTJU| WkqaQVX|uXj?08WSv7@8Q+p9m_GjXf{ literal 0 HcmV?d00001 diff --git a/app-ios/Modules/Sources/Timetable/TimetableView.swift b/app-ios/Modules/Sources/Timetable/TimetableView.swift index 9dbea55d7..4444d66ce 100644 --- a/app-ios/Modules/Sources/Timetable/TimetableView.swift +++ b/app-ios/Modules/Sources/Timetable/TimetableView.swift @@ -101,11 +101,13 @@ public struct TimetableView: View { NavigationLink(value: TimetableRouting.search) { Assets.Icons.search.swiftUIImage } + .buttonStyle(.plain) } ToolbarItem { NavigationLink(value: TimetableRouting.bookmark) { Assets.Icons.bookmarks.swiftUIImage } + .buttonStyle(.plain) } ToolbarItem { Assets.Icons.gridView.swiftUIImage From 905575109032b47ac8bdc9cb8eea7692d391942e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 16:12:58 +0000 Subject: [PATCH 29/32] Update dependency org.jetbrains.kotlinx:kotlinx-serialization-json to v1.6.0 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7630724c4..ffc9618cc 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -22,7 +22,7 @@ androidxTestEspresso = "3.5.1" dagger = "2.47" koin = "3.4.3" ktlint = "0.49.1" -kotlinxSerialization = "1.5.1" +kotlinxSerialization = "1.6.0" ktor = "2.3.3" roborazzi = "1.6.0-alpha-3" showkase = "1.0.0-beta18" From cbdcbb58d56b5f6f1333fd17cac44e6715511d78 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 19:04:50 +0000 Subject: [PATCH 30/32] Update dependency androidx.navigation:navigation-compose to v2.7.1 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ffc9618cc..caaaa166d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -78,7 +78,7 @@ kotlinxAtomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version = "0.22.0 composeCompiler = { module = "androidx.compose.compiler:compiler", version.ref = "composeCompiler" } composeUi = { module = "androidx.compose.ui:ui", version.ref = "compose" } -composeNavigation = { module = "androidx.navigation:navigation-compose", version = "2.7.0" } +composeNavigation = { module = "androidx.navigation:navigation-compose", version = "2.7.1" } composeRuntime = { module = "androidx.compose.runtime:runtime", version.ref = "compose" } composeMaterial = { module = "androidx.compose.material3:material3", version = "1.1.1" } composeMaterialWindowSize = { module = "androidx.compose.material3:material3-window-size-class", version = "1.1.1" } From c3f883da18eb871400309815291b5429db645a7f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 19:04:37 +0000 Subject: [PATCH 31/32] Update dependency androidx.activity:activity-compose to v1.8.0-alpha07 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index caaaa166d..b6c37d1b9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -12,7 +12,7 @@ compose-jb = "1.4.3" composeCompiler = "1.5.1" composeHiltNavigatiaon = "1.0.0" androidxLifecycle = "2.6.1" -androidxActivity = "1.8.0-alpha06" +androidxActivity = "1.8.0-alpha07" androidxFragment = "1.6.1" kotlinxCoroutines = "1.7.3" accompanist = "0.30.1" From 46d7bf5a54302bbfb363b7f9992a7783ce68995c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 28 Aug 2023 15:01:15 +0000 Subject: [PATCH 32/32] Update dependency com.google.firebase:firebase-bom to v32.2.3 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b6c37d1b9..b06afacea 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -27,7 +27,7 @@ ktor = "2.3.3" roborazzi = "1.6.0-alpha-3" showkase = "1.0.0-beta18" ksp = "1.9.0-1.0.13" -firebaseBom = "32.2.2" +firebaseBom = "32.2.3" multiplatformFirebase = "1.8.1" kermit = "1.2.2" okHttp = "4.11.0"