Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make bottomsheets into destinations #6476

Closed
wants to merge 5 commits into from

Conversation

Rawa
Copy link
Contributor

@Rawa Rawa commented Jul 18, 2024


This change is Reviewable

Copy link

linear bot commented Jul 18, 2024

@Rawa Rawa marked this pull request as draft July 18, 2024 08:19
@Rawa Rawa self-assigned this Jul 18, 2024
@Rawa Rawa added the Android Issues related to Android label Jul 18, 2024
@Rawa Rawa requested a review from Pururun July 18, 2024 08:19
Copy link
Contributor Author

@Rawa Rawa left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 19 files reviewed, 1 unresolved discussion


android/app/build.gradle.kts line 386 at r1 (raw file):

configurations.all {
    resolutionStrategy {
        force("androidx.navigation:navigation-compose:2.8.0-beta05")

Should be removed before any merge

Copy link
Contributor

@Pururun Pururun left a comment

Choose a reason for hiding this comment

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

Removing and adding locations to the list does not seems to trigger a toast with an undo. As far as I can tell the required code for that is missing?

Otherwise nice work 👍

Reviewed 13 of 19 files at r1, all commit messages.
Reviewable status: 13 of 19 files reviewed, 9 unresolved discussions (waiting on @Rawa)


android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/MullvadModalBottomSheet.kt line 43 at r1 (raw file):

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun MullvadModalBottomSheet(sheetContent: @Composable ColumnScope.() -> Unit) {

Since this is not a bottom sheet anymore, this should called MullbadBottomSheetContent or something


android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListEntrySheetViewModel.kt line 19 at r1 (raw file):

import net.mullvad.mullvadvpn.viewmodel.CustomListEntrySheetSideEffect.GenericError

data class CustomListEntrySheetUiState(

Not sure if it is universal but ui states are usually in it's own file?


android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListEntrySheetViewModel.kt line 23 at r1 (raw file):

)

sealed interface CustomListEntrySheetSideEffect {

Side effects are usually at the bottom?


android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListSheetViewModel.kt line 13 at r1 (raw file):

import net.mullvad.mullvadvpn.lib.model.CustomListName

data class CustomListSheetUiState(

See above


android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListSheetViewModel.kt line 18 at r1 (raw file):

)

sealed interface CustomListSheetSideEffect {

See above


android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/ImportOverridesViewModel.kt line 10 at r1 (raw file):

import net.mullvad.mullvadvpn.repository.RelayOverridesRepository

data class ImportOverridesSheetUiState(val overridesActive: Boolean)

See above


android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/LocationSheetViewModel.kt line 24 at r1 (raw file):

import net.mullvad.mullvadvpn.usecase.customlists.CustomListsRelayItemUseCase

sealed interface LocationUiState {

See above


android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/LocationSheetViewModel.kt line 37 at r1 (raw file):

data class CustomListEntry(val customList: RelayItem.CustomList, val canAdd: Boolean)

sealed interface LocationSideEffect {

See above

Copy link
Contributor Author

@Rawa Rawa left a comment

Choose a reason for hiding this comment

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

Ah, this was a small mistake on my end, I've fixed it now :)

Reviewable status: 8 of 23 files reviewed, 9 unresolved discussions (waiting on @Pururun)


android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListEntrySheetViewModel.kt line 19 at r1 (raw file):

Previously, Pururun (Jonatan Rhodin) wrote…

Not sure if it is universal but ui states are usually in it's own file?

Yeah it should. Done.


android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListEntrySheetViewModel.kt line 23 at r1 (raw file):

Previously, Pururun (Jonatan Rhodin) wrote…

Side effects are usually at the bottom?

Done.


android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListSheetViewModel.kt line 13 at r1 (raw file):

Previously, Pururun (Jonatan Rhodin) wrote…

See above

Done.


android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListSheetViewModel.kt line 18 at r1 (raw file):

Previously, Pururun (Jonatan Rhodin) wrote…

See above

Done.


android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/LocationSheetViewModel.kt line 24 at r1 (raw file):

Previously, Pururun (Jonatan Rhodin) wrote…

See above

Done.


android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/LocationSheetViewModel.kt line 37 at r1 (raw file):

Previously, Pururun (Jonatan Rhodin) wrote…

See above

Done.


android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/MullvadModalBottomSheet.kt line 43 at r1 (raw file):

Previously, Pururun (Jonatan Rhodin) wrote…

Since this is not a bottom sheet anymore, this should called MullbadBottomSheetContent or something

Done.


android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/ImportOverridesViewModel.kt line 10 at r1 (raw file):

Previously, Pururun (Jonatan Rhodin) wrote…

See above

Done.

Copy link
Contributor

@Pururun Pururun left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 16 of 16 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion

@Rawa Rawa force-pushed the make-bottomsheet-proper-destination-droid-1197 branch 3 times, most recently from 0f6a02c to 580297d Compare July 22, 2024 11:25
@Rawa Rawa marked this pull request as ready for review July 22, 2024 11:27
@Rawa Rawa force-pushed the make-bottomsheet-proper-destination-droid-1197 branch from 580297d to ba9149d Compare July 22, 2024 11:27
Pururun
Pururun previously approved these changes Jul 22, 2024
Copy link
Contributor

@Pururun Pururun left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 7 of 7 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion

@Rawa Rawa added the On hold Means the PR is paused for some reason. No need to review it for now label Jul 22, 2024
@Rawa Rawa force-pushed the make-bottomsheet-proper-destination-droid-1197 branch from d545804 to 261b639 Compare July 25, 2024 23:11
@Rawa Rawa force-pushed the make-bottomsheet-proper-destination-droid-1197 branch from 54f717f to 948c6af Compare July 26, 2024 00:20
@Pururun
Copy link
Contributor

Pururun commented Sep 2, 2024

Closing this since there is no support or replacement for ModalBottomSheetLayout in material 3. We can look into this in the future if there is a way to have bottomsheets being destinations that is supported by material 3.

@Pururun Pururun closed this Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Issues related to Android On hold Means the PR is paused for some reason. No need to review it for now
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants