Fork me on GitHub

RAD Update: I’ve finished the expansion for reports that I was using for statistical reports. I found the generalization I was looking for. The demo (master) has been updated, and I’ve released new versions of all of the libraries. The generalization was this: • Allow the resolvers on reports to return a denormalized result (row query inclusions can also be used to augment what you get). The option denormalize? allows you to tell the report itself that it should not try to normalize the values • Added a raw-result-xform option. This option is required if your network result isn’t in standard row format. It is a function that can morph the result to the correct form and can also generate arbitrary values on each row. The columns option supports columns that are not full-stack (Pathom simply need not reply to them). This allows you a place to build virtual columns at load time. • Added a rotate? option, which is a hint to the UI layer that you’d like to show the report with the first column used as headings. The SUI rendering of rotate isn’t great at the moment (glad for a PR that cleans that up), but it works correctly. You can still sort/filter/paginate rotated results, since it is just a rendering of the rows. The real report implementation treats the data in stages for performance. The load generates a raw result (which is stored on in state). The raw result xform, if supplied, is used to rewrite that value just after load. Filtering/sorting/pagination all happen in stages that are cached (I’ve described this optimization before). So, this release mainly gives you these abilities: • Better support for “statistical” reports, where you’d like to roll up data on the server. Accepting denormalized data can be useful in making efficient Pathom resolvers to help with that, as is shown in the demo. • Now able to easily generate virtual columns that are calculated on report load in the client. • Tables can be rotated to make the normal column heading row headings instead, and use the first column as the tables headings.

❤️ 16
🆒 4
fulcro 4
aw_yeah 4
michael zhou03:05:10

hello, will rad and rad-demo support international multilingualism?

Jakub Holý (HolyJak)16:05:36

What do you need? Other than left to right direction of text? Or some kind of localization of text? Fulcro only gets you data into components, how you render them is up to you?!


@U3GA4EXA9 so, RAD will be using fulcro-i18n, which you can use in any Fulcro app. I have not had the time to go through and make sure all the things are properly in place, and have not made the demo use it, but it does “support it”


This allows for easy string localization. Date/time support is already integrated with IANA timezone support.


numerics are full-stack big decimal, but currency formatting will depend a bit on what formatter you use for messages.

Jakub Holý (HolyJak)18:05:39

❤️ I love "The ability to write UI strings in a default language/locale in the code. These are the defaults that are shown on the UI if no translation is available." - it makes it so much easier to find where a piece of UI comes from in the source code!


yep. it’s been a while since I’ve needed to write i18n code, but made-up keys to stand in for messages is just another nail in the coffin of team productivity

💯 4
michael zhou00:05:38

Thanks,will try fulcro-i18n


Hello, are there any todomvc type examples using the inline css with garden? Attempting to use, however the css does seem to be injecting in from the garden css.


@sec338 make sure to look at all of the docstrings in the injection ns of fulcro-g-c


you’re probably missing some arguments to the injection


thanks, will take a look


are there any recommendations for managing fe configuration? just use closure defines via shadow or what?

Chris O’Donnell21:05:52

That's what I usually do.

👍 4

I get the following error when I run the parser function -

{[#uuid "5eb40c62-28f8-4b72-b82a-d369651c87c8"] nil,
 {[[#uuid "5eb40c62-28f8-4b72-b82a-d369651c87c8"]]
                                "java.util.UUID cannot be cast to clojure.lang.Named",
                                :data {}}}}}
Where should I start looking for bugs, what is the above error point to ?


This si the resolver I have -

(defresolver farm-season [env {:keys [:farm/id :farm-season/year]}]
  {::pc/output [{:farm-season mfs/ks}]
   ::pc/input #{:farm/id :farm-season/year}}
  {:farm-season (dfs/get-farm-season id year)})


(parser {} `[{(~farm-edge {:pathom/context {:farm-season/year 2020}}) ~efs/farm-season}])


somewhere in your code you’re calling name on something that turns out to be a UUID


just guessing get-farm-season probably wants a db??? Or some other silliness


this is why I use guardrails 😜


yes I found the silly thing !! havent take a look at guardrails, let me look at it.


@tony.kay Does {:pathom/context {:farm-season/year 2020}} value get passed to every resolver ? My subsequent resolvers which need the above input are not being invoked.

tony.kay22:05:21’t know. I have an env plugin that moves my top-level EQL query params into env so every subsequent resolver sees it, and that’s what I use. I don’t use context