Hello! If anyone is experienced with GH Actions / Antora, I'd appreciate some help. When I https://github.com/fulcro-community/fulcro-community.github.io/runs/2029948927?check_suite_focus=true, the 🙏modules/awesome-fulcro/pages/README.adoc
file is there before the antora action runs (so I suppose it sees it as well) but in the result it is missing - there should be main/awesome-fulcro/README.html
but https://github.com/fulcro-community/fulcro-community.github.io/tree/gh-pages/main and I do not know why. When I build locally, it works.
Idk much about antora but I’m using Mkdocs and it treats README.md
as index.html
when generating the site, i.e. it will use README.md
to generate index.html
. Perhaps antora has the same behaviour?
Though one thing I did encounter is that sometimes the action may not be done properly which can cause some weird behaviour. If you build fine locally but it’s not working when running GHA, I’d check the action first.
Thank you! I fixed it now. The problem was I defined the main module via a github url instead of simple ./
so it was re-downloaded, without submodules.
Is it possible to embed reagent components in a fulcro app? I want to add some interactive dataviz to my project, and most of the existing cljs ecosystem around this seems to export reagent components. I've seen the youtube video where Tony Kay embed a fulcro app inside a re-frame app, but this isn't quite the same. edit: I assume the answer to my naieve question is, yes it's possible. Does anyone have an example?
yep, super easy due to how everything is pluggable in a fulcro app. my template uses it by default: https://github.com/dvingo/dv.fulcro-template/blob/master/resources/clj/new/dv.fulcro_template/src/main/app/client/application.cljs#L83 and here's a working sample app generated from that template: https://github.com/dvingo/pathom-client-wikipedia/blob/master/src/main/dv/pathom_wp/client/ui/root.cljs#L98
I can PR it - but which section should it go under? https://book.fulcrologic.com/#_render_middleware ?
Hm. Good question. How about in the “Components and Rendering” chapter we add a new sub-section called “Integrating with Reagent” and put it at the end of that chapter, just before the = EQL...
heading.
Please give yourself credit at the beginning of the new section. Something like (this section and example kindly provided by …)
wrap-file-upload
fails with this exception if the AST of the mutation that receives the file upload has a query, and I'm not sure how to debug it. Any tips?
As long as :query
is not present in the AST, it seems to work (`:children`, :component
, etc. seem to not trigger the exception). However, Fulcro then also seems to not merge the result into the DB. I guess that could be manually rectified with a merge-component!
in ok-action
.
But I'm not sure if file upload mutations just don't support queries, or if I'm using it wrong.
> included a js object in there that it is trying to write over the wire?
Well, given that it works if I just dissoc :query
from :ast
(no changes otherwise), the JS object would have to be located in the query. The query comes from a defsc
, so it's unlikely, I think.
> But it is entirely possible that the wrap file upload middleware isn’t written correctly to support returning
The same thing happens if I try to write the query in comp/transact
, so I don't think it's returning
-specific.
Hm. I’m using the file upload middleware without issue. This is Fulcro 3, latest version, right?
but I’m not using mutation joins on those mutations
also check transit versions…but I’m guessing I just overlooked that particular use-case when writing the middleware
Fulcro is at version 3.4.17
.
> also check transit versions…
That is interesting, we are aligning our deps with Datomic Cloud, so we are using "outdated" versions (well, clearly not outdated according to Cognitect, but anyway).
On the other hand, the faulty requests never leave the frontend, so that shouldn't be it.
Our Transit stack looks like this,
{com.cognitect/transit-cljs {:mvn/version "0.8.264"}
com.cognitect/transit-js {:mvn/version "0.8.867"}
com.cognitect/transit-java {:mvn/version "0.8.337"}
com.cognitect/transit-clj {:mvn/version "0.8.319"}}
> but I’m guessing I just overlooked that particular use-case when writing the middleware We use them to backfill some data (like the URL pointing to where the file has been uploaded) as part of the response.
Feel free to submit an issue with a trivial project (not datomic cloud, but full-stack) that shows the problem. Shouldn’t take long to generate such a project. If you do that, then I’d be willing to work on a patch.
Thanks
This repo you made is just broken. You didn’t install the server-side middleware, and it was just crashing on the server side mutation
There’s no server side mutation. This isn’t what I was looking for. I was looking for something that you had tested, and that worked for the non-return case, and that then you added a return request to and it failed. This is just a big broken mess…which isn’t saving me any time 😕
I’m fixing the example, so just wait…it’s faster for me to just do it at this pt
Yeah, the problem is in the metadata. ast->query pushes the components back into the metadata, and transit tries to encode that, but a Component is not transit compatible
Fixed and released as 3.4.18
Thanks for trying to build a repro case. It did actually help a little..it was just a little frustrating that the example wasn’t coded as full stack and tested before adding the breakage.
> This repo you made is just broken. You didn’t install the server-side middleware, and it was just crashing on the server side mutation I'm sorry, that was an intentional omission, as the mutation never got far enough to fail on the server side. Since you specified… > Feel free to submit an issue with a trivial project (not datomic cloud, but full-stack) that shows the problem. … I didn't understand that you wanted code to add to your test suite, and I interpreted "full-stack" as meaning "full-stack enough to produce the problem". Once it leaves the frontend, it's no longer Fulcro's problem, I reasoned. Next time, I'll know to produce something working and then break it.
> Fixed and released as 3.4.18 Thank you, that's great!
Yeah, no worries. It was doing the POST at the network level and that was failing, so that made it unclear that it was failing for a good reason. I also needed to be able to see the whole thing worked when I got it fixed, and not having anything on the server meant I was seeing a network error that caused me to wonder what was actuallly going on, and there was no way for me to easily verify it would work without the returning….also, once fixed it I still had to write the server side stuff to make sure it really was returning the tree and normalizing it.
That is a super nice example. We should add that to an interop section of the dev guide
There is not a design limitation on using returning
with a file upload. Given your exception it looks like it had trouble serializing it, which makes me wonder if you accidentally included a js object in there that it is trying to write over the wire?
But it is entirely possible that the wrap file upload middleware isn’t written correctly to support returning
🙏 Help needed: I have started working on https://github.com/fulcro-community/fulcro-exercises, a hands-on follow-up to the https://fulcro-community.github.io/guides/tutorial-minimalist-fulcro/, that forces you to internalize the lessons through a series of practical exercises. So far one multi-step exercise is there. I would really appreciate early feedback, especially from beginners 🙏