Fork me on GitHub
#hoplon
<
2016-12-31
>
wasserspiegel01:12:01

Hi, is there a simple way to create a leaf node and add raw html below (markdown output from a cell)? Either is doesn't satisfy some criteria for hoplon nodes or it is transformed into escaped text.

micha01:12:11

you can use the :html attribute, which just wraps the jQuery $(element).html() method

micha01:12:30

(div :html "<h1>hello there</h1>")

micha01:12:40

or alternatively you can do like

wasserspiegel01:12:09

thanks much simpler than I tried

micha01:12:19

(with-let [d (div "ahoy")]
  (add-watch markdown-cell nil #(set! (.-innerHTML d) %4)))

micha01:12:05

that's basically what the :html attr is doing when you do (div :html markdown-cell)

wasserspiegel01:12:37

perfect! I tried to to create a child to a div that fits...

mynomoto02:12:40

Nothing like add some hoplon-cards to see global state flowing into unexpected places (hoplon-cards is the thing cooking after the devcards talk this afternoon). Devcards is amazing but I couldn't find a way to make it reload on changes and the initial hoplon version (without history atm) was very simple to write. https://github.com/mynomoto/github-client/blob/master/hoplon_cards/cards/core.cljs#L49

mynomoto02:12:34

A macro will be needed when the syntax settles but seems to be working nicely so far. Will add history tomorrow if I find the time. If someone has suggestions for organization like how to display cards from different namespaces I would love to hear about it. I'm currently thinking about a page for each namespace or just put everything together, not sure which one I like the most now.

mynomoto02:12:43

I think it will be possible to add those cards in arbitrary places and only generate code based on a goog-define var so it will not generate anything on prod builds.

flyboarder03:12:51

@mynomoto: can you post a screenshot?

thedavidmeister04:12:42

is this https://github.com/tailrecursion/hoplon-template still the best way to get up and running with a new project?

thedavidmeister04:12:01

@mynomoto a page for each namespace makes sense to me

mynomoto10:12:14

Still needs a cool header.

alandipert15:12:16

@thedavidmeister: re template, yes, but we need to pin the dependencies. occasionally it will create a new project that doesn't work 😔

mynomoto15:12:00

@alandipert I think there is a PR open for pinning versions

mynomoto15:12:58

Misleading name though, sorry about that

mynomoto15:12:34

The boot reload problem wasn't real

thedavidmeister16:12:20

happy new year all 🙂

candera17:12:36

Just had a nice moment where I realized that I had been using functions for something, and was going to run into trouble implementing a feature. Switched to using a formula cell instead, and not only was it easy, it opens up a whole new realm of things I can do easily. Problem area in this case was indicating validity of input, where the constraints are a fairly complex chain of interrelated dependencies.

thedavidmeister17:12:02

cells make a great deal of things easy that i used to find very hard, or just tedious

micha19:12:32

^^ let the bikeshedding begin!

micha19:12:53

going to merge it for now and see how we like it

candera19:12:29

@micha I like the formula-of/formulet separation.

micha19:12:01

i wanted to do fn= and let=

micha19:12:06

cause shorter

micha19:12:11

but maybe less clear

candera19:12:17

I meant the fact that it’s two things now, since, you know, it’s two things. 🙂

micha19:12:28

oh right, agree 🙂

candera19:12:23

So, what’s the upgrade story looking like? I’m on hoplon 6.0.0-alpha17. I assume I’ll need to upgrade hoplon to get updated Javelin, once the deps roll in. Am I right about that?

micha19:12:48

you can just add the javelin dependency if you want

micha19:12:56

no breaking changes were made

micha19:12:21

but yeah we will update the transitive dependency next hoplon release too

candera19:12:38

Interesting. I might give that a whirl - the delta includes perf upgrades, yes?

micha19:12:52

you should see some improvements with the performance of the weather map with this release of javelin

candera19:12:09

Let me get the change I’m in the middle of sorted and I will try it and report back.

micha19:12:12

yeah it should be significant, but you never know

mynomoto19:12:15

Also it probably should live under the hoplon organization.