This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-07
Channels
- # announcements (1)
- # babashka (38)
- # beginners (21)
- # calva (1)
- # cider (6)
- # cljsrn (1)
- # clojure-austin (3)
- # clojure-dev (23)
- # clojure-europe (51)
- # clojurescript (2)
- # clr (100)
- # conjure (3)
- # core-typed (3)
- # data-science (2)
- # fulcro (21)
- # joker (1)
- # joyride (1)
- # lsp (7)
- # malli (4)
- # nbb (5)
- # reagent (1)
- # releases (1)
- # shadow-cljs (5)
- # spacemacs (5)
- # squint (5)
- # xtdb (16)
Fulcro 3.6.0-RC3 released. Fixed regression with dynamic-routing not seeing active routes.
In the RAD demo the db configuration uses a :main
key but then the schema is changed to :production
. Why not keep it all as main?
My memory is a little vague, and I’m not looking at the code. The idea is this, though, and it may not be an oversight: The schema is the format of the database, but the design is such that you can shard data over many database instances based on the current request. Thus, the database name might be one of many, whereas the schema will be constant across all of them. The database selector function is picking a database for a schema based on env.
Ok so the schema is intended to be separate from the database name. I would think that the attributes would need to be saved in the development and staging databases as well. So perhaps main would be a better name for the schema
PSA and reminder to future self:
To get clj-kondo
to use the config hooks for fulcro, guardrails, so that things like >defn
get linted correctly, do this:
clj-kondo --copy-configs --dependencies --lint "$(clojure -Spath)"
(Taken from this PR: https://github.com/fulcrologic/guardrails/pull/28). Thx @mroerni!... or use Calva which will do this for you automatically :-)
In the RAD Semantic UI plugin it says > ALL options MUST appear under the rendering options key However the implementation seems to allow options be specified directly in the component options. I'm assuming the decision to nest all the options in the rendering options key was either abandoned or it was adopted later without being fully implemented. Which one was the intention?
Well there are two levels of things: Things that are generic and defined in RAD itself, and others which a given rendering plugin might want to define for extended behavior. I’m not claiming perfection on anything, but the intention at least was to put the SUI-specific options under SUI-specific keys so they would not conflict with other possible plugins/interpretations.
For example the layout-class
can be specified in both component-options
and rendering-options
: https://github.com/fulcrologic/fulcro-rad-semantic-ui/blob/f2d1841b5d2168e7aaad3f0a1e868c13313f5a07/src/main/com/fulcrologic/rad/rendering/semantic_ui/form.cljc#L378
Is it better for an option like that to be retrieved from both or from just the rendering options? Since all the options are fully qualified keywords I don't think there'd be a naming conflict either way. But it does add consistency to keep every option under the same key
I'm perfectly fine with whatever makes sense for your use case. As long as the options are documented so people know where to put them, then I'm ok with it. You could expect them on the to level report or form if they make sense there, subforms, custom subtree...
I've honestly been hoping others would contribute and chime in. The existing stuff tried to set the patterns, but it is a lot of stuff to maintain, so it's hard to keep it all straight. Also, there are typically some legitimate variations that will make sense. I'd say make it, use it, but be slow to publish it so you have easy flexibility to rename