Oluwasomidotun Victor
09/11/2022, 1:18 PMspierce7
09/11/2022, 6:17 PMS.
09/11/2022, 7:08 PMYes, we already decided the release date of Compose Multiplatform 1.2.0
https://github.com/JetBrains/compose-jb/issues/2254
just asking whether we have some more details about the release date?Dmitriy Malayev
09/15/2022, 7:52 AMTunji Dahunsi
09/17/2022, 12:46 PMChristian Lippka
09/18/2022, 3:59 PMjossiwolf
09/18/2022, 6:00 PMEduardo Zuza
09/21/2022, 9:32 PMDerek Gelormini
09/23/2022, 5:54 PMcurl
, but when I try submitting the form from compose, the multipart data never shows up. Coming from an Android background so my web skills are pretty rusty these days--definitely could just be missing something obviousErik
09/24/2022, 2:11 PMDiv(attrs = {
style {
maxHeight(8.em)
overflow("scroll")
}
}) { /* content */ }
When the content overflows, I'd like the scrollable element to scroll to the bottom (by default it stays at the current scroll position, which is the top if never scrolled). I've found solutions in JS that probably work, but I'd like to know if this can be done nicely from my Kotlin code.Sebastien Leclerc Lavallee
09/25/2022, 4:15 AMid("org.jetbrains.compose") version "1.2.0-beta02-dev795"
But after compiling, I get that error:
`This version (1.3.0) of the Compose Compiler requires Kotlin version 1.7.10 but you appear to be using Kotlin version 1.7.20-RC which is not known to be compatible. Please fix your configuration (or suppressKotlinVersionCompatibilityCheck
but don't say I didn't warn you!).`
Thanks!Michael Paus
09/25/2022, 12:03 PMsteamstreet
09/30/2022, 4:05 AMimport androidx.compose.runtime.Composable
import kotlinx.browser.document
import org.jetbrains.compose.web.attributes.AttrsScope
import org.jetbrains.compose.web.dom.ElementBuilder
import org.jetbrains.compose.web.dom.TagElement
import org.jetbrains.compose.web.dom.Text
import org.w3c.dom.Element
import org.w3c.dom.HTMLElement
private open class ElementBuilderImplementation<TElement : Element>(private val tagName: String) :
ElementBuilder<TElement> {
private val el: Element by lazy { document.createElement(tagName) }
@Suppress("UNCHECKED_CAST")
override fun create(): TElement = el.cloneNode() as TElement
}
class TinyMCEAttrsScope(
attrsScope: AttrsScope<HTMLElement>
) : AttrsScope<HTMLElement> by attrsScope {
fun apiKey(key: String): TinyMCEAttrsScope = apply {
attr("api-key", key)
}
fun hideMenuBar(): TinyMCEAttrsScope = apply {
attr("menubar", "false")
}
fun plugins(vararg list: String): TinyMCEAttrsScope = apply {
attr("plugins", list.joinToString(" "))
}
fun toolbar(defn: String): TinyMCEAttrsScope = apply {
attr("toolbar", defn)
}
}
@Composable
fun tinyMce(attrs: TinyMCEAttrsScope.() -> Unit = {}, content: String) = TagElement(
ElementBuilderImplementation<HTMLElement>("tinymce-editor"), applyAttrs = {
val tinymceAttrsBuilder = TinyMCEAttrsScope(this)
tinymceAttrsBuilder.attrs()
}) {
Text(content)
}
What I’m struggling with is events. The developer claims that input events are fired, but I’ve tried different ways to install the handler to no avail. I’ve tried to get other events as well, and I just don’t get callbacks. Any thoughts on how I would install these event handlers?Erik
09/30/2022, 8:24 AMval styleA by style { /*..*/ }
, is there a way to define a styleB
that inherits from styleA
?Leon Linhart
10/02/2022, 6:20 PMJohn O'Reilly
10/04/2022, 5:44 PM1.2.0-beta03-dev803
and getting following
java.lang.AssertionError: org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl@7bda6b02: No such value argument slot: 1
at org.jetbrains.kotlin.ir.expressions.IrMemberAccessExpression.putValueArgument(IrMemberAccessExpression.kt:50)
at androidx.compose.compiler.plugins.kotlin.lower.ComposerParamTransformer.withComposerParamIfNeeded(ComposerParamTransformer.kt:214)
Dragos Rachieru
10/04/2022, 9:18 PMJohn O'Reilly
10/05/2022, 1:51 PM1.0.0-beta03
version for Compose for Web (as there is for Desktop)?Mihai Voicescu
10/06/2022, 1:46 PMErik
10/06/2022, 3:40 PM(r, g, b)
, and I only want to set a = 0.3
. Is there a way to simply set A, without changing RGB?
(Or, more advanced, is there a way to transform RGBA by multiplying it with a vector of RGBA factors? For example, to reduce alpha to 30% of its current value, I'd multiply by [1, 1, 1, 0.3].)jeran
10/06/2022, 6:26 PMText
composable centered in a Box
. running ./gradlew jsBrowserRun
works fine. it opens to localhost:8080 and displays what I expect.
but i’m trying to figure out how to eventually embed this in a website. I thought that ./gradlew jsBrowserDistribution
was the command I wanted, and then I could open foo/build/distributions/index.html
locally and I should see the same result. but right now i’m just getting an empty screen.
i have a separate project that uses the compose/dom approach, and calling ./gradlew jsBrowserDistribution
and navigating to foo/build/distributions/index.html
works fine.
Is there a step I’m missing for the compose/canvas approach?Kostas C
10/07/2022, 5:01 PMjeran
10/07/2022, 7:27 PMKristian Nedrevold
10/08/2022, 1:10 PMAyfri
10/08/2022, 2:07 PMrequired
attribute since beta, it leads to an error that this specific function isn't a function when accessing the website, I'm using Kt 1.7.10 and tried with both 1.2.0-beta01 & beta02, I also use this attribute in a function where there is a boolean required
argument.magnumrocha
10/11/2022, 10:27 AMthan_
10/11/2022, 11:34 AMColumn
Row
etc. Can't really find anything like it now. Is it available somewhere?Ayfri
10/11/2022, 10:51 PMzt
10/12/2022, 1:14 AMzt
10/12/2022, 3:10 AMzt
10/12/2022, 3:10 AM