Fork me on GitHub
#hoplon
<
2019-10-21
>
dmarjenburgh19:10:37

Hey all. I’m looking into hoplon lately and really like the concept and design of the library. It’s not very active and I encountered a few bugs trying to get it to work with the latest version on master. I want to contribute, but not sure what the best tasks are to pick up atm. Any help to get started on the development is appreciated.

flyboarder19:10:56

@dmarjenburgh what issues have you run into?

flyboarder19:10:16

Hoplon itself is very stable, though we have a few things we could improve

dmarjenburgh19:10:49

I created the TodoMVC app as a tryout. I don’t want to depend on jquery, so I was trying hoplon goog and vanilla (no providers). The hoplon.goog attr providers gave throwing errors (in the latest repository version).

flyboarder19:10:44

@dmarjenburgh ok, what issues are you encountering with goog? I can help get those fixed

dmarjenburgh19:10:31

For example

(defmethod on! :hoplon.core/default
  [elem event callback]
  (let [event (obj/get events/EventType (name event))]
    (events/listen elem event callback)))
This doesn’t work, with elements defined as (h/button {:click (fn [e] ...)}), since “click” is not in the events/EventType obj. This should probably just be:
(defmethod on! :hoplon.core/default
  [elem event callback]
  (events/listen elem (name event) callback))

dmarjenburgh19:10:36

I also got some others, though I’d have to try to reproduce those.

flyboarder19:10:41

@dmarjenburgh what happens when you dont include :click as part of the map?

flyboarder19:10:00

ie. (h/button :click #(...))

dmarjenburgh19:10:11

The event type passed to events/listen will be nil

dmarjenburgh19:10:40

I can also help fix things by the way, or write some test cases

flyboarder20:10:22

looks like we might need to uppercase the event name

flyboarder20:10:35

click is there for sure 🙂

dmarjenburgh20:10:09

Yeah, uppercasing works. You could uppercase it in the method: (obj/get events/EventType (.toUpperCase (name event)))

flyboarder20:10:32

PR is welcome 🙂

flyboarder21:10:45

@dmarjenburgh ^ patched in master

4