This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-15
Channels
- # announcements (2)
- # babashka (137)
- # beginners (96)
- # calva (3)
- # cider (11)
- # clj-kondo (8)
- # cljs-dev (161)
- # cljsrn (21)
- # clojure (78)
- # clojure-europe (47)
- # clojure-france (1)
- # clojure-losangeles (1)
- # clojure-nl (4)
- # clojure-spec (24)
- # clojure-uk (9)
- # clojuredesign-podcast (4)
- # clojurescript (39)
- # conjure (2)
- # core-async (27)
- # cursive (36)
- # datomic (54)
- # emacs (6)
- # figwheel (9)
- # figwheel-main (46)
- # fulcro (25)
- # graalvm (8)
- # helix (30)
- # hoplon (6)
- # hugsql (3)
- # jobs (5)
- # leiningen (7)
- # luminus (12)
- # nrepl (20)
- # off-topic (20)
- # pedestal (16)
- # re-frame (14)
- # reagent (3)
- # reitit (3)
- # remote-jobs (5)
- # rum (25)
- # shadow-cljs (60)
- # spacemacs (10)
- # vim (2)
- # xtdb (36)
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.
hello, will rad and rad-demo support international multilingualism?
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.
❤️ 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
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
thanks, will take a look
are there any recommendations for managing fe configuration? just use closure defines via shadow or what?
I get the following error when I run the parser
function -
{[#uuid "5eb40c62-28f8-4b72-b82a-d369651c87c8"] nil,
:com.wsscode.pathom.core/errors
{[[#uuid "5eb40c62-28f8-4b72-b82a-d369651c87c8"]]
#:com.fulcrologic.rad.pathom{:errors
{:message
"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}])
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.
http://smith.fulcrologic.com/on’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