This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-22
Channels
- # aws-lambda (2)
- # beginners (195)
- # boot (47)
- # capetown (14)
- # cljs-dev (7)
- # cljsjs (1)
- # cljsrn (1)
- # clojure (103)
- # clojure-berlin (28)
- # clojure-dev (92)
- # clojure-dusseldorf (3)
- # clojure-finland (2)
- # clojure-germany (3)
- # clojure-italy (4)
- # clojure-russia (37)
- # clojure-spec (104)
- # clojure-uk (52)
- # clojured (2)
- # clojurescript (124)
- # community-development (7)
- # core-async (6)
- # cursive (41)
- # datomic (53)
- # dirac (2)
- # emacs (16)
- # hoplon (5)
- # jobs (3)
- # juxt (12)
- # lein-figwheel (6)
- # leiningen (15)
- # luminus (3)
- # off-topic (49)
- # om (5)
- # onyx (13)
- # overtone (27)
- # re-frame (7)
- # reagent (46)
- # ring (3)
- # ring-swagger (11)
- # spacemacs (2)
- # specter (40)
- # sql (6)
- # untangled (149)
- # vim (14)
Hi! Can someone point out what I’m doing wrong? Trying to add drift to reagent-template and have issue with namespace of generated migration. To not clutter the chat with too much info, tried putting all things here - https://gist.github.com/sudodoki/98b422931a79301ed0f543df29306fb7
@sudodoki what is your source-path? can't you just add src/db_maintenance
to the source paths?
yep, I did exactly that, but when migration is generated its namespace is ns db-maintenance.migrations.20170220210653-create-something
and when I ran lein migrate
it won’t work, but will work if I remove the db-maintenance
from the name. @pesterhazy
ok, seems to have solved that by specifically specifying :source-paths [”src”]
for profile I’m running lein migrate
with 😕
I’m trying to write some JSX to debug a problem I have with some React component, but I don’t get why this is invalid: https://www.dropbox.com/s/arhymeg5jl0echf/Screenshot%202017-02-22%2015.34.23.png?dl=0
It fails on this first: https://www.dropbox.com/s/grysdz9a6itws25/Screenshot%202017-02-22%2015.42.16.png?dl=0
I added a return statement before CellMeasurer and checked the closing parents/brackets
you also can't have normal comments in JSX I think 😕
weird!
Hey all, I’ve noticed that something is checking the validity of style attributes.
[:div {:style {:background-color “goomba”}}] ;; style not rendered
[:div {:style {:background-color “red”}}] ;; style rendered
[:div {:style {:background-image image-url}}] ;; style not rendered
I’ve tried to search but was unsuccessful at finding at what point in the rendering this is stripped. Any pointers? I need to set the background image of a div.Is style
as a map supported? That would be news to me
[:div {:style "background-color: goomba"}]
I’m using 0.6.0 and it seems to require a map. If I try to use a string I get this error.
Uncaught Error: The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX. This DOM node was rendered by `bk3.views.teams_view`.
in react.inc.jshuh. I also use 0.6.0 and I definitely use use strings as the :style
value in my attributes
for image you'll want url("..."): {:background-image (str "url(\"" image-url "\")"}
or well, you can skip " inside the url(...)
I think neither, I think it is the browser that ignores inline styles with invalid values
At least it is not Reagent, but I'm not sure about React
Interesting. Well thanks for the help. I’ve been banging my head against this intermittently for days.
How did you check if the style is rendered? Style tool in Dev tools? Or did you inspect the element?
hmm, just checked and it should show styles with invalid values
It is possible that React sets the inline styles using some DOM API that checks the values, instead of just writing innerHTML and adding style="..."
to the element
Weird. I’m not seeing it on element.getAttribute(‘style’) or in the style property in Chrome.
document.body.style.backgroundImage = "foo";
you can try this, and you can see that the body style is not updated
When React creates a new element, it builds a string with style="..."
(1) but when React updates element, in sets the HTMLElement.style (2)
1) https://github.com/facebook/react/blob/master/src/renderers/dom/stack/client/ReactDOMComponent.js#L719
2) https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style
3) https://github.com/facebook/react/blob/master/src/renderers/dom/stack/client/ReactDOMComponent.js#L1046
4) https://github.com/facebook/react/blob/469e68542b0c12d3c3a8ffbed664bd87fb6eadcf/src/renderers/dom/shared/CSSPropertyOperations.js#L205
and HTMLEelement.style ignores invalid values (at least on Chrome)