This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-23
Channels
- # announcements (2)
- # architecture (83)
- # asami (2)
- # babashka (49)
- # bangalore-clj (2)
- # beginners (235)
- # braveandtrue (1)
- # calva (17)
- # clojure (109)
- # clojure-australia (5)
- # clojure-czech (5)
- # clojure-dev (24)
- # clojure-europe (17)
- # clojure-germany (2)
- # clojure-nl (3)
- # clojure-serbia (13)
- # clojure-spain (1)
- # clojure-spec (1)
- # clojure-uk (20)
- # clojurescript (3)
- # community-development (34)
- # conjure (10)
- # cursive (21)
- # data-science (1)
- # datahike (1)
- # datalog (1)
- # datomic (12)
- # etaoin (3)
- # events (2)
- # fulcro (13)
- # graphql (8)
- # heroku (2)
- # lsp (58)
- # malli (32)
- # membrane (24)
- # off-topic (63)
- # parinfer (2)
- # pathom (14)
- # portal (14)
- # re-frame (16)
- # reagent (50)
- # releases (1)
- # rum (1)
- # shadow-cljs (10)
- # sql (6)
- # startup-in-a-month (1)
- # timbre (2)
- # tools-deps (61)
- # xtdb (4)
Hi all. Im using a re-com input-text area to do the text area in this -> https://text-to-wardley.vercel.app/
On my local before I release the text area is nicely sized to take up the left 30% of the page. Once I release it it just doesnt respect the width property and remains narrow, and certainly doesnt resize. any pointers?
This is the function here -> https://github.com/mlakewood/text-to-wardley/blob/main/src/cljs/text_to_wardley/views.cljs#L30
Im wondering if for some reason its not re-rendering, so i've added a sub for the window width / height
^^ that didnt work
The container that has the real textarea
seems to have the right width. Check the div with class rc-input-text
.
Seems like it's just the textarea
itself that doesn't fill its parent width-wise for some reason. Maybe there's some issue in CSS? Something being used in dev but not making it to the prod?
hmm. yeah css might be it. I diffed the html and it was the same...
On the re-com demo web page you can see that the text area input has additional styles applied to it that all come from Boostrap.
ahhh.
hmm.. I do have bootstrap pulled in.
but thats a good guess.
oh good pickup.
Never use http://
to include resources in your HTML, always use //
. It will use the same protocol your page was loaded with.
good tup
Hi all, I haven't worked with reagent in quite some time. I was wondering if anyone could help out with the following issue on the reagent cookbook. https://github.com/reagent-project/reagent-cookbook/issues/62 For context, we recently bumped the reagent version in all recipes, but that broke this recipe (and possibly others). Also, I am unsure what is considered best testing practices these days. So I was hoping to receive help updating this recipe or replacing it altogether. PRs welcomed 🤞
do you have React installed? older versions of reagent depended on react-cljsjs; new versions expect you to install React yourself, either by depending on react cljsjs in your app or via npm depending on your project setup
hiya - I created that issue, so ... I may be able to answer - I don't see an explicit react dependency
specifically, it has an :exclusions
for cljsjs/react
well, in the recipe https://github.com/reagent-project/reagent-cookbook/blob/master/recipes/test-example-with-ReactTestUtils/project.clj#L4
I got something that at least got through to compiling the JS ...
:dependencies [[org.clojure/clojure "1.10.1"]
[org.clojure/clojurescript "1.10.773"]
[reagent "1.0.0"]
[cljsjs/react "15.6.1-1"]
;; [cljsjs/react-with-addons "15.6.1-0"]
[cljs-react-test "0.1.4-SNAPSHOT" :exclusions [cljsjs/react-with-addons]]
[prismatic/dommy "1.1.0"]]
but, it fails then ...
Error while loading file: "resources/public/js/compiled/test.js"
SyntaxError: resources/public/js/compiled/test.js:285:503 Expected an operand but found const
might be because I'm trying with nashorn since I haven't taken the time to setup karma/chrome-headless/etc.
setting that up right now to check ... be just a minute
In addition, I think cljs-react-test won't work with new versions of react / is no longer maintained. I am curious what is currently used by the community as a replacement.
was running in a Docker container, but setting all that up in there is a PITA ...
yeah - ultimately, I'm not trying to get something SPECIFIC to work ... I'm trying to write tests with reagent
... that's all - what's being used?
nobody testing?
@U01SEDZ83N0 yeah, for sure, i am also interested in whatever the current testing practices are and would prefer replacing that recipe all together (since it is stale and now broken after the blind version updates to all the recipes)
23 03 2021 23:17:21.242:WARN [web-server]: 404: /out/goog/deps.js
23 03 2021 23:17:21.268:WARN [web-server]: 404: /out/cljs_deps.js
Chrome Headless 89.0.4389.90 (Mac OS 11.2.2) ERROR
Uncaught TypeError: Cannot read property 'TestUtils' of undefined
at out/cljs_react_test/utils.js:79:48
TypeError: Cannot read property 'TestUtils' of undefined
at out/cljs_react_test/utils.js:79:48
Subprocess failed (exit code: 1)
but honestly I think a lot of teams eschew testing their front end outside of manual testing or browser automation
k, I'll take a look - also found https://francisvitullo.medium.com/a-way-of-testing-views-in-clojurescript-apps-98aaf57c5c2a
will take a deeper look tomorrow!
thx all 🙂
@U01SEDZ83N0 @U4YGF4NGM thanks! Regarding the recipe in question, I think for now I'll revert the version of reagent back and move it to the 'old recipes' section. I'll also add a note in the readme that new testing recipes are welcomed.
@ps Will you please stop cross-posting questions unless someone specifically tells you you’re posting in the wrong channel and should post a question elsewhere.
@U04V70XH6 what if the post pertains to two topics?
Post it in the single channel you think is most appropriate. If someone tells you it belongs in another channel only then post it elsewhere (and remove it from the original channel).
That way folks won’t waste time dealing with a question in a channel when it is being dealt with in another channel.