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

    jschneider

    02/12/2021, 3:07 PM
    One question towards IR-backend. The release notes of 3.17.0 mention that IR backend is now supported. But: For me the fontawesome icons do not work. I assume it is related to the backend. "kvision-kvision-fontawesome-jsIr" only contains a package.json "kvision-kvision-fontawesome-jsLegacy" contains more files (e.g. an index.js file) • Should this work with the IR backend? • Are there snapshots for the latest beta (4.0) available?
    r
    • 2
    • 2
  • r

    Robert Jaros

    02/12/2021, 3:13 PM
    at least it works for me
    j
    • 2
    • 35
  • r

    Robert Jaros

    02/12/2021, 3:18 PM
    I've tested all example apps with IR, so definitely fontawesome works
    j
    • 2
    • 1
  • j

    jschneider

    02/13/2021, 3:08 PM
    One more suggestion: The radio group should take other objects than only Strings. For example enum values are a typical use case. I understand that the String value is very useful for formatting (without needing a formatter or other callback). But the key could/should by of any type ("T")
    r
    • 2
    • 14
  • r

    Robert Jaros

    02/14/2021, 3:00 AM
    message has been deleted
    🎉 4
    j
    • 2
    • 2
  • t

    Tomas Kormanak

    02/15/2021, 11:12 AM
    Are you considering upgrading to navigo router 8? It has some nice features.
    r
    • 2
    • 10
  • j

    jschneider

    02/15/2021, 12:04 PM
    One question for listTag: I have an ObservableState that contains a list of objects. is it possible to create a list that is automatically updated whenever the list is changed?
    r
    • 2
    • 2
  • j

    jschneider

    02/15/2021, 2:33 PM
    I am trying to get a button with style "btn-link". But whenever I use the "button" DSL, there is always a class added automatically (usually "btn-primary"). Removing the ButtonStyle is not possible unfortunately. I want to achieve this:
    <button class="btn btn-link">
    r
    • 2
    • 7
  • j

    jschneider

    02/15/2021, 4:53 PM
    Could you give me a hint how I could call the "collapse" methods manually? https://getbootstrap.com/docs/4.0/components/collapse/ I don't have that much experience with JS interop. Therefore I'd be glad if anybody could give me a hint how to call these methods on e.g. a div
    r
    • 2
    • 19
  • j

    jschneider

    02/15/2021, 8:22 PM
    I am missing documentation about focus handling and shortcuts (e.g. ctrl+enter to confirm) in modal dialogs. Any hints where to find that stuff?
    r
    • 2
    • 1
  • j

    jschneider

    02/16/2021, 2:39 PM
    Has anybody experience with i18n and parameters? E.g. translating the string "I have 7 cars". where "7" is a variable that is determined at runtime? The "tr" doesn't have any parameters as far as I can see. How is this done?
    r
    • 2
    • 6
  • c

    corneil

    02/16/2021, 10:42 PM
    I can report that my demo for KFSM and KVision works fine on v4.0.0 https://github.com/open-jumpco/kfsm-kvision-web I did notice npm report a few packages that may benefit from an upgrade. I didn't investigate deeper to see if they were direct KVision module dependencies or use by bootstrap etc.
    r
    • 2
    • 2
  • t

    Tomas Kormanak

    02/17/2021, 12:08 PM
    I have a question about using bootstrap in KVision. We would like to process bootstrap and our SCSS files during the build instead of using CSS from kvision-bootstrap-css module. I removed the module but I still get bootstrap somehow included in the project. Do you have some example how to set it up?
    r
    • 2
    • 15
  • b

    Big Chungus

    02/19/2021, 6:44 PM
    Getting this weird error when trying fresh build of new kvision project with IR
    e: java.lang.IllegalStateException: No descriptor found for library /home/mpetuska/.gradle/caches/modules-2/files-2.1/io.kvision/kvision-bootstrap-css/4.0.0/966cd74de61f5102ac384f4a6a435665cbe34ba5/kvision-bootstrap-css-4.0.0
    r
    • 2
    • 13
  • b

    Big Chungus

    02/19/2021, 6:51 PM
    On a side note, it'd be good to have @KVisionDsl annotation on your builder DSLs
    @DslMarker
    annotation class KVisionDsl
    👍 1
    r
    j
    t
    • 4
    • 43
  • b

    Big Chungus

    02/19/2021, 7:46 PM
    Is it possible to add an icon to navbar label/brand?
    r
    • 2
    • 1
  • b

    Big Chungus

    02/19/2021, 8:56 PM
    What would you recommend to use to display read-only inline code snippets? Can;t seem to find
    pre
    tag in kvision.
    r
    • 2
    • 3
  • b

    Big Chungus

    02/19/2021, 10:34 PM
    Are there any plans for kvision components module? It could just wrap bs4 components like card or badge to make the development a bit more fluid
    r
    c
    • 3
    • 6
  • j

    Jamy

    02/20/2021, 7:26 AM
    Hello, can we use *Panel (SplitPanel, HPanel....) in a FormPanel without loose databiding ? How can I manage my form layout ?
    r
    • 2
    • 8
  • w

    Wishnuprathikantam

    02/22/2021, 10:28 AM
    @Robert Jaros
    @Serializable
    data class SuccessResponse<T>(
            val status: Int,
            val data: T,
            val message: String
    ) : ApiResponse()
    
    @Serializable
    data class ErrorResponse(
            val status: Int,
            val errorCode: Int,
            val message: String
    ) : ApiResponse()
    
    @Serializable
    sealed class ApiResponse
    remoteCall(
                    ApiRoutes.LOGIN,
                    Json.encodeToString(AdminRequest.serializer(), body),
                    ApiResponse.serializer(),
                    <http://HttpMethod.POST|HttpMethod.POST>
            )
    when (this) {
        is SuccessResponse<*> -> {
            val data = this.unsafeCast<SuccessResponse<T>>()
            success(data)
        }
        is ErrorResponse -> {
            failure(this)
        }
        else -> {
            console.log(this)
        }
    }
    Need help with deserializing sealed classes, without else block throws NoWhenBranchMatchedException
    a
    r
    • 3
    • 36
  • b

    Big Chungus

    02/22/2021, 10:47 PM
    Not sure how much effort it would be, but I'm always missing some visuals or screenshots when browsing kvision documentation
    r
    t
    • 3
    • 5
  • j

    Jamy

    02/23/2021, 3:12 AM
    Hello, I tried to make a multipart request with an
    Upload
    form control but when I want to get my file from my form, It always return null on
    upload
    field even if I used your sample on your doc: Client side file handling
    val pictureForm = formPanel<Request> {
        add(Request::upload,
            Upload(multiple = false, label = "Upload files (images only)").apply {
                showUpload = false
                showCancel = false
                explorerTheme = true
                dropZoneEnabled = true
                allowedFileTypes = setOf("image")
            })
    }
    button("Submit").onClick {
        GlobalScope.launch {
            val fdata = pictureForm.getDataWithFileContent()
            val firstImage = fdata.upload?.firstOrNull()?.content
            if (firstImage != null) {
                Alert.show("Image", "<img src=\"$firstImage\">", rich = true)
            }
            console.log(firstImage)
        }
    }
    r
    • 2
    • 9
  • j

    Jamy

    02/24/2021, 2:51 AM
    Is there a possibility to do a multipart request without using Upload form control ? I see that RestClient isn't compliant with multipart. In my case Upload control is just a tool to get a file before modifying it. After this modification, I would like to add it to an authenticate multipart request that for now didn't know or see any way to make this multipart request
    r
    • 2
    • 6
  • r

    Robert Jaros

    02/28/2021, 5:24 PM
    it will generate
    <tag disabled="disabled"/>
    which is equivalent
    b
    • 2
    • 11
  • t

    Tomas Kormanak

    03/02/2021, 5:06 PM
    We are few versions back(3.16.1) and I am trying to upgrade and I found an issue with Tabulator. We use tabulator with observable list, like this(simplified):
    data class Voice(var _id: Id? = null, var name: String? = null) 
    
    val options = TabulatorOptions(
            layout = Layout.FITCOLUMNS,
            columns = listOf(ColumnDefinition(tr("Name"), Voice::name.name))
        ),
    
    val entities: ObservableList<E> = observableListOf()
    tabulator = Tabulator(entities, options = options)
    It used to work well, but after upgrade to 3.17.0 we can see only empty rows. I think it's because of this commit: https://github.com/rjaros/kvision/commit/5406e9e7b4cf8b516e9070179bb702038e2af46a since then data are converted to plain object in
    Tabulator::replaceData
    Also
    getData()
    now returns plain object instead of original object:
    tabulatorRowClick = { e ->
        val entity = (e.detail as JsTabulator.RowComponent).getData() as E
       // .... do something with entity
    }
    Am I missing something or is there a new way how to use Tabulator we should use?
    r
    • 2
    • 66
  • a

    Artglorin

    03/02/2021, 7:13 PM
    hi all! I found a mistake in documentation. In the “JS routing” section https://kvision.gitbook.io/kvision-guide/part-1-fundamentals/js-routing in the first paragraph wrong module name
    kvision-module-navigo-ng
    . Should be `kvision-routing-navigo-ng`How I can contribute a fix?
    r
    • 2
    • 1
  • j

    Jamy

    03/04/2021, 2:27 AM
    Hello, I try to add
    Authorization
    header to ajax request from tabulator but my configuration is ignored. What is the good syntax ?
    tabulator<Any>(
        TabulatorOptions(
            ajaxURL = "${Api.API_URL}/product",
            ajaxConfig = "POST",
            ...
        )
    )
    Request is a POST
    tabulator<Any>(
        TabulatorOptions(
            ajaxURL = "${Api.API_URL}/product",
            ajaxConfig = object : Tabulator.AjaxConfig {
                override var method: String = "POST"
                override var headers: dynamic = mapOf("Authorization" to token)
            },
            ...
        )
    )
    Request is a GET instead of POST (and Authorization header isn't added)
    r
    • 2
    • 2
  • t

    Tom

    03/07/2021, 7:39 PM
    Having some trouble with Tabulator and kvision 4.1.1. Using Tabulator with a ObservableList (backend is ktor). With 4.1.1 the Tabulator rows are created but empty, header is visible. Going back to 4.0.0 solves this issue. (kotlin.js.compiler=ir)
    val tab_options = TabulatorOptions(
            layout = Layout.FITCOLUMNS,
            columns = listOf(
                    ....
            )
    )
    tabulator(Model.cov_List, options = tab_options)
    r
    • 2
    • 18
  • t

    Tomas Kormanak

    03/08/2021, 9:12 AM
    I am having issue with building 4.1.1:
    ./gradlew publishToMavenLocal -PSNAPSHOT=true
    results:
    > Task :compileKotlinJsIr
    e: java.lang.IllegalStateException: Unsupported operation
            at org.jetbrains.kotlin.backend.common.serialization.IrModuleDeserializer.referenceSimpleFunctionByLocalSignature(IrModuleDeserializer.kt:37)
    Any idea? It works in 4.1.0
    r
    j
    • 3
    • 7
  • t

    Tomas Kormanak

    03/10/2021, 6:54 PM
    @Robert Jaros I think I have similar issue like we had with Tabulator. I get Ilegal Cast exception somewhere in
    io.kvision.form.Form#setData
    .
    r
    • 2
    • 5
Powered by Linen
Title
t

Tomas Kormanak

03/10/2021, 6:54 PM
@Robert Jaros I think I have similar issue like we had with Tabulator. I get Ilegal Cast exception somewhere in
io.kvision.form.Form#setData
.
r

Robert Jaros

03/10/2021, 6:57 PM
I don't think so it's similar, because Form data handling is based on serialization.
t

Tomas Kormanak

03/10/2021, 6:57 PM
It is also related to migration 3.16 -> 4.1.1. I am going to debug it.
r

Robert Jaros

03/10/2021, 6:58 PM
could you please paste the stacktrace?
t

Tomas Kormanak

03/10/2021, 7:01 PM
It is inside coroutine, so the stack trace is not much useful.
r

Robert Jaros

03/10/2021, 7:04 PM
There were a few changes in
Form
component since 3.16. I've dropped
encodeToDynamic
and fixed issues with DataTime and Upload fields on IR.
View count: 5