This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-01
Channels
- # adventofcode (2)
- # announcements (3)
- # babashka-sci-dev (79)
- # beginners (76)
- # biff (2)
- # calva (32)
- # cider (2)
- # clj-kondo (42)
- # clj-on-windows (17)
- # clojure (28)
- # clojure-belgium (1)
- # clojure-berlin (1)
- # clojure-europe (95)
- # clojure-nl (4)
- # clojure-norway (4)
- # clojure-uk (5)
- # clojurescript (27)
- # conjure (5)
- # cursive (3)
- # data-science (16)
- # datomic (67)
- # graalvm (12)
- # hyperfiddle (36)
- # jobs (3)
- # jobs-discuss (1)
- # kaocha (2)
- # klipse (1)
- # leiningen (28)
- # lsp (16)
- # luminus (3)
- # malli (10)
- # nrepl (3)
- # off-topic (57)
- # other-languages (18)
- # re-frame (4)
- # reitit (8)
- # releases (1)
- # remote-jobs (1)
- # scittle (4)
- # shadow-cljs (7)
- # test-check (1)
- # tools-deps (4)
- # vim (11)
- # xtdb (25)
This is extraordinary. Network-transparent distributed & reactive tree-list DOM widget, backed by the file system. With combined filtering and pagination. 100% abstracted from the file system via Clojure's datafy/nav protocols. Recursive treewalk filtering is a pure function, works at the REPL and has a unit test. Tree logic and filtering is 100% decoupled from rendering / DOM and could drive ClojureDart, Swing or anything else. 15 LOC - TreeList with filtering 40 LOC - Abstract table renderer with pagination controls 40 LOC - concrete file system cell renderer and router 50 LOC – java.io.FIle datafy implementation
Now that async traces have landed, this is within reach of any mid-level clojure programmer
I hope you publish a quarterly report with this stuff in. 🙂 BTW Even though the demo clearly makes the technical point, I feel like it would be more convincing if... each item showed more of its (full)path! It's a small detail, but the results feel incomplete, less valuable because of the contextual omission, and it seems to potentially and uselessly cast a shadow on the overall. Another detail, likewise, would be the suggestion to replace the scrollbar with typical label-links for each page number. Again, not required to technically prove HF... All stuff that some of us users could contribute. You might want to start a list of easy contributor-level demo issues in e.g. github.
> each item showed more of its (full)path! i dont understand please say more?
Oh, I was wrong - something gave me the impression that each LICENSE file here didn't show its owning folder, but it does. What triggered the impression for me might have been the small indentation, and/or pajama greying out of each alternate line; in this context it might be better to grey out dirs vs files???
So you might just as well forget this part of feedback, it's too UI-centered, then, since contents are Good:tm: .
Near 30s mark, you had to fix an out-of-new-bounds state error with the pager. Might be worth checking into improving coherency on this matter.
The slider is poor man's infinite scroll, do you know a simple infinite scroll component in cljs or react?
Can't you do something similar to what htmx has, i.e. on reveal load more content? https://htmx.org/examples/infinite-scroll/
Looks like an intersection observer. Appending is easy, unmounting off screen pages is way harder. The scroll must be virtual and adding/removing content shouldn't make the page "jump". Even more so with dynamic height content.
I'm porting https://github.com/dustingetz/react-chatview wish me luck, about 3 hours in
Infinite scrolling implies unbound data size, so unmounting is essential.
Photon will do it, half of react-chatview should evaporate
Could you brute force it and interop with the existing react component, while rendering rows with photon?
i want the tutorial example ha
Damn you guys are right, I am likely gonna fail – chatviews are special in that the "not unmounting of elements we've already loaded" is essential, it's just a "load more history" button. I.e. Slack channels. Newsfeed is the same thing but flipped upside down
What this folder explorer demo wants is the case where the total record count is known in advance so you can set the scrollbar to the exact right height and leap ahead to a specific page. (Or with "close enough" accuracy in the case of variable height rows)
Sorry to have thrown you in such minutiae!
Let's hope you can close the loop, then; after all, this is a language!
Slack scroll is not just "load more history". It's fully virtualized, you can jump to any point in history and scroll faster than it can load while getting a smooth scroll experience. Messages load into place an no jump happens even with dynamic height. TBH I don't know how they did it.
> could drive ClojureDart
^Does photon already work with ClojureDart?
have not tried but don't see why not, photon-dom is designed as a separate module and it's just point effects
is there a way in the test rcf macro to not repeat the function name? not a big deal, i'm just seeing if i organize things better.
what do you mean
e.g (test inc 1 := 2 2 := 3)
An idea is to call into clojure.test
the point of RCF is to make it easy to eval them – but if you need to eval a bunch of stuff as a unit then calling into other abstractions is likely idiomatic
gotcha.
yep yep. that was my inspiration. thanks Dustin 🙂 i'm just taking the library for a spin for the first time.
If you have a neat idea for a macro – the latest published release of RCF (maven coords were published last week) has strong support for macros (deep assertions)