darkmoon_uk
06/15/2021, 6:04 AMvalue class / ULong
vs data class RGB Hex
); this only makes the two worlds harder to bridge, and there aren't any ready conversion functions that I can see. Couldn't all the color code standardize on ULong
, and the common Color disclose an Android/Desktop color via .implementation
?theapache64
06/15/2021, 8:47 AMdarkmoon_uk
06/15/2021, 12:13 PMexpect/actual
to gain access to Modifier
s that aren't available yet from common code. I guess this is partly because they don't have a Web implementation yet. Even my current Web ones are TODO()
- I'll fill them in ad-hoc as needed.
Question: Does this seem a reasonable thing to do, or am I missing a better way to handle existing API's 'commonly'?[JB] Shagen
06/15/2021, 6:40 PMtheapache64
06/15/2021, 7:41 PMlouiscad
06/15/2021, 9:21 PMTextActual
part of the public API when it seems they're designed to be called by Text
and alike?Daniele B
06/15/2021, 10:54 PMrememberSaveableStateHolder
to Compose Web?louiscad
06/17/2021, 2:10 AMModifier.padding
has no overload taking something other than a single value for all sides? I'd like to customize vertical, horizontal, or side specific padding like you can do on Android.
Same question for StyleBuilder.padding
. Also, I'm wondering why there's StyleBuilder.marginLeft
and StyleBuilder.marginTop
but none for right and bottom blob thinking upside downTomáš Hubálek
06/17/2021, 9:33 AMremember
?Tomáš Hubálek
06/17/2021, 11:43 AMHugo Miguel Coutinho Dias
06/17/2021, 3:00 PMHugo Miguel Coutinho Dias
06/17/2021, 5:45 PMDaniele B
06/17/2021, 10:23 PMBoxWithConstraints
is not available.
What is an alternative in order to get the width and height of the page?Vinay Gaba
06/18/2021, 4:49 AMjsBrowserRun
. I had expected this to work out of the box but maybe I'm missing a step?theapache64
06/22/2021, 7:33 AMchecked(false)
to uncheck a radio/checkbox. now that checked(Boolean)
has removed in 0.5.0-build225
, so what's the recommended method to uncheck a radio/checkbox?hfhbd
06/22/2021, 7:43 AMDaniele B
06/22/2021, 3:00 PMTable ( { style { width(100.percentage) } }) {
}
this doesn’t workTomáš Hubálek
06/23/2021, 8:57 AMHugo Miguel Coutinho Dias
06/23/2021, 4:19 PMOleksandr Karpovich [JB]
06/24/2021, 2:33 PMAkram Bensalem
06/24/2021, 10:48 PMTomáš Hubálek
06/25/2021, 7:50 AMNikola Milovic
06/25/2021, 11:15 AMCompose for Web simplifies and accelerates UI development for web applications, and aims to enable UI code sharing between web, desktop, and Android applications in the future.I was wondering about this. As currently, it's possible to share practically all of the UI between android and desktop, are they hoping to achieve the same thing with web (or something similar)?
Hugo Miguel Coutinho Dias
06/25/2021, 5:40 PMjs("JSON.stringify(s)")
but this seems to have a few problems, namely the incorrect naming of properties.[JB] Shagen
06/29/2021, 5:36 PMsmallshen
06/30/2021, 9:02 AMexternal interface MainHeader : RProps {
var onRequestLogin: () -> Unit
}
val mainHeader = functionalComponent<MainHeader> { props ->
var basicInfo: BasicInfo? by useState(null)
useEffect(Unit) {
WebMainScope.launch {
basicInfo = if (LoginService.loggedIn) ApiService.getBasicInfo() else null
}
}
ringHeader {
attrs {
spaced = true
}
img("Your Image") {}
ringTray {
if (LoginService.loggedIn) {
+"Hello"
ringDropdown(basicInfo?.username ?: "Fetching...") {
attrs {
clickMode = true
}
}
} else {
ringButton {
attrs {
primary = true
onMouseDown = { props.onRequestLogin() }
}
+"Login"
}
}
}
}
}
Jetpack Compose Code:
@Composable
fun MainHeader(onRequestLogin: () -> Unit) {
var basicInfo by remember { mutableStateOf<BasicInfo?>(null) }
LunchedEffect(Unit) {
WebMainScope.launch {
basicInfo = if (LoginService.loggedIn) ApiService.getBasicInfo() else null
}
}
RingHeader(spaced = true) {
Image("Your Image")
RingTray {
if (LoginService.loggedIn) {
Text("Hello")
RingDropDown(basicInfo?.username ?: "Fetching...", clickMode = true)
} else {
RingButton(primary = true, onMouseDown = { onRequestLogin() }) {
Text("Login")
}
}
}
}
}
99% similarityandbapps
07/01/2021, 5:08 AM@Composable
fun ModiferTest() {
Box(Modifier.background(Color.Blue).padding(16.dp).background(Color.Red).padding(8.dp).background(Color.Green)) {
Text("Modifier Test")
}
}
As you can see in the images, the function works correctly on Compose for Desktop, but on Compose for Web it discards all but the innermost modifiers (due to the way that modifiers currently work on web). This breaks the idea that each modifier doesn't need to have knowledge of the inner content/modifiers, which seems like an important aspect of the Compose UI system. Obviously multiplatform widgets are still experimental, but I wanted to know if something is planned to address this, since it seems like a somewhat core issueNorbi
07/04/2021, 7:24 PMdarkmoon_uk
07/09/2021, 9:08 AMTextInput
appears to be broken 🤔
Even when I can debug-log inside the @Composable
and see that it's recomposing, setting the value
parameter with new values has no effect; the browser just keeps the same user-entered value in the box. Code in 🧵 👉Greg Steckman
07/18/2021, 8:23 PM