Adam S
09/03/2022, 4:56 PMCannot GET /servers/test-server
I've set up the routing...
fun init() {
routing
.on("/", { _ ->
println("routing.on HOME")
homepageView()
})
.on("/servers/(.*)", { match ->
println("routing.on SERVER $match")
val serverId = match.data[0] as? String ?: error("invalid server id")
println("routing.on SERVER serverId:$serverId")
serverView(serverId)
}
)
.resolve()
}
And I think I'm creating the link correctly
listTag(ListType.UL) {
state.serverIds.forEach { serverId ->
li {
div {
link(
label = "$serverId",
dataNavigo = true,
url = "/servers/$serverId",
)
}
}
}
}
I can see in the logs that Navigo seems to be aware of the routes, and is printing routing.on HOME
, but it never prints routing.on SERVER
[WebsocketService] init <ws://localhost:3000/kafkatorio/ws>,
kotlin-kotlin-stdlib-js-ir.js?46ac:19385 routing.on HOME
index.js?0118:551 [webpack-dev-server] Hot Module Replacement enabled.
index.js?0118:551 [webpack-dev-server] Live Reloading enabled.
kotlin-kotlin-stdlib-js-ir.js?46ac:19385 [WebsocketService.handleMessageEvent] non-json message elapsed 2h 53m 46.078512299s
test-server:1 GET <http://localhost:3000/servers/test-server> 404 (Not Found)
Navigated to <http://localhost:3000/servers/test-server>
I've tried using different matcher styles (regex, path IDs, plain strings) but nothing seems to work.
A full example might help. The best example I've found was here: https://github.com/rjaros/kvision-realworld-example-app-fullstack/, but that's using the older version of Navigo. There's another usage in the KVision examples repo, but it's more simplistic.Robert Jaros
09/04/2022, 8:00 PMconfig.devServer.historyApiFallback = true
to webpack.config.d/webpack.js
napperley
09/06/2022, 1:27 AMTomas Kormanak
09/06/2022, 8:14 AM1 = One
2 = Two
results in this in DOM
<div ...>OneOne</div>
Tomas Kormanak
09/06/2022, 11:18 AMConverted messages-en.po to messages-en.json
internal/modules/cjs/loader.js:883
throw err;
^
Error: Cannot find module 'XXX/build/js/node_modules/gettext.js/bin/po2json'
I thought it's a problem only in 5.7.0 as release notes says "It is broken" but I have the same issue in all 5.7.* versionsAdam S
09/06/2022, 8:35 PM/servers/test-id
at all...
routing
.on("/", {
log("routing.on HOME")
homepageView()
})
.on(("/servers/(.*)"), { match ->
println("routing.on SERVER $match")
val serverId = match.data[0] as? String ?: error("invalid server id")
println("routing.on SERVER serverId:$serverId")
serverView(FactorioServerId(serverId))
}
)
I can see routing.on HOME
logged, but routing.on SERVER
isn't logged. It was earlier! I've no idea what's wrong...Robert Jaros
09/07/2022, 2:09 PMDavid West
09/08/2022, 10:59 AMFlexPanel
like this:
[ Div1
Div2
(space in the middle) Div3
Div4
]Robert Jaros
09/11/2022, 9:44 AMRobert Jaros
09/12/2022, 3:48 PMRobert Jaros
09/12/2022, 3:58 PMkvision-datetime
module contains DateTime
and DateTimeInput
components which have almost the same API as the old ones (from the kvision-bootstrap-datetime
module). It should a drop-in replacement for the old module with just a few names changed. The new components are also fully usable without Bootstrap, even without any CSS applied (note: Fontawesome module should be included).Robert Jaros
09/12/2022, 4:10 PMPingService()
we can use getService<IPingService>()
and instead of PingServiceManager
we can use getServiceManager<IPingService>()
(there are even helper functions getAllServiceManagers()
and getServiceManagers(vararg ...)
which return lists of objects). As a result the application can now be fully compiled in IDE, even without any gradle runs. I've converted some example apps to this method (but not all, there are so many 😉)Robert Jaros
09/12/2022, 4:27 PMkvisionInit()
function (Koin doesn't have any implicit or just-in-time bindings)
• if your service class needs access to the Ktor's ApplicationCall
(e.g. for authentication) you have to add the call as constructor parameter of the service and use constructor DSL with factoryOf(::ClassName)
function
• the same applies to components with ApplicationCall injected into other components - eager or constructor injection is required
• you can use lazy evaluated injection or other scopes (e.g. single) for services that do not need to work with "ApplicationCall`
All these rules are implemented in the https://github.com/rjaros/kvision-examples/tree/master/addressbook-fullstack-ktor-koin examplenapperley
09/13/2022, 3:14 AMModule not found: Error: Can't resolve 'jquery'
Is there a Gradle task that needs to be run beforehand to install the dependencies?Robert Jaros
09/13/2022, 4:36 PMRobert Jaros
09/14/2022, 5:16 PMRobert Jaros
09/17/2022, 12:18 PMPhil Richardson
09/18/2022, 2:39 PMRobert Jaros
09/21/2022, 11:03 AMTomas Kormanak
09/23/2022, 11:36 AMwidth:9px
?
<div class="splitter-vertical" style="width: 9px;"></div>
Tomas Kormanak
09/26/2022, 3:20 PMafterInsert(node:Vnode)
is not called on tab child component.Robert Jaros
09/27/2022, 10:20 AMFormPanel
container?Robert Jaros
10/05/2022, 2:12 PMnapperley
10/09/2022, 2:43 AM> Task :kotlinNpmInstall
warning "workspace-aggregator-2afb5c23-10a3-4138-a06c-97f72d483f6b > kvision-js-ir > css-loader@6.7.1" has unmet peer dependency "webpack@^5.0.0".
warning "workspace-aggregator-2afb5c23-10a3-4138-a06c-97f72d483f6b > kvision-js-ir > style-loader@3.3.1" has unmet peer dependency "webpack@^5.0.0".
warning "workspace-aggregator-2afb5c23-10a3-4138-a06c-97f72d483f6b > kvision-js-ir > imports-loader@4.0.1" has unmet peer dependency "webpack@^5.0.0".
warning "workspace-aggregator-2afb5c23-10a3-4138-a06c-97f72d483f6b > kvision-js-ir > gettext.js > po2json@1.0.0-beta-3" has unmet peer dependency "commander@^6.0.0".
warning "workspace-aggregator-2afb5c23-10a3-4138-a06c-97f72d483f6b > kvision-js-ir > gettext.js > po2json@1.0.0-beta-3" has unmet peer dependency "gettext-parser@2.0.0".
warning "workspace-aggregator-2afb5c23-10a3-4138-a06c-97f72d483f6b > kvision-js-ir > gettext.js > po2json@1.0.0-beta-3" has unmet peer dependency "gettext-to-messageformat@0.3.1".
warning Ignored scripts due to flag.
> Task :frontendGenerateExternalsIntegrated SKIPPED
> Task :kotlinStoreYarnLock UP-TO-DATE
> Task :transformCommonMainDependenciesMetadata
> Task :kspCommonMainKotlinMetadata
> Task :kspKotlinFrontend
> Task :compileKotlinFrontend FAILED
e: .. build/generated/ksp/metadata/commonMain/kotlin/io/kvision/remote/GeneratedKVServiceManager.kt: (9, 51): Unresolved reference: KVServiceManager
e: .. build/generated/ksp/metadata/commonMain/kotlin/io/kvision/remote/GeneratedKVServiceManager.kt: (13, 35): Unresolved reference: KVServiceManager
e: .. build/generated/ksp/metadata/commonMain/kotlin/io/kvision/remote/GeneratedKVServiceManager.kt: (16, 56): Unresolved reference: KVServiceManager
Robert Jaros
10/10/2022, 11:18 AMRobert Jaros
10/23/2022, 1:54 PMadonis
10/24/2022, 10:57 AMAdam S
10/24/2022, 4:12 PMmain.bundle.js:2 You are currently using minified code outside of NODE_ENV === "production". This means that you are running a slower development build of Redux. You can use loose-envify (<https://github.com/zertosh/loose-envify>) for browserify or setting mode to production in webpack (<https://webpack.js.org/concepts/mode/>) to ensure you have the correct code for your production build.
I'm using the Gradle task browserProductionWebpack
, is there a way to set an option to that, so it's only production when I'm building for production?Robert Jaros
11/01/2022, 7:05 PMRobert Jaros
11/07/2022, 4:18 PMRobert Jaros
11/07/2022, 4:18 PM