fulcro

Book: http://book.fulcrologic.com, Community Resources: https://fulcro-community.github.io/, RAD book at http://book.fulcrologic.com/RAD.html
tony.kay 2020-08-31T05:03:53.160900Z

This is correct. The design of RAD is to be DB agnostic, and to represent things as facts that can be found from some source ID. I agree that this is not storage-ideal in some cases. The SQL adapter should be considered a prototype, and is not production ready. You can add addl keys to an attribute to describe how things “should work” for a given attribute, and that could include your own invention for how you might want to model things; however, form-state in fulcro is used for saves, and a given form does have to have something that can represent the ID in an ident. So, if you want to invent composite columns as an ID, you still need to resolve that composite as a single thing, even if it is the string concat of the other things.

tony.kay 2020-08-31T05:07:01.161100Z

Two answers: You can always write a raw pathom resolver for anything. The RAD attribute describes it to RAD…so you can have both. Attributes are just maps. The auto-generator looks for the ::pc/resolve key in order to select which things to include in the list of generated resolvers. Would accept a PR if you think other keys should trigger that. See resolvers.cljc

murtaza52 2020-08-31T17:57:10.161900Z

@tony.kay please check - https://github.com/fulcrologic/fulcro-rad-semantic-ui/pull/7

murtaza52 2020-08-31T17:58:18.162100Z

It is just one commit, however I merged your repo into my fork, and it pulled in all the commits since. So those are also appearing in the pull request.

tony.kay 2020-08-31T18:01:29.162700Z

kind of a mess with a broken merge in it

tony.kay 2020-08-31T18:01:44.162900Z

You’re going to need to clean that up

murtaza52 2020-08-31T18:03:32.163100Z

ok let me try

tony.kay 2020-08-31T18:08:06.163300Z

also, not sure I agree with what you’re trying to do. You can certainly make your own reporting code (copy what I have into your own file) and augment it with whatever features you want and “plug that in” to just your app. Things like “adding action” to an input does not sound right to me, changing implementations of things like decimal field…This PR sort of has a bit too much in terms of “under-designed feature creep and possible breaking changes” for me to be comfortable with it.

tony.kay 2020-08-31T18:09:25.163500Z

I get that you might want to tune buttons to have icons, but perhaps thinking through a wider scope of how to do that is part of the reason I have not done it yet. I don’t want a system that has a “sea of options” where a lake would do 🙂

👍 1
tony.kay 2020-08-31T18:10:12.163700Z

also, a particular plugin (SUI) might use an icon class name, but mobile rendering might need something else. The options at that level might need to be namespacesd to the plugin to make that clear.

murtaza52 2020-08-31T18:10:13.163900Z

I have been doing that only till now, but that results in lot of code duplication, currently I have the whole code duplicated in so many places and want to get away from that.

tony.kay 2020-08-31T18:11:06.164100Z

I’m all up for help, I’m just saying I’m not as open to arbitrary design decisions happening through that help

tony.kay 2020-08-31T18:12:11.164300Z

I’m being purposeful in how slow it is changing, because once you release something that is mis-designed it’s a pain to fix. Whereas, RAD is designed to be user-augmentable, so there is current a “workaround” for these kinds of tweaks

murtaza52 2020-08-31T18:12:17.164500Z

also the form action buttons do allow a class to be specified, so I thought this would make the row action buttons consistent with them.

tony.kay 2020-08-31T18:12:58.164800Z

yeah, it’s possible it’s fine. The other thing we’re dealing with is that I have negative time right now

tony.kay 2020-08-31T18:13:14.165100Z

so, reviewing even a small PR like this is something I can barely afford

tony.kay 2020-08-31T18:13:54.165300Z

This discussion is even over my time limit, sad to say…but I’m doing it because I don’t want you to feel overly discouraged…just want you to know I’m super busy and really don’t have the time

❤️ 1
murtaza52 2020-08-31T18:14:17.165500Z

yup and sorry for the broken merge, for some reason it was not showing up on my editor. no worries I will use my fork for now, and u can review it when u have time

tony.kay 2020-08-31T18:14:18.165700Z

your suggestions might actually be spot-on

murtaza52 2020-08-31T18:14:24.165900Z

appreciate your responses !

tony.kay 2020-08-31T18:14:44.166100Z

sure, thanks for trying to contribute!

roklenarcic 2020-08-31T20:56:02.168800Z

What can you do when you get this in JS console: timbre_support.cljs:80 ERROR [com.fulcrologic.rad.ids:65] - Unsupported ID type :string I have entities that don’t have numerical or UUID IDs…

roklenarcic 2020-09-01T10:43:58.170500Z

This is not a part of DB adapter. It is used only in forms generated will-enter handler to convert ID coming from URL into the native id type. Function is named id-string->id . For :string type this is trivial identity. I’ll provide a PR.

tony.kay 2020-09-01T14:06:32.172Z

sure, sounds fine

roklenarcic 2020-09-01T20:32:46.173300Z

thank you

Tyler Nisonoff 2020-08-31T21:31:48.168900Z

it looks like the three supported types are UUIDs, longs, and ints https://github.com/fulcrologic/fulcro-rad/blob/develop/src/main/com/fulcrologic/rad/ids.cljc#L56 I think you'll need to patch the RAD library if you want something else

tony.kay 2020-08-31T21:33:20.169200Z

You can: 1. fork the db adapter and add support 2. Add an ID column/attribute to the table/entity

tony.kay 2020-08-31T21:34:07.169400Z

I have nothing against alternate ID support, or even multi-column keys. I just don’t personally need it yet, and I’m very busy. RAD is extensible… extend it 😄

tony.kay 2020-08-31T21:35:44.169600Z

I use RAD in the context of “new project that needs to be stood up”, where you have control over db schema, etc. It’s a startup accelerator to me. I’m (personally) not at all interested in legacy integration (not opposed to it, either)

tony.kay 2020-08-31T21:38:03.169800Z

so, contributions are welcome to solve cases that make sense…wider database support, including these kinds of cases, is very welcome, but do not expect me to do it unless I’m getting paid to do so (or need it myself). I’m beyond capacity, unfortunately.