Everything about Slinky -- issues, ideas for features, where it's being used, and more
shadaj on master
Add dependency on Java IntelliJ… (compare)
shadaj on master
Add Java IntelliJ plugin as a d… (compare)
shadaj on master
Increase detail of IntelliJ plu… (compare)
shadaj on master
Update sbt to 1.4.6 (#457) (compare)
shadaj on master
Update IntelliJ plugin vendor w… (compare)
shadaj on master
Adjust IntelliJ plugin name bas… (compare)
shadaj on master
Package IntelliJ plugin twice t… (compare)
shadaj on master
Fix version of IntelliJ SDK tha… (compare)
shadaj on master
Add missing until-build propert… (compare)
shadaj on master
Add IntelliJ plugin repo token … (compare)
shadaj on master
Set up IntelliJ support to be p… (compare)
shadaj on intellij-standalone-plugin
Set up IntelliJ support to be p… (compare)
module.exports = {
module: {
rules: [
{ test: new RegExp("\\.css$"), use: ["style-loader", "css-loader"] },
{ test: new RegExp("\\.(svg|png|jpg|gif)$"), use: "file-loader" }
]
}
}
small bug in documentation ( https://slinky.dev/docs/the-tag-api/ )?
input(onChange := (event) => {
println("the value of this input element was changed!")
})
does not work - this works:
input(onChange := (event => {
println(s"the value of this input element was changed!")
}))
Only difference are the parentheses.
onKeyPress
working? Looks like it never gets called.If you change your element to input
, it works fine (unless the element has focus, it won't receive any key events):
input(
onClick:= (_ => println(s"MOUSE")),
onKeyPress:= (_ => println(s"KEYBOARD"))
)
Also, onKeyPress
is deprecated (but works), so you should be using onKeyDown
(https://developer.mozilla.org/en-US/docs/Web/API/Document/keypress_event)
Is there any example for functional components depending on generic types? apparently, def component[D] = FuncionalComponent[Props[D]] {...}
is not enough
@react must annotate:
[error] - a class that extends (Stateless)Component,
[error] - an object that extends ExternalComponent(WithAttributes)(WithRefType)
[error] - an object defining a `val component = FunctionalComponent(...)`
[error] @react class RemoteDataLoaderComponent {
I have tried some variations without luck
trait RemoteDataLoaderBase[D] {
case class Props(fetcher: () => Future[D], render: D => ReactElement)
val theComponent: FunctionalComponent[Props] = FunctionalComponent[Props] { ...}
}
@react object MyProductsSummaryLoader extends RemoteDataLoaderBase[GetTrackedProductsResponse] {
val component = theComponent
}
def forceRefresh() = {
val (_, increment) = Hooks.useReducer[Int, Int](_ + _, 0)
() => increment(1)
}
Hooks.setEffect(..., "")
, which prevents the effect from running multiple times, unfortunately, I have no idea how to force such effect to run again without getting in executed indefinitely
Anyway, I ended up writing this: https://github.com/wiringbits/cazadescuentos/blob/master/lib/ui/src/main/scala/net/wiringbits/cazadescuentos/ui/components/RemoteDataLoaderBase.scala
I'm not 100% happy with the solution but it works, thanks for the help
import Modeler from 'bpmn-js/lib/Modeler';
const modeler = new Modeler({
container: $modelerContainer,
moddleExtensions: {
custom: customModdleExtension
},
keyboard: {
bindTo: document.body
}
});
type mismatch;
found : slinky.core.AttrPair[slinky.web.html._aria_attr.type]
required: slinky.core.TagMod[slinky.web.svg.svg.tag.type]