This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-08
Channels
- # announcements (32)
- # aws (2)
- # babashka (21)
- # beginners (143)
- # cider (3)
- # cljsrn (13)
- # clojure (65)
- # clojure-dev (7)
- # clojure-europe (20)
- # clojure-losangeles (8)
- # clojure-nl (13)
- # clojure-norway (39)
- # clojure-uk (9)
- # clojurescript (39)
- # code-reviews (10)
- # conjure (2)
- # cursive (3)
- # datascript (6)
- # datomic (40)
- # events (5)
- # exercism (23)
- # fulcro (9)
- # funcool (2)
- # girouette (2)
- # graphql (4)
- # helix (8)
- # improve-getting-started (4)
- # integrant (7)
- # introduce-yourself (5)
- # jobs (3)
- # luminus (32)
- # malli (3)
- # off-topic (10)
- # pathom (9)
- # pedestal (4)
- # polylith (25)
- # practicalli (1)
- # re-frame (4)
- # sci (3)
- # shadow-cljs (5)
- # tools-deps (25)
- # vim (31)
- # xtdb (32)
I'm trying to get drag and drop working with reagent, and the closest thing I've found for documentation is: https://stackoverflow.com/questions/22948284/in-reagent-of-clojurescript-how-do-i-add-event-listeners-for-drag-and-drop I gave it a quick try with no luck, so before I look further into it, I would like to know if these attributes are even accurate (given its a random SO post that sources a broken link.)
https://github.com/borkdude/draggable-button-in-reagent This is a working example I've referenced before
Oh, woops, I actually just had it attachedto the wrong DOM element. It actually does look like on-drag-*
and on-drop-*
work. (At least they seem to be in chromium.)
Q: why are some teams moving from devcards/cljs to storybook/typescript? Iโm trying to understand the pros/cons
Hereโs where we chatted about Storybook in the #news-and-articles channel. In a thread I started to promote my blog post about how to implement Storybook in a ClojureScript project ๐ https://clojurians.slack.com/archives/C8NUSGWG6/p1630427159059800
Not sure if it is a pro or con, but my guess would be that moving to Storybook could be about using tools well known in the JavaScript community.
seems like a good option if I want to outsource the build of the view components without needing to find CLJS devs for the task
has anyone got code they can share for dealing with preventing data loss when using the browser's back button? from what i can tell, the strategy needs to be 'save things to local state and restore them if the user used back-then-forwards'
By "using the back button" you mean navigating to a different website, or to the previous page within the same SPA? What about hitting Refresh or closing and reopening the tab?
we have code for onbeforeunload (which covers closing / refreshing), but it doesn't work for the back button/swipe gesture/keyboard shortcut
If it's not SPA that uses HTML5 history or fragments, then onbeforeunload
will be triggered.
And if it is that SPA, you should be able to preserve the state upon each navigation. But overall the strategy you describe is correct.
Hi all,
Iโve got the following function in an .cljc
namespace
(defn list-files
[path]
(->> path
io/file
file-seq
(filter #(.isFile %))))
and I am trying to use it in a clojurescript namespace
it seems like it is not working though, I am getting an error
The required namespace "" is not available. Maybe this library only supports CLJ?
cljc means compilable by both compilers. it doesn't also mean 'everything available in each runtime is magically suddenly available in both runtimes'.
the runtime still needs to be able to actually run your code, regardless of whether the compiler was able to process it ๐
You cannot list files in a local file system from your browser. Otherwise, it would be a security hole.
@U051XTEJB You can explore this - https://developer.mozilla.org/en-US/docs/Web/API/FileSystem https://github.com/logseq/logseq uses it.
Hey, I been searching for a starter template for clojurescript+electron. I noticed most of them are very old (~4-7 years) and stuck at electron v8. It feels like a pattern, does anyone know why there is no, a more updated project anywhere (tried ddg, google, github, gitlab). I'm doing electron for first time.
Hi! This is the kind of thing I was worried about with my current Analogues code. Perhaps it would be helpful to approach it slightly differently: what if Analogues was brought up to date with the latest electron + node version? Once it works, the backend could be replaced with Clojure โ pushing off the task of getting clojurescript working with Electron could be deferred a while?
That's one way to do it. I'm starting from the electron side. I'm trying out basic setup then I'll add things one by one from Logseq's setup since they have everything (and more)
Since there's no rush, I want to use this opportunity to get more realistic practice with Clojure.
@U8LB00QMD That was one of the first ones I saw. npm is giving all sorts of deprecation warnings along with 2 high severity vulnerabilities. It is also based on electron 8 and I get (electron:50826): Pango-ERROR **: 17:55:51.625: Harfbuzz version too old (1.2.7)
FWIW shadow-cljs hasn't changed config wise. so bumping shadow-cljs and electron to the latest version might just work?
wow @U05224H0W , I've been so used to things breaking when I upgrade stuff that I didn't even try it out. Thank you!
Also, could be the reason why no one bothered updating anything, anywhere :rolling_on_the_floor_laughing: