https://kotlinlang.org logo
Docs
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

    LeoColman

    12/27/2021, 1:30 AM
    Hey guys! How do you test your kvision components visually? I mean, how do you preview what you're creating instead of altering your
    main
    method to include only the said component?
    b
    • 2
    • 1
  • a

    Adam S

    12/29/2021, 9:42 AM
    good morning - I'd like to use the Kvision maps module, but I think it needs some work and documentation. I'm keen to do this, and I'm getting started on writing some tests. I feel a bit limited by the plain kotlin-test lib though. Would introducing Kotest be acceptable? (for assertions - the test-engine only works on JS IR, not legacy)
    r
    j
    • 3
    • 25
  • j

    Jörg Rade

    12/29/2021, 10:41 AM
    Hi all, anybody interested in a d3 module?
    r
    • 2
    • 2
  • j

    João Paulo Figueira

    12/29/2021, 12:51 PM
    I seem to have an issue with
    tabPanel
    as it inserts a
    div
    to contain each of the tab’s contents. My purpose is to have a tabbed UI that matches the browser window size, by using
    height = 100.pc
    Said
    div
    seems to break this discipline by allowing the contained element to grow in an unbounded fashion. I believe this would be solvable if, somehow, we would be able to style it. Any help? TIA!
    r
    • 2
    • 4
  • j

    João Paulo Figueira

    12/30/2021, 11:05 AM
    Is there any “data grid”-type component that we can readily use with KVision?
    r
    • 2
    • 4
  • j

    João Paulo Figueira

    12/30/2021, 12:45 PM
    How do I add a Polyline to the Map object? The library supports the
    PolylineOptions
    class, but there is no apparent method to create a polyline object. Do I need to extend the existing code?
    r
    a
    • 3
    • 13
  • a

    Adam S

    01/03/2022, 5:46 PM
    I've marked the kvision-maps PR as ready-for-review :) https://github.com/rjaros/kvision/pull/327 (@João Paulo Figueira ping! In case you want to take a look)
    r
    j
    • 3
    • 14
  • s

    Samkeene

    01/09/2022, 10:45 PM
    What is the proper way to say, return a userlist page using ktor with Kvision? I've been following along the ktor example but am unsure of how to apply the route.
    fun Application.main() {
        install(Compression)
        routing {
            applyRoutes(PingServiceManager)
            get("/userlist") {
                call.respondHtml(HttpStatusCode.OK) {
                    // send back my KVision UserPage class
                }
            }
        }
        kvisionInit()
    }
    I have the same file structure as the example (backendMain, commonMain, frontendMain). I'm simply unsure how to approach this. Should I create an
    IUserListService
    in
    commonMain
    with a
    getUserListPage()
    function, implement it in
    backendMain
    and then call it from somewhere in
    frontendMain
    ? And add
    applyRoutes(UserListServiceManager)
    to the ktor configuration? Assume I have a
    UserPage : SimplePanel()
    class in the front end, also I see from the documentation that KVision Services' cannot return SimplePanel as a type... I'm not sure how I should be doing this...
    r
    • 2
    • 3
  • s

    Samkeene

    01/09/2022, 11:43 PM
    Having looked through some more examples, am I correct in stating that KVision is used for creating single page applications, and is used with JS-Routing to create the impression of a multi-paged website with the tabPanel and stackPanel?
    r
    • 2
    • 2
  • l

    Lars Erik Rojeras

    01/14/2022, 10:29 AM
    I have two KVision applications using Tabulator. I have just upgraded both apps to Kvision 5.7.1. The legacy compiler is used. One application works as expected. But, in the other there is a problem with the tabulator rows. When the table is initially displayed the “tabulator-row” is much to high, much higher than the cells in the row. It means that only the first row is visible. If the user scroll the table the row immediately resize correctly and the full table is visible. Any idea what I can to do to fix this?
    r
    • 2
    • 12
  • m

    Mikhail Buzuverov

    01/15/2022, 5:05 AM
    Hi! I try KVision. It looks like I can build web application and Electron application on single code base. I downloaded
    kvision-examples
    and tried
    template-electron
    . If I run task
    runApp
    it is absolutely OK and the app works. But if I run task
    browserRun
    the application starts on local port 3000, but app is not working, in browser's console I see error:
    require is not defined
    . See screenshot. I don't modify code of example, it is my first checkpoint: run web variant and desktop variant of the app. Could you help me?
    r
    • 2
    • 8
  • r

    rocketraman

    01/24/2022, 4:31 PM
    Is there a gradle task I can use to just generate the kvision rpc classes?
    r
    • 2
    • 2
  • r

    rocketraman

    01/27/2022, 2:19 PM
    Is it possible to register serializer modules with kvision rpc?
    r
    • 2
    • 27
  • j

    Jörg Rade

    01/31/2022, 4:38 PM
    I try to set a filter on a Tabulator table:
    fun filterByState(state: EventState) {
        console.log("[ELT.filterByState]")
        console.log(tabulator)
        tabulator.jsTabulator?.setFilter("State", "=", state.name)
    }
    tabulator looks as expected and it's element jsTabulator seems to be set, but when I try to access or log it, it is null. I'm puzzled (and still at KVision 5.5.1).
    r
    • 2
    • 17
  • r

    rocketraman

    02/05/2022, 4:49 AM
    I am using client-side routing. When I'm on a page like
    <https://host/foo/bar>
    Kvision RPCs go to
    <https://host/foo/bar/kv/>...
    instead of
    <https://host/kv/>...
    . Is there a way to configure kvision to use
    /kv
    (absolute) path rather than
    kv
    (relative)? Setting
    <base href="/">
    works but feels like overkill.
    r
    • 2
    • 1
  • j

    Jörg Rade

    02/06/2022, 10:56 AM
    I try to embed https://github.com/data2viz (a d3 port to kotlin).
    r
    • 2
    • 25
  • d

    David West

    02/08/2022, 8:46 AM
    Hello! I seem to not be able to find the answer to my question myself so i’ll try here: I would like to use a Popover but with different show/hide timings, is this something that is doable in Kvision? We have the delay but this applies to both show/hide:
    button("A button") {
        enablePopover(PopoverOptions(
            title = "This is a <b>rich</b> popover title",
            content = "This is a <b>rich</b> popover content",
            rich = true,
            delay = 1000,   <-------
            placement = Placement.BOTTOM,
            triggers = listOf(Trigger.CLICK)
        ))
    }
    Or can this be achieved with something like:
    onEvent {
      mouseover = {
        self.showPopover()
        <some sort of delay here>
        self.hidePopover()
      }
    }
    r
    • 2
    • 3
  • r

    rocketraman

    02/10/2022, 2:10 PM
    @Robert Jaros Thoughts on making
    ServiceException
    open so that the client can act based on sub-classes of it?
    r
    • 2
    • 24
  • t

    Tomas Kormanak

    02/15/2022, 10:43 AM
    I have a weird error in forms. When I have a text form field, set the focus in it (click) and then press enter it tries to submit the form and reload the page and url is changed from
    <http://localhost:3000/#/myroute>
    to
    <http://localhost:3000/?#/myroute>
    Have you seen it?
    r
    • 2
    • 4
  • r

    rocketraman

    03/02/2022, 4:15 PM
    Currently if a KVService is deleted, you end up with compile errors because the corresponding generated classes are not removed. Is there a way to have the compiler remove these? Gradle output tracking?
    r
    • 2
    • 6
  • p

    Phil Richardson

    03/03/2022, 10:18 AM
    Random question and not a request to deliver. The choice of DI was Guice, Is there a reason why this was chosen over other DI frameworks, such as something more Kotlin first like Kodein-DI? I have found Guice to be a steep learning curve and requires way more boilerplate for the same goals. I can use Kodein via JSR-330 support with limitations (plus I don't want to kill the kittens the docs warns about), but I believe may prevent its use anyway.
    r
    r
    • 3
    • 16
  • p

    Phil Richardson

    03/05/2022, 8:33 PM
    Are the current API doc generated via Gradle, or via the Dokka fat jar? I am seeing a lot of
    ERROR CLASS
    items in unexpected places. Primary examples is under the JS
    KVRemoteAgent
    class parameters For
    KVServiceMgr<T>
    parameter, and for
    RequestInit
    under the
    (RequestInit.() -> Unit)?
    parameter Both area pretty unexpected, given one comes from the common source of the same module, then the other from stdlib I initially suspected https://github.com/Kotlin/dokka/issues/503 But I am not entirely sure it fits
    r
    • 2
    • 4
  • j

    João Paulo Figueira

    03/14/2022, 12:14 PM
    HI! I want to display a sort indicator icon next to the table header’s column name. Is there a documented way to do this?
    r
    • 2
    • 6
  • l

    Lars Erik Rojeras

    03/14/2022, 5:43 PM
    Hi. I got a strange problem related to Tabulator 5 (I think). When I display a tabulator table using the dev server everything works as expected. But, if I build a distribution and make the files available through my own web server only the tabulator header is shown. Then I get the following error in the console:
    main.bundle.js:2 Uncaught TypeError: Cannot read properties of undefined (reading 'length')
        at sa (main.bundle.js:2:1720204)
        at new ii (main.bundle.js:2:2579880)
        at hx (main.bundle.js:2:2370990)
        at Rx.toKotlinObj_t5tk2r$ (main.bundle.js:2:2399627)
        at tn.toKotlinObjTabulator_e9s2f4$ (main.bundle.js:2:2554636)
        at tn.fixData_giv383$ (main.bundle.js:2:2554164)
        at Fe.<anonymous> (main.bundle.js:2:2543681)
        at main.bundle.js:2:1366879
        at Array.forEach (<anonymous>)
        at Te._dispatch (main.bundle.js:2:1366854)
    sa @ main.bundle.js:2
    ii @ main.bundle.js:2
    hx @ main.bundle.js:2
    Rx.toKotlinObj_t5tk2r$ @ main.bundle.js:2
    tn.toKotlinObjTabulator_e9s2f4$ @ main.bundle.js:2
    tn.fixData_giv383$ @ main.bundle.js:2
    (anonymous) @ main.bundle.js:2
    (anonymous) @ main.bundle.js:2
    _dispatch @ main.bundle.js:2
    dispatchExternal @ main.bundle.js:2
    load @ main.bundle.js:2
    _loadInitialData @ main.bundle.js:2
    _create @ main.bundle.js:2
    (anonymous) @ main.bundle.js:2
    setTimeout (async)
    Re @ main.bundle.js:2
    Fe @ main.bundle.js:2
    hx @ main.bundle.js:2
    tn.createJsTabulator @ main.bundle.js:2
    tn.afterInsert_77isfd$ @ main.bundle.js:2
    (anonymous) @ main.bundle.js:2
    (anonymous) @ main.bundle.js:2
    Le.patch_6ju63b$ @ main.bundle.js:2
    Tw.reRender_8be2vx$ @ main.bundle.js:2
    Tw.singleRender_klfg04$ @ main.bundle.js:2
    (anonymous) @ main.bundle.js:2
    setTimeout (async)
    Tw.singleRenderAsync_o14v8n$ @ main.bundle.js:2
    kp.singleRenderAsync_o14v8n$ @ main.bundle.js:2
    (anonymous) @ main.bundle.js:2
    (anonymous) @ main.bundle.js:2
    (anonymous) @ main.bundle.js:2
    (anonymous) @ main.bundle.js:2
    (anonymous) @ main.bundle.js:2
    g.dispatch_dtrwrh$ @ main.bundle.js:2
    an.domdbLoadingComplete @ main.bundle.js:2
    Gn @ main.bundle.js:2
    o.onload @ main.bundle.js:2
    load (async)
    en @ main.bundle.js:2
    Kn @ main.bundle.js:2
    an.initialize @ main.bundle.js:2
    Kt.start @ main.bundle.js:2
    Te.start_x7u0o8$ @ main.bundle.js:2
    a @ main.bundle.js:2
    (anonymous) @ main.bundle.js:2
    main.bundle.js:2 redraw failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.
    redraw @ main.bundle.js:2
    (anonymous) @ main.bundle.js:2
    
    redraw failed - table not yet initialized. Please wait for the `tableBuilt` event before calling this function.
    redraw @ main.bundle.js:2
    (anonymous) @ main.bundle.js:2
    I guess it can be related to https://github.com/olifolkerd/tabulator/issues/3407, but I do not use setData() in my code. Still using the legacy compiler. Any ideas?
    r
    • 2
    • 10
  • j

    João Paulo Figueira

    03/15/2022, 5:42 PM
    I’m looking for a frontend component that allows message-passing between modules but in a decoupled fashion (pub/sub model). Does KVision implement this? If not, are there known alternatives (before I roll my own)? Thanks!
    r
    • 2
    • 4
  • j

    Jörg Rade

    03/16/2022, 11:12 AM
    My gradle build is fine, but in intellij what is defined in sourceSets["main"].dependencies {} does not show up under External Libraries. Is there a recommended way to sync?
    r
    a
    • 3
    • 38
  • j

    Jörg Rade

    03/22/2022, 8:15 AM
    Can I pass a multiline string to js()?
    t
    • 2
    • 6
  • r

    Robert Jaros

    03/24/2022, 12:10 PM
    @Jörg Rade I don't really understand your question in https://github.com/rjaros/kvision/issues/358
    j
    • 2
    • 12
  • j

    João Paulo Figueira

    03/25/2022, 4:22 PM
    Hi! Is there any supported pattern (like MVVM) for kvision?
    r
    • 2
    • 1
  • j

    Jörg Rade

    03/28/2022, 4:11 PM
    Is it possible to have cascading menus like in:
    r
    • 2
    • 3
Powered by Linen
Title
j

Jörg Rade

03/28/2022, 4:11 PM
Is it possible to have cascading menus like in:
r

Robert Jaros

03/28/2022, 4:13 PM
Yes. You can see this in the context menu in the showcase example (https://rjaros.github.io/kvision-examples/showcase/#!/dropdowns)
Just add
DropDown
with the
forDropDown = true
parameter.
✔️ 1
j

Jörg Rade

03/28/2022, 4:18 PM
🙏
View count: 2