Fork me on GitHub
#clojurescript
<
2020-10-20
>
Alessandro Solbiati00:10:43

hey guys, how do I make figwheel auto-testing work in my lein figwheel project? I am getting this error from project.cli and was following this guide https://figwheel.org/docs/testing.html 63 :css-dirs ["resources/public/css"] ;; watch and update CSS 64 :auto-testing true ^--- The key :auto-testing is unrecognized

Alessandro Solbiati00:10:44

looks like that in lein-figwheel (that I thought was the same as figwheel) they took away the option…. https://github.com/bhauman/lein-figwheel/wiki/Configuration-Options

lilactown02:10:25

lein-figwheel is I think properly deprecated? or at least, figwheel-main (which I think http://figwheel.org are docs for) is the latest version

kah0ona09:10:57

how can i :require an library starting with an ’@'

kah0ona09:10:18

“dependencies”: { “@uppy/core”: “^1.13.2”, }

kah0ona09:10:02

I got this bundling stuff working with figwheel-main, and :target :bundle , so now I’m ready I think to use an npm library, but not sure how to include this

kah0ona09:10:34

using latest clojurescript

thheller10:10:11

(:require ["@uppy/core" :as x])

kah0ona10:10:34

Ah check thx

kah0ona11:10:39

should I also use :exclusions [cljsjs/react cljsjs/react-dom] and use those in my package.json? Do i also have to (:require [react] [react-dom]) then

kah0ona13:10:34

ah got it working thanks

Andrei Stan13:10:19

hello, can someone point me in the direction of how can i better customize a semantic-ui-react Dropdown component (especially the options/children ?! ) ? • i want an right-positioned "delete icon" for each option, so far the icon is by-default in the left-side of the "text" prop; Thanks.

(let [opt [{:value "apples" :text "Apples" :icon "delete"])}
                       {:value "oranges" :text "Oranges"}
                       {:value "grapes" :text "Grapes"}]]
    [:> ui/Dropdown
      {:fluid true
       :selection true
       :search true
       :allow-additions true
       :options opt
        }]) 
I would like to have:

p-himik13:10:02

It's not really a ClojureScript question. But the API docs at https://react.semantic-ui.com/modules/dropdown/ mention renderLabel.

Andrei Stan13:10:31

Thanks. it also mentioned that "Only applies to multiple Dropdowns."

p-himik13:10:30

Well, it's something you'd have to take up with the guys behind semantic-ui-react, because CLJS cannot do anything about it.

mathpunk17:10:55

Hello, I had a probably-terrible idea, but if it works it might make something terrible I have to do every day, less terrible. Summary: mathpunk wants to figure out if it's feasible or desirable to sneak a repl into selenium-webdriver's executeAsyncScript function, to turn errors while running protractor scripts into data and generally power up the end-to-end tests we write. Details: <thread>

mathpunk17:10:11

I just used protractor as directed for a couple of years

mathpunk17:10:20

finally I looked into the implementation details just a little bit

mathpunk17:10:33

(that's the documentation, the implementation of executeAsync is down-page)

mathpunk17:10:54

I've been very impressed with some of the wild places that people have put repls

mathpunk17:10:24

so I'm asking: Is there a way that I could use a repl to like.... I dunno, • pause the script to examine errors • parse error data into something more meaningful, since I know a lot about the application and what could be going wrong as the app code drifts from the test code and I gotta go figure out what happened • recover from common errors

mathpunk17:10:33

I find that when I have a repl, I learn very quickly about what is truly going on. So my intuition tells me that if it is possible to drop a repl into webdriver, it might empower me to make our testing pipeline a whole lot better

mathpunk17:10:36

thank you for your thoughts!

unbalanced22:10:01

This isn't exactly the answer you were looking for, but if you want to find a way to sneak a REPL into any webpage: https://chrome.google.com/webstore/detail/chrepl/ablpgchfbbfachdiakmieocbdgflgfjj

mathpunk17:10:07

that does look useful, thank you

unbalanced22:10:35

So... I'm curious about this code from cljs.core

(defn ^number *
  "Returns the product of nums. (*) returns 1."
  ([] 1)
  ([x] x)
  ([x y] (cljs.core/* x y))
  ([x y & more] (reduce * (cljs.core/* x y) more)))
Seems... infinitely recursive.

unbalanced22:10:17

Is it a protocol kinda thing or a dispatch somehow?

dpsutton22:10:00

confusing but

(core/defmacro ^::ana/numeric *
  ([] 1)
  ([x] (core/list 'js* "(~{})" x))
  ([x y] (core/list 'js* "(~{} * ~{})" x y))
  ([x y & more] `(* (* ~x ~y) [email protected])))

unbalanced22:10:20

cljs.core is the Clojure namespace

unbalanced22:10:26

🙏 thank you