Fork me on GitHub
#fulcro
<
2018-08-13
>
priornix00:08:42

@grant Sure, what kind of project would you be using Antizer for?

grant00:08:02

@priornix I will need to read up more on Ant Design and try to find a good place to try it out. Most likely it'll end up being some sort of basic CRUD app. I may also look at it as a front end for a automated system, providing a dashboard with few override and adjustment controls. Having it already integrated with Fulcro would make it easier to reach for. I enjoy learning new things, but try not to tackle too many at once.

priornix02:08:09

@grant Cool, sounds great. Just let me know if you need any pointers.

baptiste-from-paris10:08:37

Hello friends, is there an online demo of book/bootstrap

baptiste-from-paris10:08:08

I see many of the bootstraps v3 component that I would like to use

wilkerlucio11:08:45

hello man, how you doing? not sure if you saw, I recently made a post with some tips to use ui kits with fulcro, might be helpful: https://medium.com/@wilkerlucio/using-any-react-ui-kit-with-fulcro-82cce271b9cc

baptiste-from-paris11:08:31

I am great thx, and I saw your blog post which is awesome !!! But in this particular case, I must use Boostrap as I am “simply” using a legacy design from my client

baptiste-from-paris11:08:44

But your post will help, for sure

baptiste-from-paris13:08:06

and besides, bootstrap use jquery for some components, It’s probably why Tony Kay rewrote it in a separate namespace

wilkerlucio14:08:31

yeah, can't you use some react bootstrap wrapper? sounds like an easier path

baptiste-from-paris14:08:23

it does exist - not sure of the quality though. Maybe @U0CKQ19AQ has some feedbacks on this one as he made the bootstrap namespace

tony.kay14:08:17

I rewrote most of it, but have not really needed it myself. I’d take PRs on it to improve it, but everything but carousel has an alternative in Fulcro

tony.kay14:08:54

I intend to move it out of the main lib, and either into incubator or it’s own maintenance space. I’d prefer another maintainer take it over

👍 4
baptiste-from-paris15:08:31

by the way, the iframe works like a charm for simulating browser width ! with cards, it’s really awesome

wilkerlucio16:08:47

@U2N9GDB1U I still didn't made a public announcement, but you might enjoy this: https://github.com/nubank/workspaces

tony.kay16:08:25

I sort of tweeted about it though 😉

wilkerlucio16:08:32

haha, no worries, but at least it makes sense that stars were raising, I was a bit surprise of how, now it makes sense 🙂

baptiste-from-paris17:08:23

@U066U8JQJ that’s really awesome ^^

baptiste-from-paris17:08:54

I’ll try it tomorrow

baptiste-from-paris17:08:54

https://fulcrologic.github.io/fulcro-incubator/ sizebutton is suppose to do what ? does not work with chrome

wilkerlucio18:08:53

@U2N9GDB1U it logs to the console the current card size

mattly13:08:12

hi, I'm evaluating Fulcro for a new project, mostly reading through the docs right now, and one thing my project will have heavy need for that I don't see discussed at all in the documentation is, how do I map derived state to UI?

cjmurphy13:08:12

Not sure what 'derived' state is. But it is the queries in the components that in the end are grabbing the data/props that end up in the UI.

mattly13:08:55

by "derived state" I mean, let's say I have a list of things, and I want to display their count. Is there a way to query that without either manually storing that in the app db or computing it in the view?

mattly13:08:35

in re-frame I'd define a subscription as (rf/reg-sub :things/count (fn [db] (count (:things db))) and then subscribe to that

mattly13:08:15

my actual use-cases are quite a bit more involved but these sorts of derived calculations are the bread and butter of the data analysis tool I'm building

cjmurphy13:08:48

You could have another component that has that state in it (the count). Your mutations would have to re-compute it every time if it is derived.

mattly13:08:01

that's what I figured

mattly13:08:18

ok, thanks

cjmurphy13:08:16

Derived values are discussed in the book: http://book.fulcrologic.com/#_derived_values.

mattly13:08:23

that's what I figured

mattly13:08:55

slack doesn't let me paste into the webpage version of the app anymore for some reason

mattly13:08:12

but it's advocating for either storing the result in the app db or doing the computation in the view

mattly13:08:29

in my experience neither approach works well

wilkerlucio14:08:11

@mattly after a lot of fulcro coding, in my experience derived values are better to be defined at your server level, instead of loading data and calculating in the client, you can give that derived value a name (keyword) and just ask for it on the client, this can reduce complexity at your client code considerably

mattly14:08:33

this is an electron app

wilkerlucio14:08:17

that's fine, by server I mean your network layer, even if it's full client side you can still leverage code separation by having a local parser that will do the async operations (like loading data from anywhere)

wilkerlucio14:08:10

for writing the parser I recommend pathom (disclaimer: I'm the author of it): https://github.com/wilkerlucio/pathom

cjmurphy14:08:55

For anyone interested in charting I translated a JavaScript chart/app that uses React Vis into a Fulcro app, and wrote a Medium article on it: https://medium.com/@cjmurphy/using-react-vis-from-clojurescript-787d02281f7c

Josh Horwitz19:08:11

I’m working through the book and when we create (def ui-person (factory Person {:keyfn :person/name})), what is :keyfn doing?

matthavener20:08:13

@joshua.d.horwitz its the fn thats used to generate the key attribute on the child elements for react indexing

Josh Horwitz20:08:15

and there are no :ident, is that no always needed?

wilkerlucio20:08:51

@joshua.d.horwitz it's recommended to have :ident most of the time, without it your component data will not get normalise (this is sometimes desired, but most of time should be avoided as it can lead to data duplication / reduced consistency)

matthavener20:08:02

I’ve always wondered why om.next didn’t default to using the ident when keyfn wasn’t specified

currentoor20:08:55

@matthavener probably because key is very much a react only concern and om.next didn’t want to be too much magic

currentoor20:08:31

but that’s just my guess

cjmurphy22:08:12

What is a good strategy to indicate to the user that "loading..." is going on while :started-callback is occupied? I know you can put the loading indicator on the index.html file itself. But is there a way to bring up a loading indicator without doing this?

cjmurphy22:08:59

I guess I want the 'default UI' to come up, hopefully without resorting to SSR or routing. This is for the simple React Vis demo above. At the moment the user sees nothing in the browser window, and then sees a big chart. I would prefer the user to see my simple loading (dom/div "I am loading") div during the initial moments while the local data is being loaded into app state.

cjmurphy23:08:54

I tried this in the :started-callback and it worked, so this is my solution for now