Skip to content

Conversation

@mike-n-jordan
Copy link
Collaborator

Description

Have the Appyx navigation demo app scale dynamically for web.

Screenshot 2024-01-08 at 15 51 39 Screenshot 2024-01-08 at 16 03 11 Screenshot 2024-01-08 at 16 03 26

@mike-n-jordan mike-n-jordan requested review from KovalevAndrey and zsoltk and removed request for KovalevAndrey January 8, 2024 16:04
Comment on lines 142 to 147
private fun ScreenSize.calculateDensityFromScreenSize(): Density =
if (widthDp.value < 1500) {
Density(1.2f, 1f)
} else {
Density(1.8f, 1.2f)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks weird to me. Why is it specifically 1500? Why specifically 1.2f, 1f, 1.8f, 1.2f? The issue title also implies dynamic, but this looks more two static cases rather?

}

private fun ScreenSize.calculateDensityFromScreenSize(): Density =
if (widthDp.value < 1500) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

should it be a proportional value coerced in (0.75f, 4f)?

Michael Jordan added 2 commits February 20, 2024 13:22
…th_dynamic_web_scaling

# Conflicts:
#	demos/appyx-navigation/web/src/jsMain/kotlin/com/bumble/appyx/navigation/WebTypography.kt
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.

3 participants