Karlo Lozovina
11/08/2021, 12:28 PMTomáš Hubálek
11/09/2021, 10:29 AMCSSSelectors.k
Is it intentional, that fun sibling()
is mapped to `CSSSelector.Descendant()`instead of CSSSelector.Sibling()
?Mihai Voicescu
11/10/2021, 7:39 PMkotlin.js.webpack.major.version=4
in gradle.properties
cause it was erroring out without (https://stackoverflow.com/questions/69537840/kotlin-js-gradle-plugin-unable-to-load-webpack-cli-serve-command)
Anybody got a hint 🙂 ?
> Task :jsBrowserDevelopmentRun
⚠ 「wdm」: Hash: 42d8be649aea20319bee
Version: webpack 4.46.0
Time: 2552ms
Built at: 11/10/2021 8:35:46 PM
Asset Size Chunks Chunk Names
web-compose-test.js 3.91 MiB main [emitted] main
Entrypoint main = web-compose-test.js
[0] multi (webpack)-dev-server/client?<http://localhost:8080> ./kotlin/web-compose-test.js 40 bytes {main} [built]
[../../node_modules/ansi-html/index.js] /Users/mihaivo/IdeaProjects/web-compose-test/build/js/node_modules/ansi-html/index.js 4.16 KiB {main} [built]
[../../node_modules/html-entities/lib/index.js] /Users/mihaivo/IdeaProjects/web-compose-test/build/js/node_modules/html-entities/lib/index.js 449 bytes {main} [built]
[../../node_modules/loglevel/lib/loglevel.js] /Users/mihaivo/IdeaProjects/web-compose-test/build/js/node_modules/loglevel/lib/loglevel.js 8.65 KiB {main} [built]
[../../node_modules/process/browser.js] /Users/mihaivo/IdeaProjects/web-compose-test/build/js/node_modules/process/browser.js 5.29 KiB {main} [built]
[../../node_modules/webpack-dev-server/client/index.js?<http://localhost:8080>] (webpack)-dev-server/client?<http://localhost:8080> 4.29 KiB {main} [built]
[../../node_modules/webpack-dev-server/client/overlay.js] (webpack)-dev-server/client/overlay.js 3.51 KiB {main} [built]
[../../node_modules/webpack-dev-server/client/socket.js] (webpack)-dev-server/client/socket.js 1.53 KiB {main} [built]
[../../node_modules/webpack-dev-server/client/utils/createSocketUrl.js] (webpack)-dev-server/client/utils/createSocketUrl.js 2.91 KiB {main} [built]
[../../node_modules/webpack-dev-server/client/utils/log.js] (webpack)-dev-server/client/utils/log.js 964 bytes {main} [built]
[../../node_modules/webpack-dev-server/client/utils/reloadApp.js] (webpack)-dev-server/client/utils/reloadApp.js 1.59 KiB {main} [built]
[../../node_modules/webpack-dev-server/client/utils/sendMessage.js] (webpack)-dev-server/client/utils/sendMessage.js 402 bytes {main} [built]
[../../node_modules/webpack-dev-server/node_modules/strip-ansi/index.js] (webpack)-dev-server/node_modules/strip-ansi/index.js 161 bytes {main} [built]
[../../node_modules/webpack/hot sync ^\.\/log$] (webpack)/hot sync nonrecursive ^\.\/log$ 170 bytes {main} [built]
[./kotlin/web-compose-test.js] 2.23 MiB {main} [built] [309 warnings]
+ 21 hidden modules
Mihai Voicescu
11/11/2021, 10:40 AMjsBrowserDevelopmentRun
The browser just states that no actual changes were detected...LeoColman
11/11/2021, 1:23 PMLeoColman
11/11/2021, 1:25 PMLeoColman
11/11/2021, 5:32 PMNorbi
11/12/2021, 1:19 PMInput
usage style: controlled or uncontrolled? How can I decide?Norbi
11/12/2021, 1:56 PMRohan Maity
11/12/2021, 4:15 PMTomáš Hubálek
11/15/2021, 9:11 AMFileA.kt
package mypackage
import org.jetbrains.compose.web.css.px
val a = 96.px
File MyTest.kt
package mypackage
val b = a
class StyleSheetTest {
@Test
fun testA() {
val result: CSSCalcValue<CSSUnitLength> = 100.vw - 2 * a
assertEquals("calc(100vw - 192px)", result.toString())
}
@Test
fun testB() {
val result: CSSCalcValue<CSSUnitLength> = 100.vw - 2 * b
assertEquals("calc(100vw - 192px)", result.toString())
}
}
testB
fails with TypeError: Cannot read properties of undefined (reading 'value')
@Akif Abasov [JB] any idea what is wrong? Is that compiler bug or some edge case optimalization in Kotlin JS IR compiler?David Herman
11/16/2021, 6:52 PMe: This version (1.1.0-beta01) of the Compose Compiler requires Kotlin version 1.5.31 but
you appear to be using Kotlin version 1.6.0 which is not known to be compatible. Please
fix your configuration (or `suppressKotlinVersionCompatibilityCheck` but don't say I
didn't warn you!).
MrPowerGamerBR
11/17/2021, 1:36 PM.parent:hover .child { /* rules here */ }
However I'm not able to figure out how to represent that in the Style DSL 😞MrPowerGamerBR
11/17/2021, 3:01 PM@import
statements to split the stylesheets in different files (so I could split stuff in files like layout.scss
, animations.scss
, so on and so forth), but I'm not sure how I could do something similar in Compose Web.
Inline Styles is maybe the proper way to keep everything organized (keep the style in the Composable component, yay!) but then you aren't able to use pseudo classes like hover
, no keyframes, etc.
Another alternative that I've found is having multiple stylesheets objects and using Style(StylesheetObjectHere)
, but then multiple <style>
tags are created (but maybe that isn't a huuuuge issue?). Using extension functions to split up isn't a solution because then you can't reference the style in the classes
function.LeoColman
11/19/2021, 4:24 PM@NoLiveLiterals
@Composable
fun DonationForm() {
var selected by remember { mutableStateOf(values[1]) }
val coroutineScope = rememberCoroutineScope()
val clientSecret = coroutineScope.async { startDonation(selected.toLong().times(100)) }
Hey guys!
How to make clientSecret
render again everytime selected
is changed?
selected
gets it's state correctly, but clientSecret
is being calculated only once (and not recalculating on recomposition)LeoColman
11/20/2021, 1:06 AMdomain/home
and a domain/lobby
pages. Currently I hold a composable for each page and just replace the main composable, like an android Fragment.
But doing it this way won't allow me to give the direct link to a specific fragment/page. How do you guys handle this?rocketraman
11/23/2021, 4:03 PMgradle build
doesn't actually pick up any changes to the sass files -- only a clean
+ build
works. Any ideas?Big Chungus
11/27/2021, 2:13 AMhfhbd
12/01/2021, 3:55 PMCSSSelector.CSSClass(classname) style {..}.
. Simple using ".$classname" style {...}
does not.
Edit: it does work, I made another mistake...Akram Bensalem
12/02/2021, 2:26 PMChristian Gaisl
12/02/2021, 8:07 PMsaket
12/03/2021, 8:04 PMJoost Klitsie
12/04/2021, 2:00 PMStefan Beyer
12/05/2021, 2:39 PM./gradlew jsBrowserRun --continuous
, I get this error:
[webpack-cli] Unable to load '@webpack-cli/serve' command
[webpack-cli] TypeError: options.forEach is not a function
[webpack-cli] TypeError: options.forEach is not a functionI don't have much experience with frontend technologies, but I found an issue in webpack-cli that sounds like my problem: https://github.com/webpack/webpack-cli/issues/2990 The issue seems to be, that webpack-cli/serve 1.6.0 must only be used with webpack-cli 4.9.1 or higher. Looking at the generated yarn.lock file in the build directory, I find that it uses:
"@webpack-cli/serve@^1.5.0":
version "1.6.0"
[...]
webpack-cli@4.7.1:
version "4.7.1"and from the limited stuff that I understand from the linked issue, these versions don't seem to be compatible. Now my question is: Can I somehow fix this? Maybe via some fancy config in the gradle DSL? Or is this a bug that needs to be fixed in compose? I am staring at this and have no clue what to do here 😅
Joost Klitsie
12/06/2021, 11:37 AMFrancis Mariano
12/06/2021, 1:22 PMrocketraman
12/07/2021, 2:37 PMspierce7
12/07/2021, 10:47 PMcompose-web canvas
in Q1 2022?Daniel Perez
12/08/2021, 3:53 AMcorneil
12/09/2021, 9:58 AM