Migration from 5.x to 6.x
This is the list of incompatibilities you may encounter when migrating your application to KVision 6.0.0.
General changes
Java 17 is now required to develop all KVision applications and to run KVision fullstack applications. You may need to select JDK 17 in the
File -> Project structure
menu in the IntelliJ IDEA.The legacy backend is no longer supported - be sure you are using IR.
The fluent pattern has been removed from many components and containers which means some methods no longer return the component instance. Most notably the
onClick
method now returns handler id (like all other event methods). It could be a problem if you directly useadd()
methods instead of DSL.
Modules and components
Spinner
andRange
components have been moved to the newio.kvision.form.number
package.Select
,Spinner
andUpload
are now different components. The oldUpload
component based on bootstrap-fileinput library is still available asBootstrapUpload
. The oldSelect
andSpinner
components are no longer available. If you need advanced features use newTomSelect
,Spinner
,Numeric
andIMaskNumeric
components.The
Spinner
component is now only for integer values. UseNumeric
orImaskNumeric
components for decimal/float values.Typeahead
component is no longer available. UseTomTypeahead
fromkvision-tom-select
module instead.The
kvision-bootstrap-css
andkvision-bootstrap-dialog
modules have been removed and are no longer necessary.BootstrapCssModule
initializer works like before but is contained in the mainkvision-bootstrap
module.When using
Tabulator
component you need to use one of available css initializers. UseTabulatorCssBootstrapModule
initializer for Bootstrap 5 theme.The
serializer
parameter is now required when initializingTabulator
with Kotlin data model. In most cases it should be enough to useserializer = serializer()
. Of course your data model must be@Serializable
now.The Navigo 7 router from
kvision-routing-navigo
module uses#
as the default hash sign. UseRouting.init(hash = "#!")
if you want to restore the previous behaviour.The
routing
global variable has been removed. The internal router instance is returned by theRouting.init()
method.The
kvision-toast
module is no longer available. Usekvision-toastify
instead withToastifyModule
initializer. The newToast
component has a bit different API (e.g. usedanger()
method instead oferror()
)
Other changes
The
getElement()
method returnsHTMLElement
type instead ofNode
. In some rare cases your code may not compile until the type is changed.The Cordova KVision API uses now
kotlin.Result<T>
instead of a self-implementedResult
class. You need to adjust your code if you develop Cordova applications with KVision.The
panelsCompatibilityMode
option (compatibility with KVision 4) has been removed.Lots of old, deprecated API has been removed. Be sure you to fix all your deprecation warnings before upgrading to KVision 6.
Last updated