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

Introduce ComposeViewport function that renders content in parent container #1211

Merged
merged 2 commits into from
Mar 21, 2024

Conversation

Schahen
Copy link
Collaborator

@Schahen Schahen commented Mar 21, 2024

No description provided.

@Schahen Schahen requested a review from eymar March 21, 2024 13:57
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Copy link
Member

Choose a reason for hiding this comment

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

This line was necessary for proper aspect ration on mobile devices (in Chrome Android).


@OptIn(ExperimentalComposeUiApi::class)
fun main() {
CanvasBasedWindow("Compose/JS sample", canvasElementId = "canvas1") {
Copy link
Member

Choose a reason for hiding this comment

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

Here I see some lines deleted, but no new API used here :)
So fun main does nothing here. Not intentional I guess?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yep, sorry, this was due to commit not being actually happened because of signup configuration

@@ -18,24 +18,13 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Copy link
Member

Choose a reason for hiding this comment

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

<meta name="viewport" content="width=device-width, initial-scale=1.0"> - better to keep it here too

@Schahen Schahen merged commit 5741ad4 into jb-main Mar 21, 2024
6 checks passed
@Schahen Schahen deleted the shagen/compose_viewport_api branch March 21, 2024 21:01

/**
* EXPERIMENTAL! Might be deleted or changed in the future!
Copy link
Member

Choose a reason for hiding this comment

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

It should be marked with experimental annotation instead of comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants