untangled

NEW CHANNEL: #fulcro
claudiu 2017-02-08T10:24:40.002890Z

@tony.kay did server side rendering also make it in ?

mitchelkuijpers 2017-02-08T10:54:50.002892Z

@tony.kay The ui routing helpers are awesome

mitchelkuijpers 2017-02-08T10:55:17.002893Z

@claudiu Server side rendering was already included from 0.6.1, so it is definately in 0.7.0

tony.kay 2017-02-08T16:28:52.002900Z

@mitchelkuijpers good to hear you're already using them. I plan on getting the form state support from untangled-components documented and polished for a release of that in the coming days.

gardnervickers 2017-02-08T17:00:56.002902Z

Weโ€™re just about to go live with our Untangled application and we wanted to thank the Untangled team for all your help over the last couple months. Weโ€™re compiling/simulating Onyx jobs inside the browser on every keystroke, allowing interactive collaboration on distributed processing jobs. Untangled and Om.next were integral in getting performance right without sacrificing maintainability.

gardnervickers 2017-02-08T17:01:43.002903Z

We have a blog post up with some examples of the UI and a more in-depth explanation of what Untagled has allowed us to do. http://www.onyxplatform.org/jekyll/update/2017/02/08/Pyroclast-Preview-Simulation.html

7
michaeldrogalis 2017-02-08T17:02:05.002905Z

Yeah, cheers everyone. Thereโ€™s no way we could have built this in a sane way on plain React.

baptiste-from-paris 2017-02-08T18:17:44.002911Z

bravo !!!

tony.kay 2017-02-08T18:18:52.002914Z

@gardnervickers @michaeldrogalis @baris @therabidbanana @wilkerlucio @currentoor @mitchelkuijpers I'm about to start an effort around our style kit and component libraries. Right now, you have to use things like blueprintjs for styled react components in Om/Untangled (and accept the subsequent overheads and pains) or write you own. We have built our own (tunable) CSS (untangled-stylekit) and have started the project untangled-components. The latter meaning to be support for pre-styled Untangled-ready components (with queries, mutations, CSS, etc.). Currently we have calendar. I'm asking the community for help building these out. Each component will probably take about 1-2 hours. The CSS is already written, the DOM is already written/documented. Really, it is codifying the DOM into defui with an ident, data model, mutations, and callbacks. (e.g. see https://github.com/untangled-web/untangled-stylekit/blob/master/src/main/cards/styles/objects.cljs for the DOM/CSS that is prewritten in devcards). This and the forms support will make rapid application development with Untangled a true force to reckon with!

1
tony.kay 2017-02-08T18:22:13.002917Z

We're putting together our list of "priority order". We'll be adding issues on that project, and then knock them out. Please let me know if you can space a few hours to do one or more. I'm asking everyone to build them via devcards so we have visual regression abilities and built-in documentation.

tony.kay 2017-02-08T18:34:01.002918Z

oh...and we have an image library with pluggable metadata/image storage, and image clipping.

2017-02-08T18:46:25.002920Z

@tony.kay: I'm happy to help. Actually I'm pretty timed with other stuff, but I'll see what I can do. I'll take a deeper look at the weekend.

tony.kay 2017-02-08T18:47:08.002921Z

sweet. I'm organizing at the moment. I'll try to have enough docs on the develop branch of the project to show the patterns. It should actually be a lot of fun

2017-02-08T18:48:29.002922Z

Yeah, that's sounds awesome. I'm actually gonna try and need to use the form support and also the image lib components

2017-02-08T18:50:11.002923Z

Spent too much time on developing the nested router functionality which you published yesterday...argh could have saved so much time

tony.kay 2017-02-08T18:50:14.002924Z

I'm beefing up forms docs now

tony.kay 2017-02-08T18:50:26.002925Z

sorry it took so long to show routing ๐Ÿ™‚

tony.kay 2017-02-08T18:50:36.002926Z

too many things going on

mitchelkuijpers 2017-02-08T18:51:20.002927Z

@tony.kay Sure I'll make some time, have little now since I am moving

tony.kay 2017-02-08T18:52:07.002928Z

@mitchelkuijpers thanks ๐Ÿ™‚ I'm trying to motivate our staff to start chipping away at these..too much copy-pasting going on at the moment

mitchelkuijpers 2017-02-08T18:53:26.002929Z

Hate that we have other teams who do Elm or Angular and they do the same.. They would never do that on the back end...

tony.kay 2017-02-08T18:53:47.002930Z

I promise to publish snapshots of these in rapid fire.

tony.kay 2017-02-08T18:53:57.002931Z

you're using Elm and Angular AND Untangled??

mitchelkuijpers 2017-02-08T18:54:23.002932Z

Our company we have different teams with different projects

2017-02-08T18:54:52.002933Z

I think we should try to bring a CRUD example in the cookbook with using the new form and image components and also the hole plumbing with the server side and with the classic overview table and detail form for any "entity"

tony.kay 2017-02-08T18:54:54.002934Z

holy moly that's a lot of aggressive UI tinkering...Elm is cool, but wow

tony.kay 2017-02-08T18:55:12.002935Z

@baris love to have that contribution ๐Ÿ™‚

mitchelkuijpers 2017-02-08T18:55:44.002936Z

Angular is so bad for java developers that elm is worth it. Angular is becoming legacy

tony.kay 2017-02-08T18:56:20.002937Z

oh I like Elm...just surprised you talked your company into it AND Om Next

tony.kay 2017-02-08T18:56:36.002938Z

I thought I was pushing it

tony.kay 2017-02-08T18:56:41.002939Z

๐Ÿ˜‰

mitchelkuijpers 2017-02-08T18:56:58.002940Z

Hehe ๐Ÿ˜

mitchelkuijpers 2017-02-08T18:57:11.002941Z

I don't make such cool frameworks

tony.kay 2017-02-08T18:57:29.002942Z

๐Ÿ˜Š

mitchelkuijpers 2017-02-08T18:57:55.002943Z

I would love to use stylekit and then we would need to give it an aui (Atlassian) sauce

mitchelkuijpers 2017-02-08T18:58:25.002944Z

So will keep a close eye

2017-02-08T19:00:19.002945Z

I don't know the benefits of the untangled stylekit need to take a deeper look. I'm using http://bulma.io for styling

tony.kay 2017-02-08T19:01:14.002947Z

@baris We chose to make our own as opposed to using an external CSS framework because we didn't want to target our components and UI on an externally moving target. We have responsive support, grid, flexbox, etc.

tony.kay 2017-02-08T19:01:27.002948Z

was kind of a tough call, actually

tony.kay 2017-02-08T19:01:51.002949Z

but kind of hard to make reusable components without making some kind of concrete CSS decision, since it affects your DOM layout

tony.kay 2017-02-08T19:03:19.002950Z

would also be relatively easy to drop components into untangled components that use other CSS...e.g. a bootstrap package, a bulma package, etc...each with components for those CSS frameworks

tony.kay 2017-02-08T19:03:38.002951Z

might bloat it a bit, but Closure takes care of that

2017-02-08T19:03:59.002952Z

I'm on the go. Talk later and how I can help and contribute to push untangled

tony.kay 2017-02-08T19:04:02.002953Z

k

2017-02-08T19:04:29.002954Z

Different time zone here in Germany :)

tony.kay 2017-02-08T19:04:54.002955Z

Now that I'm thinking of it, we could make some kind of state propertly like :ui/style accept things like :native, :bootstrap, :bulma, etc....separate the interface/model from the rendering, then plug in alternate renderings for each component.

tony.kay 2017-02-08T19:05:27.002957Z

anyway...downstream

2017-02-08T19:05:32.002958Z

That was something I already thought about

wilkerlucio 2017-02-08T19:06:48.002959Z

cool, I think I can tackle some components over the weekend too, I guess we can keep using this room for coordinating it ๐Ÿ™‚

tony.kay 2017-02-08T19:07:21.002960Z

absolutely. Thanks! I'll do one like button today, to establish the pattern

tony.kay 2017-02-08T19:07:50.002961Z

we can use github issues and PRs to coordinate consistency

wilkerlucio 2017-02-08T19:19:29.002963Z

@tony.kay I was just looking at https://github.com/untangled-web/untangled-stylekit/blob/master/src/main/cards/styles/objects.cljs, can I suggest we start using indentation with 2 spaces as default and make it the standard? having it on the second argument makes it to use a lot of space very quickly, what you think?

tony.kay 2017-02-08T19:31:54.002969Z

Unfortunately, that is the default formatting Cursive does, unless you manually edit the setting for every dom function

tony.kay 2017-02-08T19:32:05.002970Z

and everyone here uses Cursive

tony.kay 2017-02-08T19:32:25.002971Z

but I completely agree with you, and on my own machine usually go through the effort of setting it

tony.kay 2017-02-08T19:37:00.002972Z

looks like cursive has a setting for it ๐Ÿ™‚

tony.kay 2017-02-08T19:37:03.002973Z

just found it

tony.kay 2017-02-08T19:37:09.002974Z

Default to Only Indent

2017-02-08T19:38:39.002975Z

I'll have to take a look to see what exactly is involved with building out components, but should be able pitch in a bit.

tony.kay 2017-02-08T19:41:33.002976Z

@therabidbanana @wilkerlucio @baris @mitchelkuijpers This video is basically what I'm thinking. Shows doing it for a bootstrap menu: https://www.youtube.com/watch?v=uxI2XVgdDBU&feature=youtu.be

wilkerlucio 2017-02-08T19:51:30.002978Z

@tony.kay cool, I'll check on the video later, about the ident, we can have the wiki with guidelines, I believe just by having the code in a certain format will already drive people to follow, for the ones unaware we can point out on pull requests, do you agree that its better than having a bad indentation just for editor configuration convenience?

claudiu 2017-02-08T20:21:23.002979Z

@tony.kay Have you dropped the idea of co-located css from om-css ?

tony.kay 2017-02-08T21:58:10.002980Z

On untangled components: I'm wondering what opinion people have of the standard way to make reusable components that have queries and need om/computed and additional out-of-band parameters. You'll want to compose the component's query into your own, and then for example, say you want to render a button and we supply ui-button React factory. We might want to take onClick as an additional named-parameter: (ui-button (:my-button props) :onClick do-thing) => converted into a factory call with om/computed on the callback bit But then you might also want to add additional top-level attributes (like css classes and such): (ui-button { :className "boo" :onClick do-thing } (:my-button props)) which takes the first arg and turns it into js props and om/computed things Or should we just make you specify things like style additions as part of the app-state that is part of the component's internal query, and just have you use om/computed manually? (ui-button (om/computed props {:onClick do-thing}))?

tony.kay 2017-02-08T22:00:24.002981Z

e.g. the style would be in the state and you'd query for it: (defui Button ... (query [this] [:button/style ...]))

tony.kay 2017-02-08T22:01:10.002982Z

then have a "button state" constructor that can be used in InitialAppState (make-button :style :big :left-icon :left-arrow)

tony.kay 2017-02-08T22:02:48.002983Z

Oh, and then i18n.

tony.kay 2017-02-08T22:09:29.002984Z

for example, if you do (make-button :label "Boo") and then in the rendering do (dom/span nil (tr-unsafe label)) you will miss the extraction

tony.kay 2017-02-08T22:10:15.002985Z

but if you do (make-button :label (tr "Boo")) you'll get the extraction, but at runtime if you started out with an alternate locale the key will be wrong at the tr-unsafe.

tony.kay 2017-02-08T22:11:11.002987Z

We added tr-lambda as an attempt to deal with this, but the renderer needs to know that it is getting a function, not a string.

tony.kay 2017-02-08T22:12:46.002988Z

(make-button :label (trlambda "Boo")) must be rendered in the component as (dom/span nil (label))

tony.kay 2017-02-08T22:14:41.002989Z

I guess we could support both? Something like :label means literal string, and :labeller means a function that returns the label?

tony.kay 2017-02-08T22:14:54.002990Z

that way the non-i18n user doesn't have to think about it

tony.kay 2017-02-08T22:16:08.002991Z

We could also do the very first version (make-button :label "Boo"), always call tr-unsafe on the internals of the component, and let them know that to get string extraction they should write some throw-away function somewhere that is never called that simply calls tr on all the labels they'd like extracted.

tony.kay 2017-02-08T22:16:53.002992Z

or we could make a tr-extract that is identity, but can be used to ensure string extraction happens: (make-button :label (tr-extract "Boo"))

tony.kay 2017-02-08T22:17:20.002993Z

I think I like :labeller best personally

tony.kay 2017-02-08T22:27:56.002994Z

oh wait...forgot..cannot put functions in app state

baptiste-from-paris 2017-02-08T22:28:40.002995Z

@tony.kay have trouble using untangled-stylekit

baptiste-from-paris 2017-02-08T22:29:02.002996Z

Iโ€™ve cloned the repo, and done the npm/gulp setup

tony.kay 2017-02-08T22:29:12.002997Z

I'm working on the components project to just have the css there already...let me push on develop...

tony.kay 2017-02-08T22:29:28.002998Z

oh, and make sure you're using the develop branch(s)

baptiste-from-paris 2017-02-08T22:29:52.002999Z

I am

baptiste-from-paris 2017-02-08T22:30:00.003Z

its a react error =>

tony.kay 2017-02-08T22:30:15.003001Z

I restructured the untangled-components to have two builds: guide and visuals

baptiste-from-paris 2017-02-08T22:30:16.003002Z

React.createElement(...): Expected props argument to be a plain object. Properties defined in its prototype chain will be ignored`

tony.kay 2017-02-08T22:30:54.003003Z

one of our devs is working (actively) on stylekit...he may have pushed something broken (hope not, but possible)

baptiste-from-paris 2017-02-08T22:31:35.003004Z

ahah, no problem, thatโ€™s awesome of you to open-source it !

tony.kay 2017-02-08T22:32:55.003005Z

stylekit is currently not externally polished. So, I don't recommend using it just yet. Give us a couple more weeks of getting components going full-steam, and the docs/tools ramped up on the style kit

baptiste-from-paris 2017-02-08T22:34:07.003006Z

so the main goal is to provide basic components to be easily usable right ?