Satria Adi Putra
02/18/2022, 4:18 AMFailed building KotlinMPPGradleModel
org.gradle.internal.resolve.ArtifactNotFoundException: Could not find ui-tooling-preview-1.0.1-samplessources.jar (org.jetbrains.compose.uiui tooling preview1.0.1).
Searched in the following locations:
https://repo.maven.apache.org/maven2/org/jetbrains/compose/ui/ui-tooling-preview/1.0.1/ui-tooling-preview-1.0.1-samplessources.jarWhat am i doing wrong? I use built in compose-web template from intellij idea
David Herman
02/18/2022, 8:24 PMinline
quite a bit more than I'd expect. Is that to reduce the final javascript bundle size?dvdandroid
02/20/2022, 4:31 PMorg.jetbrains.compose.web.css.StyleScope
?
ex:
Span({
style { // this is org.jetbrains.compose.web.css.StyleScope, not org.jetbrains.compose.web.css.CSSBuilder
property("color", "#fff") // <-- hover??
}
})
compose 1.1.0-alpha05
OdenEgg
02/24/2022, 5:38 AMBig Chungus
02/24/2022, 11:34 AMSpheniscine
03/09/2022, 3:22 AMalexfacciorusso
03/10/2022, 4:53 PMKirill Grouchnikov
03/11/2022, 2:07 AMRobert
03/11/2022, 8:22 PMspierce7
03/13/2022, 10:30 PMOvsyannikov Alexey
03/14/2022, 12:06 PMComposable
function inside of an interface and realize this function in realizations if that interface. I have tried to use some @Composable
callback getters (val renderer: @Composable () -> Unit
), common functions (@Composable fun render()
) and several other ways, but I got errors in rendering fun (IllegalStateException {message: 'Function TextArea should have been replaced by compiler.', cause: undefined, name: 'IllegalStateException', stack: 'IllegalStateException: Function TextArea should ha…://127.0.0.1:8080/postssystem.client.js:1:2202661'}
error, TextArea
here is external @Composable
top-level function) or event getting an error java.lang.AssertionError: No such value argument slot in IrCallImpl: 0 (total=0).
. Could somebody help me with this?paoloconte
03/17/2022, 12:12 PMvar text by remember { mutableStateOf("") }
Input(type = InputType.Text, attrs = {
defaultValue(text)
onChange { event ->
text = event.target.value
}
})
If I then set text = ""
the input field is not cleared, as defaultValue is not reapplied... so how can I clear it? is the only way using a reference to the HTMLInputElement?
ThanksDerek Ellis
03/18/2022, 5:22 PMrouting-compose
where a flow that I am collecting as state does not trigger a recomposition if the page is loaded under a path that is being matched by the router (regardless of whether I'm using HashRouter
or BrowserRouter
This is the relevant line of code that is not triggering recomposition: https://github.com/dellisd/reroute/blob/master/web/src/jsMain/kotlin/io/github/dellisd/reroute/map/MapDemo.kt#L31
it is a child of a HashRouter
https://github.com/dellisd/reroute/blob/master/web/src/jsMain/kotlin/io/github/dellisd/reroute/Main.kt#L22-L23
Here (https://dellisd.github.io/reroute/), the page is loaded and the data is loaded asynchronously before being emitted to a flow, collected as state, and then displayed on the map (as the set of red points)
But here (https://dellisd.github.io/reroute/#/stops/7664) where a specific route is matched, the data is still loaded but now the flow does not trigger a recomposition in the MapDemo
composable and the map is not updated to display the points
Am I missing something, or is this potentially a bug somewhere? And if it is a bug, does anyone have any tips on how to narrow down where the bug is actually coming from?Robert
03/20/2022, 2:14 PMSpheniscine
03/23/2022, 4:35 AMCasey Brooks
03/25/2022, 6:22 PMSunny
03/28/2022, 12:22 PMbox-shadow
? Use case is building a card.Nikky
04/03/2022, 4:29 PMfunction resize_canvas(){
canvas = document.getElementById("ComposeTarget");
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
}
with
<body onresize="resize_canvas()">
and.. although that resizes the canvas.. it stops renderingNikky
04/04/2022, 5:26 PMCompositionLocal LocalDensity not present
my main function is
fun main() {
renderComposable(rootElementId = "root") {
console.log("rendering root element")
Text("Test")
}
}
and the index.html looks like so
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Pentagame</title>
<!-- <script src="skiko.js"> </script>-->
</head>
<body>
<div id="root"></div>
<!-- <canvas id="ComposeTarget" width="1024" height="720"></canvas>-->
<script src="app.js"></script>
</body>
</html>
Ovsyannikov Alexey
04/06/2022, 5:42 AMOliver.O
04/10/2022, 5:48 PM1.2.0-dev-k1.6.20-61e81dadb1c
)?
Over here, building the IntelliJ wizard Compose Web demo fails in compileProductionExecutableKotlinJs
with
Internal error in file lowering: java.util.NoSuchElementException: Collection contains no element matching the predicate.
Norbi
04/11/2022, 6:32 AMPartho Paul
04/11/2022, 2:50 PMsalomonbrys
04/11/2022, 5:55 PMStylesheet.css
function was deleted (https://github.com/JetBrains/compose-jb/commit/cd7691a53fc73ed41abda6de604eb1f9a08af48b), I can find no way in Compose Web to have Css-In-JS, that is to have a component style classes defined within the component (I would usually use the syntax described in this issue: https://github.com/JetBrains/compose-jb/issues/1207).
This type of syntax (aka CSS-In-JS) is supported in Kotlin React with https://github.com/JetBrains/kotlin-wrappers/blob/master/kotlin-styled/README.md and is an important design decision in how we've been building our web apps with it.
Is Jetbrains Compose Web going to support it back ? Is there a workaround we can use in the meantime ?
Note that using style
is insufficient as it does not allow full css selection (hover, children, etc.).
Note that when we were using Kotlin-React, the difference between css
and style
was important: the former described "stable" style (in order to avoid class regeneration) while the second described "moving" style.Omar Shehe
04/21/2022, 7:11 AMGoogle Sign In
with compose web
?
I will appreciate any ideas or suggestions😊 .phuc.tran
04/21/2022, 7:36 AMphuc.tran
04/21/2022, 7:48 AMSebastien Leclerc Lavallee
04/21/2022, 4:31 PMid("org.jetbrains.compose") version "1.1.1"
). I think I got this from a tutorial or wizard in IntelliJ. Now I know that compose 1.1.1 does not support Kotlin 1.6.20. But I saw last week that a new version of the compose compiler alpha version (1.2.0-alpha08
) does now support Kotlin 1.6.20. But how do I get to force the compiler version ? Will it even work since the compiler is the one provided by Google and not the Jetbrain’s one which support compose web. Or are there any difference?! build.gradle.kts
setup in thread.
Thanks for clarifications 😅Akram Bensalem
04/24/2022, 1:48 PMPartho Paul
04/26/2022, 9:41 AMval date = LocalDateTime.parse(isoValue)
val dateFormat = DateTimeFormatter.ofPattern(format)
return date.format(dateFormat)
This is giving me an error which says that DateTimeFormatter.ofPattern(format)
needs a Locale but I'm not getting any option to set Locale by doing something like DateTimeFormatter.ofPattern(format).withLocale(Locale.ENGLISH)
because Locale
is just an interface without any implementation. Tried googling but didn't find anything. Is there any other way to do this?
TIA