hoplon

The :hoplon: ClojureScript Web Framework - http://hoplon.io/
2019-10-21T19:42:37.010700Z

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.

flyboarder 2019-10-21T19:42:56.011Z

@dmarjenburgh what issues have you run into?

flyboarder 2019-10-21T19:43:16.011500Z

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

2019-10-21T19:53:49.014Z

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).

flyboarder 2019-10-21T19:54:44.014900Z

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

2019-10-21T19:56:31.016500Z

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))

2019-10-21T19:57:36.017400Z

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

flyboarder 2019-10-21T19:57:41.017600Z

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

flyboarder 2019-10-21T19:58:00.018Z

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

2019-10-21T19:58:56.018400Z

Same error

2019-10-21T19:59:11.018900Z

The event type passed to events/listen will be nil

2019-10-21T19:59:40.019400Z

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

flyboarder 2019-10-21T20:00:22.019900Z

looks like we might need to uppercase the event name

flyboarder 2019-10-21T20:00:35.020300Z

click is there for sure 🙂

2019-10-21T20:04:09.021600Z

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

flyboarder 2019-10-21T20:04:32.021900Z

PR is welcome 🙂

2019-10-21T20:05:41.022700Z

Sure.

flyboarder 2019-10-21T21:15:45.023100Z

@dmarjenburgh ^ patched in master

1