This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-02
Channels
- # announcements (7)
- # aws (3)
- # babashka (132)
- # beginners (38)
- # calva (3)
- # chlorine-clover (6)
- # clara (1)
- # clj-kondo (20)
- # cljs-dev (24)
- # cljsrn (9)
- # clojure (76)
- # clojure-dev (1)
- # clojure-germany (4)
- # clojure-india (2)
- # clojure-uk (24)
- # clojurescript (15)
- # conf-proposals (1)
- # conjure (114)
- # cursive (3)
- # fulcro (63)
- # graalvm (1)
- # helix (2)
- # joker (10)
- # juxt (1)
- # local-first-clojure (2)
- # meander (9)
- # off-topic (97)
- # rdf (4)
- # re-frame (7)
- # reagent (16)
- # reitit (1)
- # rum (9)
- # shadow-cljs (48)
- # spacemacs (3)
- # tools-deps (3)
- # vim (30)
- # xtdb (10)
css style are a paint to maintain. my best guess would be to minimize css overlap for deeply nested elements maybe.
I've run into a really weird issue myself. Is anyone familiar with an issue where a bunch of garbled text is put between a "[" and a "]:"? I'm starting with a empty shadow-cljs project, but when I add the deps.edn file for for fulcro and s-cljs via the ":deps" section of shadow-cljs.edn to the page throws this error when I pull up the local host page. maybe it has to do with windows charater encoding? I see that it's referencing bidi, but I'm not sure if bidi has anything to do with this.
In the meantime I'm going to clone a template and if the issue still persists. If not that may help me narrow it down.
Does it happen both in FF and Chrome?
@ajsnow2012 that is one I’ve seen….what caused that…is was some NPM weirdness
@danvingo you sure that is the problem? Inputs require error to be set of the form and input in order to show
@ajsnow2012 I have some vague memory that it was semantic-ui causing some set of crazy things. In my more recent projects if I use semantic-ui css, I make a diff directory for pulling just THAT in and building it, so it cannot hose the deps on the other layer…also, might have been node version…npm is just a nightmare.
does fulcro and/or s-cljs use semantic ui or node.js by default? I didn't think I was even using node or any other libraries yet.
@ajsnow2012 typically that is caused by not specifying a proper encoding in your page. there should be a <meta charset="UTF-8">
in your <head>
from the RAD book (attr/register-attributes! model/all-attributes)
, is this no longer required ? Cant find the above var in pathom "2.2.28"
@murtaza52 The RAD book is out of date; it doesn't make sense to keep it updated given the frequent changes to RAD. It's recommended to use the demo and docstrings as documentation for the moment.
Question, is it general practice to aim to be up-to-date with shadow-cljs? or stay a few versions behind? If it’s the second, what’s the version people are finding stable?
@folcon I generally recommend updating when there is a new feature you'd like to have or bug fixed that you run into. otherwise if everything works fine for you there is no real reason to stay up-to-date 🙂
most likely a version conflict of some sort. especially likely if you use deps.edn or project.clj
Different things break as I try and update, I’ve tried, 2.8.102
and 2.8.109
. Sure but all I get is warnings and then the site doesn’t load…
So it’s really hard to debug where the issue is?
most likely trying to mix the newer shadow-cljs version with an older clojurescript version
I don’t think I require closure compiler myself, I leave that for deps.edn to handle =)…
[org.clojure/clojurescript "1.10.741"
:exclusions
[com.google.javascript/closure-compiler-unshaded
org.clojure/google-closure-library
org.clojure/google-closure-library-third-party]]
[com.google.javascript/closure-compiler-unshaded "v20200406"]
[org.clojure/google-closure-library "0.0-20191016-6ae1f72f"]
[org.clojure/google-closure-library-third-party "0.0-20191016-6ae1f72f"]
anything that is fixed by rm -rf .shadow-cljs
should be considered a bug and be reported
As in how do I know the way to build a good deps list? It’s normally obvious, but I’m really not used to how shadow/deps works…
Just as a sanity check, is the message server version: 2.8.80
supposed to give the shadow-cljs version? If so I’m really trying to work out how npx shadow-cljs server
keeps launching 2.8.80
even after installing 2.8.109
you can find the wanted versions here https://github.com/thheller/shadow-cljs/blob/master/project.clj#L30-L45
ok, just trying to get the relevant version, I created a minimal project to try and debug this =)… and now my main project isn’t updating >_<…
failed to load shadow.module.main.append.js Error: No protocol method IMapEntry.-key defined for type string: absolute !important
at Object.cljs$core$missing_protocol [as missing_protocol] (core.cljs:324)
at cljs$core$IMapEntry$_key$dyn_60484 (core.cljs:659)
at Object.cljs$core$_key [as _key] (core.cljs:659)
at cljs$core$key (core.cljs:9028)
at Object.eval [as cljs$core$ITransientCollection$_conj_BANG_$arity$2] (core.cljs:7087)
at cljs$core$_conj_BANG_ (core.cljs:801)
at eval (core.cljs:2482)
at Function.eval [as cljs$core$IFn$_invoke$arity$3] (core.cljs:2482)
at Object.eval [as cljs$core$IReduce$_reduce$arity$3] (core.cljs:3506)
at Function.eval [as cljs$core$IFn$_invoke$arity$3] (core.cljs:2552)
@tony.kay Any special reason why ::report/layout-style
, ::report/row-style
, ::report/control-style
are missing from the report-options
ns or should I send a PR to add them?
Thanks for mentioning this, @holyjak. cc @tony.kay FWIW, I just stumbled onto this — I made a new control layout, and was looking for how to activate it. Adding this to a RAD report option map worked. (Exposing it as an actual report-option var would be great, and saved me a bit of searching. In fact, I looked for 15m, and then searched Slack — and wasn’t surprised that Jakub already there. :)
::report/control-style :compact
PS: compact style moves the pagination control into the first row, between the report title.
Again, Fulcro RAD continues to amaze me how every piece of the UI can be patched in.
https://gist.github.com/realgenekim/5218bf72c64c613a5499175aae2bd295Thank you for sharing! I'm just working on a RAD app so it might be handy.
Yeah Fulcro is incredibly brilliant and RAD is a brilliant addition onto it. It cuts down on so much code and makes everything neater.
It might be nice to have a report/install-control-renderer!
function to go with the existing functions for installing renderers.
@folcon that looks like you are calling (key some-string)
where some-string
is "absolute !important"
. no clue what that is about .
It’s a little bit of a puzzle, I don’t believe I’m calling any such string in code I’ve written (I don’t use !important
as a rule), it’s hard to pin down from the stacktrace where it’s coming from… and I don’t see it unless I update from 2.8.80
to 2.8.109
, which doesn’t at all mean it’s coming from shadow, just that the version update surfaced it… I am using the standard fulcro template, I’ve been trying to update it so it’s using newer libs, but this approach wasn’t really working…
Hence trying to write a fully clean minimal implementation, update all the libs and then add code until it breaks ;)…
it is coming from your :init-fn
, so some work you do in there ends up in some bad code
Thanks for the heads up, not sure where you got that from the stacktrace, but I’ll dig in there =)…
btw, quick question, why does the build status now say “Missing.“? It used to be a pretty nice message if I remember correctly =)…
need to store the last result server side so that it isn't missing but haven't gotten to tuning that 😛
found this strategy to start some form fields off in a completed state:
:pre-merge (fn [{:keys [data-tree current-normalized]}]
(merge current-normalized
data-tree
(assoc-in data-tree
[::fs/config ::fs/complete?]
#{:field/one
:field/two})))
ok the fulcro template doesn't cause the weird issue so that's good. but also the template already comes with more code than I was even planning to write for my own project lmao
It does that =)… I think there’s a ton of value in the template, but I’m finding it’s a lot more straightforward to just watch the video tutorial, grab the github code and then start from there? Then use the template to pull in bits you need =)…
Thanks for mentioning this, @holyjak. cc @tony.kay FWIW, I just stumbled onto this — I made a new control layout, and was looking for how to activate it. Adding this to a RAD report option map worked. (Exposing it as an actual report-option var would be great, and saved me a bit of searching. In fact, I looked for 15m, and then searched Slack — and wasn’t surprised that Jakub already there. :)
::report/control-style :compact
PS: compact style moves the pagination control into the first row, between the report title.
Again, Fulcro RAD continues to amaze me how every piece of the UI can be patched in.
https://gist.github.com/realgenekim/5218bf72c64c613a5499175aae2bd295