https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
kvision
  • t

    Tomas Kormanak

    05/26/2021, 1:23 PM
    What about adding another root function to allow directly bind the state (like other components have)? It would simplify this:
    root = root("root") {}.bind(Store) { s ->
      if (s.appInitialized) {
        simplePanel { ... }
      } else {
        div { content = "Loading..." }
      }
    }
    r
    • 2
    • 9
  • h

    Hywel Bennett

    05/26/2021, 1:56 PM
    I'm still getting used to the way the IR compiler mangles field names. Should the tabulator module work with Kotlin models? I feel like my column definitions are going to be referencing field names that don't exist on the generated object.
    r
    • 2
    • 18
  • k

    Kumaran Masilamani

    05/27/2021, 3:29 PM
    Hi.. I can see the enumvalue for horizontal line in enum class TAG HR("hr") and it is annotated as unused in its open class. How to add an HR tag in kvision? Cant see an example to provide the initialAttributes and consumer for this TAG. Need to use a custom tag? Any clue?
    r
    • 2
    • 1
  • k

    Kumaran Masilamani

    05/28/2021, 8:57 AM
    Hi, Has anyone tried the responsive layout in Kvision tabulator? I gave this, but could not see the any changes when I see it various screen sizes..
    options = TabulatorOptions(
                            layout = Layout.FITCOLUMNS,
                            responsiveLayout = ResponsiveLayout.COLLAPSE,.....
    r
    • 2
    • 15
  • w

    Wolfgang

    05/30/2021, 10:48 AM
    Hello guys, im playing with your example projects. First of all, thank you for the number of examples and the documentation. I’m afraid I’m missing something. In a fullstack app like “twees-fullstak-ktor”, the backend delivers the static frontend part (html+js) right? When I start “backendRun”, where can I reach the html endpoint?
    r
    • 2
    • 10
  • r

    Robert Jaros

    05/31/2021, 10:01 PM
    I'll be giving an online talk about KVision on this Friday (04.06, 18:00 UTC+02) during Polish Tricity KUG meeting. I'll be talking in English (at least try to 😉). Feel invited if you are interested 🙂 https://www.facebook.com/events/366253874817192
    👍🏼 1
    👍 9
    b
    l
    • 3
    • 4
  • w

    Wolfgang

    06/01/2021, 10:02 AM
    Is there a card container class in KVision?
    h
    r
    • 3
    • 4
  • r

    Robert Jaros

    06/04/2021, 3:34 PM
    My talk will be here soon: https://www.facebook.com/groups/tricity.kotlin.user.group/permalink/2813615058950855
    🎉 4
    p
    b
    • 3
    • 3
  • y

    y9san9

    06/05/2021, 7:58 PM
    Is there a way to see a kvision preview (like compose or something else)? I don't want to wait every time a project is compiling 😢
    r
    • 2
    • 9
  • s

    Slackbot

    06/07/2021, 11:07 PM
    This message was deleted.
    h
    r
    • 3
    • 8
  • r

    Robert Jaros

    06/12/2021, 2:01 AM
    I'm starting first experiments with KVision 5 features. We can discuss some breaking ideas.
    b
    t
    • 3
    • 24
  • m

    Miguel Vera Belmonte

    06/15/2021, 1:47 PM
    Hi everyone! I can’t seem to get to work source maps under the latest KVision release (4.8.1), using the LEGACY JS compiler. Taking as base the
    fomantic
    example (I suppose could be any other example too), I’ve done as instructed in the docs:
    To enable source maps you need to remove line sourceMaps = false from your build.gradle.kts file and remove line config.devtool = 'eval-cheap-source-map' from webpack.config.d/webpack.js file.
    and enabled legacy compiler by setting under gradle.properties:
    kotlin.js.compiler=legacy
    But I’m not able to get source maps working. I think they were working on 4.1.0, which is the latest version I tried before updating. To test, I make a simple console.log() on App.kt and then I get the following error when clicking the line number on the console:
    Could not load content for <webpack://fomantic/../src/main/kotlin/com/example/App.kt?f474> (HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME)
    Is anyone having this issue as well?
    r
    • 2
    • 4
  • y

    y9san9

    06/18/2021, 7:08 PM
    Please provide a comment in the interface that value should be pushed first-time when observer set
    r
    • 2
    • 3
  • s

    smallshen

    06/19/2021, 4:52 AM
    are there plan about integration with jetpack compose web?
    r
    • 2
    • 1
  • a

    asavill

    07/10/2021, 12:50 PM
    Hello all! Just played around with kvision for the first time and I really like it. I was able to get a Tabulator table with a couple of filtering methods (search and date) up and running pretty quickly. The mechanism for getting my data was a local json file in the resources directory:
    fun get(): Array<TestClassFailures> {
        return Json.decodeFromDynamic(Results.serializer(), io.kvision.require("test_failures.json")).testClassFailures
    }
    This was great for testing, but I’d like to move away from this. Unfortunately my json data isn’t available via a REST api to just pull it down. The reality is much more “primitive”. I have an S3 bucket that just occasionally gets a new json file added to it. I’d like the resulting application built from the kvision project to pull this new file in (they would be sat at the same level, so the json file would be added to the “index” folder). I’ve tried replacing the json file that gets added to .zip that gets generated when the application is built, but this seems to be ignored. The json file appears to be injected into the .js files directly. It this possible?
    h
    r
    • 3
    • 4
  • h

    Hywel Bennett

    07/13/2021, 2:08 PM
    @Robert Jaros I'm trying to understand the style {} block behaviour. It wasn't hard to figure out, but seemed surprising
    r
    • 2
    • 10
  • n

    neworldlt

    07/19/2021, 8:03 AM
    I found most of the examples are using Redux for state management. But one
    StateFlow
    . Is it safe to use? I mean long term support
    r
    • 2
    • 1
  • p

    Pitel

    07/23/2021, 1:59 PM
    I'm evaluating KVision for our internal IS. And I have a question: would it be possible to use Material UI with Kvision. I see you have support for React, but I don't see any mention/example hot to connect your Observables with React state.
    r
    • 2
    • 11
  • p

    Philipp Smorygo [JB]

    08/01/2021, 1:47 PM
    Hi. How is it meant to deal with component states? Do I need to store everything in global app store? The use case is a
    main
    component with several children. All children have identical functionality and are effectively a parent-child view. Where am I supposed to store
    selected child in parent view
    data, so it would survive
    main
    component refresh on global state update?
    r
    • 2
    • 3
  • r

    Robert Jaros

    08/12/2021, 6:12 AM
    The migration guide for KV5 is ready. Please let me know if you find any other problems with the migration. https://kvision.gitbook.io/kvision-guide/part-1-fundamentals/migration/migration-from-4.x-to-5.x
    👍 1
    a
    • 2
    • 1
  • y

    y9san9

    08/13/2021, 6:14 PM
    @Robert Jaros, why have you chosen to implement your own Observable value, instead of using StateFlow? Only because you don't want to require coroutines with your lib or there are other reasons?
    r
    t
    • 3
    • 12
  • l

    Lars Erik Rojeras

    08/16/2021, 2:18 PM
    I have an application based on KVision 4.7.1. When I try to run it I get the following message:
    [webpack-cli] Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
     - configuration has an unknown property '_assetEmittingWrittenFiles'. These properties are valid:
       object { bonjour?, client?, compress?, dev?, firewall?, headers?, historyApiFallback?, host?, hot?, http2?, https?, liveReload?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, public?, setupExitSignals?, static?, transportMode?, watchFiles? }
    (From what I know) I have not changed any build configurations. When I check out an earlier commit, that used to work, I get the same error. Have you got any ideas what can be wrong?
    r
    r
    • 3
    • 9
  • k

    kenkyee

    08/21/2021, 12:02 PM
    FYI, the latest kvision intellij plugin doesn't work...also tried on the latest AS canary. Get a 404...
    r
    • 2
    • 2
  • s

    steve h

    08/21/2021, 4:40 PM
    What's the word on using KVision with something like Koin for dependency injection on the API/backend? I was thinking to try it out
    r
    • 2
    • 3
  • r

    Robert Jaros

    08/26/2021, 9:06 AM
    Just had no time to fix all the examples.
    t
    • 2
    • 6
  • u

    UNuX

    08/29/2021, 7:23 AM
    Hey, I have a problem where this class:
    @Serializable
    data class EntryRecord(
        val id: Int?,
        @Contextual val creationDate: Date?,
        val contractType: String,
        val contractNumber: String,
        val pricePrepaid: Int,
        var pricePrepaidConfirmed: Boolean,
        val priceTotal: Int,
        var priceTotalConfirmed: Boolean,
        val additionalInfo: String?
    )
    Is serialized to this string:
    "{"_id":null,"_creationDate":null,"_contractType":"Test","_contractNumber":"Test","_pricePrepaid":20099,"_pricePrepaidConfirmed":false,"_priceTotal":400095,"_priceTotalConfirmed":false,"_additionalInfo":""}"
    Why is kotlin adding
    _
    in front of every field name? How do I get rid of this?
    r
    • 2
    • 7
  • u

    UNuX

    08/29/2021, 11:27 AM
    AppScope.launch {
                DataAccess.getRecords().catch {
                    Toast.error("Błąd pobierania danych z serwera")
                }.then { records ->
                    println("Records: $records")
                    val filtered = ArrayList<EntryRecord>()
                    for(record in records.unsafeCast<List<EntryRecord>>()) {
                        if(!record.pricePrepaidConfirmed || !record.priceTotalConfirmed) {
                            filtered.add(record)
                        }
                    }
    records variable is of type kotlin.Unit apparently...
    r
    • 2
    • 14
  • a

    adamratzman

    08/30/2021, 4:45 AM
    I get “Automatic publicPath is not supported in this browser” when trying to load a script programmatically in kvision 5. I had never run into this before upgrading to kvision 5 (I was on a very old version), and figured out that this is a webpack 5 issue. Has anyone else run into this, and if so what did you do to fix it?
    r
    • 2
    • 10
  • t

    Tomas Kormanak

    08/31/2021, 2:50 PM
    Is there an event fired when modal is closed? I need to do some action when modal is closed by
    closeIcon
    od pressing ESC key?
    r
    • 2
    • 5
  • l

    Lars Erik Rojeras

    09/01/2021, 7:05 AM
    I am migrating an application from KVision 4.7.1 to 5.1.0. I can build and run it when I use the legacy compiler. But if I switch to ir I get
    A problem occurred configuring root project 'tkview'.
    Task with name 'browserProductionWebpack' not found in root project 'tkview'.
    during build. I think it is related to jcenter() - but how do I solve it?
    r
    • 2
    • 2
Powered by Linen
Title
l

Lars Erik Rojeras

09/01/2021, 7:05 AM
I am migrating an application from KVision 4.7.1 to 5.1.0. I can build and run it when I use the legacy compiler. But if I switch to ir I get
A problem occurred configuring root project 'tkview'.
Task with name 'browserProductionWebpack' not found in root project 'tkview'.
during build. I think it is related to jcenter() - but how do I solve it?
r

Robert Jaros

09/01/2021, 7:13 AM
do you have
binaries.executable()
in your build file?
l

Lars Erik Rojeras

09/01/2021, 7:25 AM
No. And when I add it it build correctly 🙂. Thanks.
View count: 8