Fork me on GitHub
#fulcro
<
2017-09-26
>
roklenarcic08:09:46

Hm I'm getting this warning Subelements of union fulcro.ui.bootstrap3/NavItemUnion have initial state, but the union itself has no initial state. Your app state may suffer. and I have noticed that one of my idents isn't being honored/used.

roklenarcic08:09:51

which is weird as subelements of the NavItemUnion don't have any inital state defined.

roklenarcic09:09:59

Does anyone have any tips on how to debug why ident declaration is being ignored (the ident fn is called, but the resulting tree doesn't have an entry for ident).

rastandy10:09:25

Excuse me, if I start a project by cloning fulcro-template, am I obliged to us the same copyright?

rastandy10:09:34

I would like to start from that template and try to merge and adapt my company code, which can’t be released with the same license.

rastandy12:09:00

@tony.kay sorry I should direct my previous message to you

claudiu13:09:19

@rastandy Don't know it helps, but there's also the fulcro-lein template that has a different license 🙂

rastandy14:09:34

@claudiu thank you for pointing that

azeem14:09:10

is it possible to do server side rendering when using react ui libraries like semantic-ui-react from cljsjs?

rastandy14:09:13

@azeem I’m having trouble doing client side rendering with fulcro and semantic-ui-react

rastandy14:09:30

with basic components like Button or Dropdown

rastandy14:09:40

@azeem well, solved in realtime 🙂

claudiu14:09:20

@azeem if its not a problem tha react will ignore and mount full app, you could just have a interface around the lib and generate the html with render conditionals

azeem14:09:45

@claudiu so use render conditionals to render some kind of stubs for semantic-ui components on server side and then mount the real component only after you get to client side?

claudiu14:09:31

Well react will do that for you since the dom diffs will not add up :)

claudiu14:09:44

Something like (defn my-ui-button) for cljs it's semantic ui for clj you give it the html. A bit of a chore but thats what I will try for my project since I only need material inputs

azeem15:09:27

@rastandy i've had pretty good success with semantic-ui from cljsjs in client. had to write some wrappers to fetch the components from the js variable.

rastandy15:09:35

yeah I used the wrong wrapper, one designed to be used with reagent

rastandy15:09:42

now I’m on the right track again

azeem15:09:02

@claudiu that makes sense.. if i use semantic-ui components extensively.. like Grid, Form etc. lot of the markup from the server will all be stubs. which would kind of defeat the point of having SSR wouldn't it?

tony.kay16:09:31

@roklenarcic Did you solve that ident issue? The warning could possibly be wrong, I’d have to look. However, unions in general are a well-tested Om Next feature. So chances are you wrote something incorrectly. In general you want to union to have the ident function, but there are reasons to have ident on the children of the union as well (e.g. you merge state with load using only that child…it won’t know the ident).

roklenarcic14:09:44

The unions and idents aren't mine, they are generated by fulcro.bootstrap nav functionality.

tony.kay16:09:11

@rastandy My intention (and understanding) with the MIT license is that you credit Fulcro, but from there can do whatever you want. My understanding of that is that you include the copyright notice of Fulcro in your project, but you can make your own proprietary (even closed source) derivatives from there. You’d have to contact a lawyer from there, but I can tell you that my intention is to be as open with it as possible while still maintaining visibility.

tony.kay16:09:09

In any case, just using Fulcro exposes you to the MIT license because all cljs code you pull in as deps “infect” you with their license. You are using their source as part of your project. Well, and use of any of them typically does the same.

tony.kay16:09:44

@azeem I’ve been working on the SSR for js components using this basic approach: http://winterbe.com/posts/2015/02/16/isomorphic-react-webapps-on-the-jvm/ Unfortunately, I have not gotten Nashorn to take the generated javascript yet. If I use minimal optimizations I get a multiple definition error that I can’t seem to get it to ignore, and if I use more advanced optimizations it complains that React is not found…and I have not figured out how to get a good stack trace with source maps to narrow it down yet. In principle, I would think we should be able to get SSR this way that is completely functional.

tony.kay16:09:23

if anyone wanted to play more with it I can push my branch. I’m working on something else at the moment.

rastandy16:09:35

@tony.kay Thank you very much for your clarification, I was puzzled by the sentence: “The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.”

tony.kay16:09:25

A lot of licenses technically require you to do something like that.

rastandy16:09:43

@tony.kay My non-lawyered mind would suggest that everything derived from that code must have the same permissions

azeem16:09:09

@tony.kay that sounds interesting. glad to know there’s some hope.. would you mind sharing your code. i’d like to play around with it

tony.kay16:09:28

@rastandy My understanding is that you just have to include the license as it applies the the external source you’re using. So, if you copied a file into your source, you’d want to add the MIT license as a comment to the top of that file.

rastandy16:09:41

@tony.kay I must run to take my train, but I’ll read carefully and try to understand that better. By the way, as always, thank you very much for your work, it’s very helpful!

tony.kay16:09:13

@azeem Just pushed “nashorn” branch of fulcro-template. 1. client-main has been changed to define a function that should be able to render to a string (instead of mount) 2. server.clj has a (comment) section where I was doing REPL runs to try it out. look for nashorn-render So, just run something like lein with-profile production cljsbuild auto production (MAKE SURE YOU USE THE PROFILE) Then you should be able to start a clj REPL and hammer against it.

tony.kay16:09:34

@rastandy Thanks, and you’re welcome 🙂

azeem16:09:27

@tony.kay awesome!! thank you

tony.kay16:09:39

welcome, I hope you see something I didn’t 🙂

tony.kay16:09:40

@azeem You might try playing with the client main in a browser first, just to see if the server render works there. Like in the dev console.

tony.kay16:09:50

I don’t think I tried that.

tony.kay16:09:40

Got stuck trying to solve the Nashorn errors that seemed unrelated. It won’t even load the source, so I wasn’t worried if it ran right yet.

wilkerlucio19:09:33

hello people, I'm happy to announce pathom beta-8 is released! this is a major release, now with a plugin support to enable parser extension, with the support pathom also provides some built-in plugins for: error catching, query profile and request caching. The documentation has been mostly re-writen, I hope it's cleaner and more to the point now. Pathom still growing and any feedback is very welcome, thanks 🙂 https://github.com/wilkerlucio/pathom/