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
  • l

    Lars Erik Rojeras

    09/18/2020, 9:14 AM
    Is there a way to get the absolute position of a component in KVision?
    r
    • 2
    • 23
  • b

    Big Chungus

    09/20/2020, 11:50 AM
    Is 3.14.0 published with IR variant?
    r
    • 2
    • 6
  • r

    Robert Jaros

    09/29/2020, 9:54 AM
    For now, source maps are disabled in KVision templates, because the reload cycle is a lot faster without them.
    t
    • 2
    • 1
  • r

    Robert Jaros

    09/29/2020, 2:10 PM
    When starting from the template project you need to remove line
    sourceMaps = false
    from
    build.gradle.kts
    and remove line
    config.devtool = 'eval-cheap-source-map'
    from
    webpack.config.d/webpack.js
    👍 1
    l
    • 2
    • 3
  • r

    Robert Jaros

    10/05/2020, 7:41 AM
    Hi
    n
    • 2
    • 9
  • r

    Robert Jaros

    10/06/2020, 6:54 PM
    not really, it's in fact just a simple hack
    l
    • 2
    • 6
  • r

    Robert Jaros

    10/09/2020, 4:54 PM
    KVision 3.16.1 is out https://github.com/rjaros/kvision/releases/tag/3.16.1
    👍 3
    b
    • 2
    • 2
  • r

    Robert Jaros

    10/14/2020, 3:54 PM
    It works fine for me (I had to disable validation to make ksvg work)
    f
    • 2
    • 1
  • r

    Robert Jaros

    11/03/2020, 4:11 PM
    Probably not, empty values from all kvision form controls are always converted to
    null
    .
    t
    • 2
    • 15
  • r

    Robert Jaros

    11/11/2020, 1:57 PM
    KVision 3.16.3 is out https://github.com/rjaros/kvision/releases/tag/3.16.3
    b
    • 2
    • 3
  • r

    Robert Jaros

    11/16/2020, 7:46 PM
    I've deployed new KVision website at https://kvision.io Please let me know what do you think, before I make it fully official 🙂
    🔥 3
    g
    b
    a
    • 4
    • 6
  • r

    Robert Jaros

    11/18/2020, 12:52 AM
    Now, https://kvision.io is created with KVision 🙂
    b
    • 2
    • 8
  • r

    Robert Jaros

    11/27/2020, 12:00 AM
    Hope this time everything will be ok.
    t
    • 2
    • 1
  • o

    Osmium

    12/16/2020, 4:45 PM
    Hi! I'm one of the happy KVision users and I use it with Fomantic-UI (https://fomantic-ui.com) instead of Bootstrap. I think about writing package that brings Fomantic elements to KVision. A few questions: • Is someone interested in Fomantic-UI support at all? • How would I better contribute it? Via fork of main/master branch and creating pull request with module, or it's better to create completely separate repository with its own versioning?
    l
    r
    • 3
    • 13
  • r

    Robert Jaros

    12/22/2020, 11:03 PM
    I think client authentication with some popular auth provider would be a good use-case for a new simple example app. But for now I have made no such application. I worked with KVision and SAML, but it was mostly server-side work.
    t
    • 2
    • 1
  • r

    Robert Jaros

    01/01/2021, 2:22 PM
    select(listOf("1" to "First", "2" to "Second")) {
                    emptyOption = true
                    selectWidth = 300.px
                    onEvent {
                        change = {
                            console.log(self.value)
                        }
                    }
                }
    a
    • 2
    • 1
  • r

    Robert Jaros

    01/05/2021, 11:56 AM
    val c = div("clickable div") {
                    onClick {
                        console.log("clicked")
                    }
                }
                button("test with jQuery").onClick {
                    c.getElementJQuery()?.trigger("click")
                }
                button("test with Vanilla JS").onClick {
                    val event = Event("click")
                    c.getElement()?.dispatchEvent(event)
                }
    a
    • 2
    • 1
  • r

    Robert Jaros

    01/14/2021, 3:46 PM
    I would probably try the same but with some short
    setTimeout()
    delay
    t
    • 2
    • 5
  • c

    Claude Brisson

    01/29/2021, 2:57 PM
    In terms of direct css support, have you considered semantic ui ? (or rather fomentic ui, the active fork)
    r
    • 2
    • 1
  • r

    Robert Jaros

    02/04/2021, 2:16 PM
    With Bintray sunsetting I'm going to move KVision to Maven Central. It's probably a good moment to consider renaming maven group name from "pl.treksoft" to "io.kvision". What do you think?
    ➕ 5
    b
    j
    • 3
    • 15
  • j

    jschneider

    02/06/2021, 11:08 AM
    Just to understand: When running "./gradlew -t run" changes to the Kotlin code result in an automatic reload of the browser. Changes to *.html files (in resources) do not reload the browser. Correct?
    b
    • 2
    • 2
  • j

    jschneider

    02/06/2021, 3:54 PM
    I am working through the doc (very nice so far!). I am struggeling with the CSS Styles (https://kvision.gitbook.io/kvision-guide/part-1-fundamentals/css-properties) --> The class is added to my div. But the content of the CSS style is nowhere to be found? I have 6 inlince css declarations - but none of them contains my properties defined in the style. Any hints? Am I missing something?
    r
    • 2
    • 12
  • r

    Robert Jaros

    02/10/2021, 1:56 PM
    Which backend have you tried?
    j
    • 2
    • 2
  • r

    Robert Jaros

    02/10/2021, 6:05 PM
    you probably need to adjust paths in
    webpack.config.d/webpack.js
    j
    • 2
    • 20
  • j

    jschneider

    02/11/2021, 1:53 PM
    Hey. One more (stupid) question: I have a org.w3c.dom.HTMLDivElement. How can I add this to a kvision div?
    r
    • 2
    • 5
  • j

    jschneider

    02/11/2021, 4:35 PM
    I suddently (?) get this error message: Module not found: Error: Can't resolve './locale' in 'MY_PROJECT_ROOT/build/js/node_modules/moment/min' in browserDevelopmentRun Any ideas how I could find the reason for?
    r
    • 2
    • 36
  • r

    Robert Jaros

    02/12/2021, 7:52 AM
    We have reached 600 ⭐ on GitHub 🎉🍾🤩
    :kotlin-intensifies: 3
    🎉 4
    b
    • 2
    • 1
  • j

    jschneider

    02/12/2021, 8:37 AM
    I am trying to get forms running but run into:
    Uncaught TypeError: tmp0_safe_receiver.TouchSpin is not a function
        afterInsert_14 neckarIT-ui.js:56336
        invoke_171 neckarIT-ui.js:42550
        factory_82 neckarIT-ui.js:44165
        patch snabbdom.js:300
        patch_1 neckarIT-ui.js:33427
        reRender neckarIT-ui.js:48444
        refresh_23 neckarIT-ui.js:43708
        addInternal_14 neckarIT-ui.js:48692
        add_60 neckarIT-ui.js:48697
        main neckarIT-ui.js:46831
        main$default neckarIT-ui.js:46848
        invoke_816 neckarIT-ui.js:94297
        factory_373 neckarIT-ui.js:94354
        Root_init_$Init$ neckarIT-ui.js:48085
        Root_init_$Create$ neckarIT-ui.js:48090
        root neckarIT-ui.js:48486
        start_1 neckarIT-ui.js:94318
        startApplication$start neckarIT-ui.js:33300
        invoke_125 neckarIT-ui.js:33327
        factory_66 neckarIT-ui.js:33347
        startApplication neckarIT-ui.js:33283
        main_0 neckarIT-ui.js:94327
        <anonymous>
    r
    • 2
    • 9
  • j

    jschneider

    02/12/2021, 10:09 AM
    I think the binding is a bit surprising: • I expected to be able to create a bidirectional binding to the ObservableState. Currently I have to add a manual • It is very surprising to have the "init" lambda every time the value of the ObservableState changes. Coming from TornadoFX I expected the lambda to be just called once - when initializing the text field • Having to add "value = it" to the init lambda has also been surprising for me. --> Data Binding is one of the most helpful features. Currently it takes quite a lot of code for each field (compared to e.g. TornadoFX). Maybe there could be some improvements made?
    r
    • 2
    • 15
  • j

    jschneider

    02/12/2021, 11:25 AM
    I am playing around with validation. When setting the validationStatus to INVALID on a text, the enclosing div is updated with the css class "text-danger". When I reset the validation status to "VALID" the css class is not removed. Any idea what I might miss?
    r
    • 2
    • 8
Powered by Linen
Title
j

jschneider

02/12/2021, 11:25 AM
I am playing around with validation. When setting the validationStatus to INVALID on a text, the enclosing div is updated with the css class "text-danger". When I reset the validation status to "VALID" the css class is not removed. Any idea what I might miss?
r

Robert Jaros

02/12/2021, 11:59 AM
Works for me. Tested with:
val text = text()
            button("invalid").onClick {
                text.validationStatus = ValidationStatus.INVALID
            }
            button("valid").onClick {
                text.validationStatus = ValidationStatus.VALID
            }
            button("normal").onClick {
                text.validationStatus = null
            }
But you are probably doing something else, because there is no 'text-danger' class with this.
This adds
text-danger
class but works for me as well:
val text = text()
            button("error").onClick {
                text.validatorError = "error message"
            }
            button("normal").onClick {
                text.validatorError = null
            }
j

jschneider

02/12/2021, 12:53 PM
Only happens with a label and a validationError set
val text = text().apply{
              label = "daLabel"
            }

            button("invalid").onClick {
              text.validationStatus = ValidationStatus.INVALID
              text.validatorError = "Not a number!"
            }
            button("valid").onClick {
              text.validationStatus = ValidationStatus.VALID
            }
            button("normal").onClick {
              text.validationStatus = null
            }
Resetting the validationError removes the class
Ok, the state "validationStatus = VALID" and "validationError != null" doesn't make too much sense. But maybe bind the danger-text to "validationStatus" instead of "validationError"?
This might be better in cases where no validation error is set
r

Robert Jaros

02/12/2021, 1:19 PM
validationStatus
is a property of input controls (e.g.
TextInput
), which don't contain labels and error messages. It's marked with border color only.
validatorError
, on the other hand, is a property of form controls (e.g.
Text
) which have labels and error messages. So if you want to show error text for form control use
validatorError
(it sets
validationStatus
automatically on the inner input). If you just want colored border use
validationStatus
(it's available for both types of control).
👍 1
View count: 3