Fork me on GitHub
#untangled
<
2016-10-17
>
tony.kay04:10:49

If anyone is interested, we’ve started working on Untangled Components. A library of reusable components. Right now it mostly contains some half-baked ideas, but I’m in the midst of adding some nifty CRUD form support (with remote integration) that already makes form stuff pretty dreamy. My first sample is running in a devcard on the project. Here is the PR (which will get added to as I go): https://github.com/untangled-web/untangled-components/pull/2

tony.kay04:10:58

Given that it doesn’t define the UI for you (just all of the madness around controlling the form interactions), I’m strongly tempted to make it part of core untangled client.

baris08:10:15

That’s pretty cool and the right direction for RAD

baris08:10:03

Thanks a lot @tony.kay! We hope, we can start in the end of this year our first untangled project….u guys are doing an amazing job.

ethangracer13:10:49

@tony.kay looks awesome! I really like the idea of composable form elements, given how often we use them. @paul4nandez also built a filtered-list component in insight that you might want to take a look at. It has been very handy for searches

mping14:10:07

@tony.kay hi there, is there a place with untangled boilerplates? I’d love to migrate some apps I have with angular, but I’m finding it hard to start. Specifically would love a oauth2 universal app boilerplate

fatihict14:10:25

I get a 404 when I try to access this URL: http://untangled-web.github.io/.. I think that used to work. I can still access the site with this URL: http://untangled-web.github.io/untangled/

ethangracer14:10:54

@fatihict Only the later is a valid site, I don’t believe we have any redirects in place, or if we even can given its hosted by github

ethangracer14:10:02

but that’s an area I know very little about!

mitchelkuijpers15:10:38

@tony.kay I absolutely love the new untangled.client.data-fetch/load combined with the target option. But on thing I am missing is to get some context in the post mutation (for example the :target or the given params). Is that by design or is that just something you never seem to need?

tony.kay15:10:55

@mitchelkuijpers if you look in the new form stuff I just mentioned, I have a FIXME to add post mutation parameters to U.C. 😄

tony.kay15:10:15

it is certainly needed...just have not needed it personally yet. Fortunately, it is easy to add

tony.kay15:10:17

probably later today

mitchelkuijpers15:10:44

Btw, now that I got you here

mitchelkuijpers15:10:07

I will be giving a Untangled presentation at the Amsterdam clojure meetup group

tony.kay15:10:32

@mping no oauth one yet. On the horizon. http://github.com/awkay/untangled-template-workspace is as far as I've gotten on a good template.

tony.kay15:10:48

which is pretty far, but no auth yet

tony.kay15:10:03

we're using oauth, so it is definitely going to be part of what we show how to do

tony.kay15:10:16

@mitchelkuijpers That's great! Anything I can help with?

mitchelkuijpers15:10:49

Yeah I will probably rip of some of your presentations

tony.kay15:10:00

glad to provide my slides if I haven't already

tony.kay15:10:07

they're all on google docs

mitchelkuijpers15:10:14

Ah cool I will look for them

mitchelkuijpers15:10:31

I want to do some live coding. To show the power of untangled 😄

mitchelkuijpers15:10:50

There was pretty much no one who knew untangled which was interesting

tony.kay15:10:50

just a min, I'll send you a share

mitchelkuijpers15:10:29

I’ll probaby put them on the untangled tutorial

mitchelkuijpers15:10:36

should be a good test 😉

mitchelkuijpers15:10:36

I think I am going for a short presentation and then get to work (they will learn more from the tutorial then from a presentation)

tony.kay15:10:20

sure. good rule though is to keep it to simple things that everyone can follow easily....which is a little hard with Om to start because of the dramatically different model

mitchelkuijpers15:10:37

Yeah I might start with a small database

mitchelkuijpers15:10:57

Will be a bit of a challenge

tony.kay15:10:33

There's a lot of minutia to get in the way of the fact that it's actually simple 🙂 E.g. query syntax

tony.kay15:10:41

tree composition

tony.kay15:10:13

good luck! I'll be excited to see the result. Record it if you can (at least with QT screen recording)

mitchelkuijpers15:10:21

Thank you it will be recorded

mitchelkuijpers15:10:32

there will even be a live recording 😉

mitchelkuijpers15:10:37

I’ll keep you posted

gardnervickers15:10:47

Hey folks, does anyone have any advice for setting up the Untangled Server to always serve the Untangled App for every request? I tried putting an entry in :extra-routes for [true :index] but that’s not working correctly.

mping15:10:43

@tony.kay starred, maybe I can contribute, although I’m not that well versed in clj

mping15:10:00

I have a couple of apps running with friend/oauth, shouldn’t be hard to port it

mping15:10:21

although the way I’m doing it is with a completely protected url under oauth (say, /authenticated/…), its "server-side" oauth

adambros16:10:49

@gardnervickers you should try something like [“” {true :index}]

gardnervickers16:10:29

@adambros Thanks, I had made a false assumption about the bidi syntax.

tony.kay16:10:36

@adambros are extra routes in front of /api?

adambros16:10:11

also in front of /index

tony.kay16:10:18

@mping That'd be great. Like I said, we've already done quite a bit of work there...just need to get it into something on the OSS codebase

tony.kay16:10:35

@adambros won't your suggestion break api then?

adambros16:10:51

ah yeah it would

tony.kay16:10:12

might be something we should change....extra routes should not be in front of API service

adambros16:10:22

you might be able to get away with a regex

tony.kay16:10:38

a prehook might be better for @gardnervickers problem

adambros16:10:53

[“” {#”^[/api]” :handler}] ish

tony.kay16:10:53

but a regex, if supported well, would also work

tony.kay16:10:08

I don't know bidi well 🙂

adambros16:10:45

@gardnervickers what is your use case for wanting everything to :index?

adambros16:10:12

oh like a single page app?

tony.kay16:10:22

Yep...think about hitting refresh in browser

adambros16:10:33

isnt this what hash fragment routes are for?

tony.kay16:10:40

the URI says boo/bah/blah

tony.kay16:10:50

and your server says NOPE

tony.kay16:10:40

@adambros If you're using fragments, you're ok, but if you're using URI paths, it isn't

adambros16:10:26

well anyway i think extra-routes should at least be “in front of” /index

adambros16:10:46

i could see someone wanting to change the location of /api as well

tony.kay16:10:56

it's probably ok for it to be in front front as long as regex works

gardnervickers16:10:02

Hash fragments probably make more sense for our app anyway. Thanks

adambros16:10:52

as a note this regex seems to do it: #"^(?!api$).*”

jasonjckn18:10:49

(defn- auth-middleware [ring-handler]
  (-> ring-handler

      (wrap-bidi-routes ["/" {#"^history.*" {:get redirect-to-index}
                              #"^(?!api|static|generated|history).*$" {:get index-page}}])

jasonjckn18:10:59

(defrecord Authentication [handler]

  component/Lifecycle
  (start [this]
    (add-ring-middleware! handler auth-middleware)
    this)
  (stop [this] this))

jasonjckn18:10:30

(defn make-system []
  (make-untangled-server
....
   :components {
                :auth-hook (auth/make-authentication)
....
      )

jdunruh18:10:57

I am trying to start a server from untangled-template-workspace, and failing. I get the user prompt, but when I type (go), I get a compiler exception saying ago is not found. any idea what I am doing wrong?

tony.kay19:10:36

@jdunruh could be I forgot to put you in the correct namespace....`(user/go)` ?

tony.kay19:10:54

Hm. works for me.

tony.kay19:10:59

λ lein run -m clojure.main
16-10-17 19:09:20 Tony-Kays-MacBook-Pro.local INFO [template.api.read:7] - Loading API definitions for template.api.read
Clojure 1.8.0
user=> (go)
16-10-17 19:09:27 Tony-Kays-MacBook-Pro.local INFO [untangled.server.impl.components.handler:180] - Creating web server handler.
16-10-17 19:09:27 Tony-Kays-MacBook-Pro.local INFO [untangled.server.impl.components.web-server:18] - Web server started successfully. With options: {:port 3000}
#<SystemMap>

jdunruh19:10:45

nope can’t find user/go either. I don’t see username space in the server sources for this project.

tony.kay19:10:55

in dev folder

tony.kay19:10:21

don't want those in production...so only on source path when in developer mode

tony.kay19:10:31

if you're not using lein, perhaps you forgot that source path

jdunruh19:10:58

I’m using intellij, the docs say to use a clojure.main repl, which is what I did. I switch to a lein configuration and it found go. the client is failing to load a resource which is the javascript for the client. there must be a configuration problem I will investigate.

jdunruh19:10:31

I am converting application I started with om.next. I have this a client working with file server, and I’m trying to convert the server as well as updating the file structure to look more like your standard set up.space So far like what I see.

jdunruh19:10:25

I just me at index-dev instead of index. It appears to be working now. Thanks