Fork me on GitHub
#rum
<
2017-05-04
>
grounded_sage03:05:26

Does anyone know if there is a youtube iframe wrapper for rum? I need to open up youtube video without leaving the page and I'm not sure how to go about it πŸ˜›

martinklepsch03:05:49

@grounded_sage can’t you just render an iframe with rum?

grounded_sage03:05:36

Oh wow. Just looked at youtube and saw how I can use the embed iframe. Looks easy as. I just googled it and ended up on a page with an iframe API and was like whoa. Cheers @martinklepsch for making me dig a little deeper πŸ™‚

grounded_sage04:05:57

Looks like I will need to interop with the API in the end anyways. I need to bring the iframe up and start on click and close the iframe when the video is finished.

martinklepsch04:05:05

ah yeah, that sounds a bit more involved πŸ™‚

grounded_sage07:05:02

What is the best way to do a case with Rum? I'm doing multiple popups and seemed to have backed myself into a corner a bit using atoms.

grounded_sage07:05:21

I'm wanting to refer an atom in one namespace which is passed an icon label which is a string. Then refer to that string in a case in my main namespace and render a component from another namespace which has all the content of that popup.

grounded_sage07:05:50

From memory of reading about Reagent it's best to keep logic outside of the rendering. Like in a let of the component? This seems to stop my popups from working πŸ˜•

grounded_sage07:05:03

(rum/defc pop-up-with-content < rum/reactive[]
    (pop-up [:div {:class [(css {:margin-top "1.5em"
                                 :margin-left "1.5em"
                                 :margin-right "1.5em"})]}
                (case (rum/react popup-content)
                  "Housing" (housing/content)
                  "Airport" "Airport"
                  "default")]))

grounded_sage07:05:08

That is how I have done it at the moment..

gmercer11:05:56

Hi, I am using rum with cljs-react-material-ui.rum and have hit a problem passing data- and aria- attrs I think a change from props-kebab->camel->js to sablono.util/html-to-dom-attrs should fix it (see https://github.com/madvas/cljs-react-material-ui/blob/54360864f174870a0b28335047d5f2195497455f/src/cljs_react_material_ui/core.cljs#L14) Does that seem right?

dmitriid12:05:06

I think πŸ™‚

dmitriid12:05:56

Nope, I’m wrong πŸ™‚ Please ignore me πŸ™‚

gmercer22:05:36

Ended up switching from camel-snake-kebab to sablono https://github.com/madvas/cljs-react-material-ui/pull/32