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

Jetsnack - Migrate to Material 3 #1437

Merged
merged 29 commits into from
Aug 13, 2024
Merged

Jetsnack - Migrate to Material 3 #1437

merged 29 commits into from
Aug 13, 2024

Conversation

riggaroo
Copy link
Collaborator

@riggaroo riggaroo commented Aug 2, 2024

Jetsnack sample is using Material 2 instead of Material 3, keeping most of the UI the same as previously. Material 3 is the preferred choice for Material.

This pull request migrates to using M3, as well as fixes the filters screen selection to have a shared element transition to show and hide the dialog.

screen-20240806-144504.2.mp4

It also fixes build issues some machines were experiencing, where there is a mismatch in JVM versions by setting jvmToolchain version.

@riggaroo riggaroo changed the base branch from riggaroo/shared-elements to compose-latest August 8, 2024 15:15
@riggaroo riggaroo marked this pull request as ready for review August 9, 2024 14:43
@riggaroo riggaroo requested a review from a team as a code owner August 9, 2024 14:43
Copy link
Member

@bentrengrove bentrengrove left a comment

Choose a reason for hiding this comment

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

Nice work!

Comment on lines 44 to 60
// val isDismissed = dismissState.currentValue == SwipeToDismissBoxValue.
// Returns the swiped value in dp
val offset = with(LocalDensity.current) { dismissState.offset.value.toDp() }
// val offset = with(LocalDensity.current) { dismissState.offset.value.toDp() }

AnimatedVisibility(
/* AnimatedVisibility(
modifier = modifier,
visible = !isDismissed,
enter = enter,
exit = exit
) {*/
SwipeToDismissBox(
modifier = modifier,
visible = !isDismissed,
enter = enter,
exit = exit
) {
SwipeToDismiss(
modifier = modifier,
state = dismissState,
directions = directions,
background = { background(offset) },
dismissContent = { content(isDismissed) }
)
}
state = dismissState,
backgroundContent = { background(/*offset*/) },
content = { content(/*isDismissed*/) }
)
/* }*/
Copy link
Member

Choose a reason for hiding this comment

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

Remove the commented out sections?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for reminding me about this one, I added it back based on new dismissed state information (progress percentage instead of DP)

@riggaroo riggaroo merged commit 9996d5e into compose-latest Aug 13, 2024
19 checks passed
@riggaroo riggaroo deleted the jetsnack/m3 branch August 13, 2024 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants