Closed Corvus400 closed 1 week ago
I've tried it out, and it looks like it might be possible to output a fixed size on any device, so I'll try it myself.
Great catch. π
Since this composable is not actually displayed on screen, I wonder if we can force it into a more consistent layout by giving it a specific size? In other words, could it work if we assigned size(1200.dp, 630.dp)
to ShareableCardContent
's modifier?
edit: ι γγγγ π
@mannodermaus I'm sorry. π I've made a PR, so if you could try outputting it in portrait and landscape on your own device and check for any design issues, that would be very helpful. π
No problem, I will check it in a moment! At first glance, your PR looks great and should work, though. Good job!
γεΎ γγγγΎγγγThe layout seems to work pretty well and looks identical, no matter if I export it portrait or landscape β nice. I was able to create a change when changing the font size and display size to the maximum, though. The landscape version looks a bit odd with this and changes its shape. This might be negligible, though.
Portrait | Landscape | |
---|---|---|
Normal font | ||
Large font |
@mannodermaus If we handle corner cases in the current PR, it will be difficult to review, so I would like to create a new issue and handle it there. π (The issue itself will be created once the PR we are currently submitting has been merged.) I'm sorry. π
I agree that keeping it separate is the way to go. Let's get this improvement in first and then we can define the next one. π
@mannodermaus Thank you for waiting. π We have created a new PR, and have addressed the problem of the display breaking up when the font or display scale is made smaller or larger. π
https://github.com/DroidKaigi/conference-app-2024/blob/53f341822fd0f4a128db83648e805d75156c7f2a/feature/profilecard/src/commonMain/kotlin/io/github/droidkaigi/confsched/profilecard/component/ShareableCard.kt#L94
However, since ShareableCardContent is dependent on the width and height of the device, this kind of workaround will not work for devices with a smaller width than SmallPhone.
It is probably difficult to deal with problems like this without a way to display images of a fixed size (1,200px wide and 630px tall) on any device.