This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-03
Channels
- # announcements (11)
- # aws (1)
- # beginners (57)
- # calva (14)
- # cider (22)
- # clara (23)
- # cljdoc (21)
- # cljs-dev (14)
- # clojure (76)
- # clojure-austin (3)
- # clojure-europe (32)
- # clojure-finland (1)
- # clojure-gamedev (5)
- # clojure-italy (3)
- # clojure-nl (17)
- # clojure-poland (4)
- # clojure-spec (23)
- # clojure-uk (29)
- # clojurescript (72)
- # cursive (6)
- # data-science (4)
- # datomic (2)
- # dirac (10)
- # duct (3)
- # emacs (1)
- # figwheel-main (10)
- # fulcro (86)
- # jackdaw (5)
- # juxt (2)
- # kaocha (2)
- # leiningen (16)
- # off-topic (47)
- # pathom (46)
- # protorepl (2)
- # reagent (4)
- # reitit (14)
- # ring-swagger (5)
- # shadow-cljs (43)
- # spacemacs (13)
- # sql (13)
- # tools-deps (6)
Hi @tony.kay I noticed that namespaces docs are missing from 2.8.8 but they are available in 2.8.0 https://cljdoc.org/d/fulcrologic/fulcro/2.8.8/doc/readme https://cljdoc.org/d/fulcrologic/fulcro/2.8.0/doc/readme
Happy to assist in getting this fixed 🙂
Note that badges will soon indicate if there has been a problem during analysis
The exception that causes the analysis to fail can be seen here: https://circleci.com/gh/cljdoc/builder/3472
If anyone would like to help fix this, feel free to pop into #cljdoc, happy to provide pointers/guide someone through the process.
@U050TNB9F how do I tell it to use aliases to get classpath right?
will reply in 25min
Hey @tony.kay 🙂 So cljdoc looks at the pom.xml that has been pushed to the Maven repository (Clojars in this case) — dependencies with scope "provided" or "optional" will be included. The easiest way to ensure those dependencies will be present is to add them to your project.clj
or similar with one of these scopes.
I found that…I am using clj deps, and lein for clojars with deps plugin…perhaps I just need to change the aliases there.
yeah, it seems like the dependencies from the :provided
alias don't show up in your pom.xml: http://repo.clojars.org/fulcrologic/fulcro/2.8.8/fulcro-2.8.8.pom
sure thing! sorry cljdoc is causing you extra work 😄
Maybe @U8LP4DAJZ feels brave and would like to help with this? 🙂
all that has to happen is a change to the alises used by the deps plugin in project.clj
but if I add the aliases in project, will that cause the provided deps to transitively infect using projects…that kind of testing
right, but as long as they end up in pom.xml
with scope "provided" all will be good
have to run now but might take a look at this tomorrow if no one beats me to it
Wish I could help but don't think I can, I am very new to the entire ecosystem, never did any Clojure, just a little ClojureScript
@U8LP4DAJZ no worries! 🙂
If anyone would like to help fix this, feel free to pop into #cljdoc, happy to provide pointers/guide someone through the process.
Trying to require in [fulcro.ui.bootstrap3 :as bs]
and getting an error: java.lang.RuntimeException: No such var: cljs.core/INamed, compiling:(fulcro/i18n.cljc:55:1)
@njj bootstrap stuff is moving to legacy and I do not plan to support it. That said, let me look…
oh…if you have 2.5.8 working, I’d try moving on to a newer version…don’t remember why, but I probably made some little fix for you there that would be in any later version
If my fields for a form aren’t ::
, and just regular keywords, how does validation work? i..e a field of mine is :subtotal_amount
, it seems that (fs/get-spec-validity form field)
is just always returning :unchecked
and my spec definition is (s/def ::subtotal_amount #(s/int-in-range? 1 200 %)
Ah but now I’m back at [fulcro.ui.form-state] FORM NOT NORMALIZED: [:update-booking :tab]
😐
@tony.kay Everything else seems to be working, except the onBlur completion. I’m still getting a form not normalized error, any ideas? https://gist.github.com/njj/271054aead0c5644571460ad5c9dbe69
since that bootstrap stuff isn’t supported anymore, i recommend you consider using this instead https://github.com/fulcrologic/semantic-ui-wrapper
it’s a thin wrapper around React Semantic UI, which has good documentation and has tested thoroughly
that’s what we’ve been using in our projects
of course this is just a friendly suggestion
Thanks for the recommendation, I’ll check it out. Although this is just using bootstraps css, which my entire application uses. Not the fulcro lib.
Unless you think my issues are related to that? Right now the error from fulcro is about the form not being normalized. @U09FEH8GN
pls read the chapter carefully in the book and think about normalization and what it means for something to be “joined in a query” of a component…it means there will be a valid ident point to a valid db table from that entity to the other. Just having “some config” in the database doesn’t mean it is the right thing or in the right place
Each instance of you entity being edited has to have its own associated config…that stores that instance’s pristine state, etc. That’s how it works. The form-state namespace is nothing more than some state helpers. You can do forms however you want. The job of form state is to save a copy of your entity state and diff it. That’s pretty much it. It can only do that if you make a 1-to-1 live data association between your form ui and an instance of form state config.
Putting some config in the db at id nil isn’t making that association, and will never work.
In a real application, when you edit a form you know the ID of the thing you want to edit, so you load it…and you can have a post mutation that adds the form config
and the post mutation params are sent with the load, which is where you knew the id, so you can pass them then.
and then you’re in a mutation, so you can use the mutation helper versoin of add-config and don’t even need initial-state…because form entities are typically not known at app start time…you load them, or have an ID in a URL, etc, etc.
This is a real application, I know the id - I just init’d the fields as nil because I couldn’t find a way to pass in props data into the initial-state
initial state is essentially for rendering the first frame of the app when it mounts
I was looking for docs on what the params are in the initial-state function, but can’t seem to find anything. When printing them out they were nil
The initial state params are passed from the parent, when you compose initial state to root
I even have booking-id
being passed in as well as part of the query, which would be easier to access then (:_id booking)
I assume.
but again, that is for static initialization of the first render frame, not active operational stuff
so if your form is something like “login”, you can know the identity of that entity (it’s a singleton) and add form config on app start…for all other kinds of forms, initial-state
is not what you want
my form is editing data from a server side fetch, then sending a PUT once the user is done
unless you’re going to manually call it from a mutation with get-initial-state
and pass it parameters yourself as a convenient place to put it…initial-state is not used by Fulcro after that except when you explicitly tell it to in a few narrow cases
(defmethod api-read :booking [env _ {:keys [booking-id]}]
(let [booking (auth/booking-by-id! booking-id)]
{:booking booking}))