untangled

NEW CHANNEL: #fulcro
mahinshaw 2016-08-09T00:03:36.000341Z

Your handler needs to return a valid response map. ie {:status 200 :headers {} :body content}

cjmurphy 2016-08-09T07:07:23.000342Z

I'm still not there yet. The browser assumes the user wants to download a file, presumably because the content type is not known.

2016-08-09T14:45:21.000345Z

Even if you set a content type in the headers @cjmurphy ? We explicitly set content types via the headers hash for all of our non-untangled route handlers.

mahinshaw 2016-08-09T15:24:26.000346Z

Sorry, I was being a little general. You definitely want to set the content type to “text/html”.

2016-08-09T18:12:10.000347Z

I came across the article today about how CircleCi mounts all their local state in the global app state. Is anyone currently doing this with om next (or is there a simpler solution even)? https://circleci.com/blog/local-state-global-concerns/

adambros 2016-08-09T20:46:49.000352Z

@kenbier: sounds like prefixing query fragments with :ui/* in untangled so they dont go to the server

cjmurphy 2016-08-09T22:25:08.000353Z

@therabidbanana, @mahinshaw: Thanks guys - but could someone tell me exactly how to set the content type to "text/html" via :headers. I might try :headers {:content-type "text/html"}, but it would probably be wrong. (unfortunately I can't try things out as I type here).

mahinshaw 2016-08-09T22:26:43.000355Z

:headers {"Content-Type" "text/html”} is what you want

cjmurphy 2016-08-09T22:28:40.000357Z

Thanks @mahinshaw - I'm not an experienced web programmer so need to go from examples.

mahinshaw 2016-08-09T22:28:54.000358Z

No problem

2016-08-09T22:32:14.000359Z

@adambros: we do use that in some places. though we want to reset those fields when the component unmounts. i.e. open a modal and enter some text, then submit. next time you open the modal the fields should be some default value, not your last input.

2016-08-09T22:32:46.000361Z

it breaks initial state

2016-08-09T22:33:44.000362Z

i suppose i could remove them in the unmount lifecycle method, but that seems like a bit too much cleanup code to write.