This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-25
Channels
- # admin-announcements (3)
- # beginners (165)
- # boot (123)
- # cider (106)
- # clara (1)
- # cljsrn (20)
- # clojure (199)
- # clojure-canada (2)
- # clojure-dev (3)
- # clojure-poland (29)
- # clojure-russia (7)
- # clojure-taiwan (2)
- # clojurescript (487)
- # cursive (25)
- # datavis (89)
- # datomic (26)
- # gorilla (2)
- # hoplon (15)
- # ldnclj (12)
- # lein-figwheel (9)
- # leiningen (2)
- # liberator (1)
- # off-topic (25)
- # om (380)
- # onyx (26)
- # parinfer (52)
- # portland-or (12)
- # re-frame (28)
- # reagent (132)
I’m reading the changelog for the upcoming release https://github.com/reagent-project/reagent/commit/348ac4aaf86dd120d0aa254dc06c5efa5991ce22
Anyone know what "Support [:> nativeComp {:foo "bar"}]
” will mean?
> jstew: I feel all warm and tingly inside. I figured out how to make select2 work with reagent (albeit in a hacky way but it works)
@jstew you are sitting on top google closure library which has the bestest autocomplete made by human being.
@mike: unfortunately to make it work with an opinionated bootstrap theme that looks gross unless you use their components (Flat-UI)
http://google.github.io/closure-library/source/closure/goog/demos/autocompleterichremote.html http://google.github.io/closure-library/source/closure/goog/demos/autocompleteremote.html http://google.github.io/closure-library/source/closure/goog/demos/autocomplete-basic.html
at the very least you could go with http://jedwatson.github.io/react-select/
I can't really complain, select2 relies on jquery and has it's own API. Which is understandable considering that it wasn't designed with react or clojurescript in mind.
yeah, I don’t have issues with select2. Finding google closure alternatives isn’t so easy.
@jstew: what about the overhead? you're using clojurescript which comes with closure library stuff and then on top of that you'll have jquery.
i think the overhead isn’t a problem, the main focus is getting it built. If it isn’t built, you can’t worry about overhead anyway
damn, even googling for Automcomplete Remote Google Closure doesn’t return good results
There are not many entry level tutorials for the closure library and the docs aren't the greatest either.
it looks good, but for someone that is not familiar with the google closure ecosystem, it is difficult to find. While I don’t have to be familiar with jquery to find select2 and start using it.
That's what I've been finding when I have to work with it. Luckily there are smart people in slack that I can get info from
now that I know about closure’s autocomplete, I’ll investigate it some more, but really, the closure libraries and ecosystem is obscure
Honestly, the documentation for GCL is just bad, I can't really understand it (but same goes for documentation of most Java libraries).
clojurescript is also shipped with google guava, do I have to know that or be concerned with the libraries in google guava
select2 is shipped with jquery, doesn’t mean I have to know every single library or utility in jquery
also look the github project, google started to take it seriously after many years of public inactivity.
@roberto please give that feedback in https://groups.google.com/forum/#!forum/closure-library-discuss
this is reference not docs http://google.github.io/closure-library/api/
maybe they don’t care about good docs because they are more focused in getting internal use.
Also re-com has a pretty nice select component. I've cannibalized it once to add multiple selection and was quite satisfied.
when I’ve had to read jquery code, it was mostly for educational purposes. But most of them are very well documented.
and yes, I agree, closure is superior, but if the docs are horrible, it won’t get much usage.
var tcMovies = [
"Mission Impossible", "Top Gun","Jerry McGuire","Rain Man",
"Days of Thunder", "Risky Business","Interview With The Vampire",
"Eyes Wide Shut","Far And Away", "Jerry Maguire","The Firm","Cocktail",
"A Few Good Men","Legend","Taps", "The Outsiders","Losin' It",
"Endless Love","The Color Of Money", "All The Right Moves",
"Minority Report","Magnolia","Mission Impossible 2",
"Mission Impossible 3","Vanilla Sky","Ghost Soldiers","Few Good Men A",
"Color of Money The","Firm The","Mission Impossible II","Outsiders The",
"Young Guns","Top Gun DVD","Days of Thunder DVD","Coctail",
"Mission Impossible DVD","Fallen Angels Vol 1","Don't Look at Me",
"Young Guns uncredited"];
var ac1 = goog.ui.ac.createSimpleAutoComplete(
tcMovies, document.getElementById('txtInput1'), false);
var ac2 = goog.ui.ac.createSimpleAutoComplete(
tcMovies, document.getElementById('txtInput2'), true);
tag mode is just a visual trick. after entering, you just keep a list of elements with tags style.
yeah, select2 might be inferior code wise, but you can build something much faster by just reading the docs.
https://github.com/rackt/react-autocomplete it's much easier with react.
https://github.com/google/closure-library/blob/master/closure/goog/ui/ac/richremotearraymatcher.js
that react autocomplete looks better tho. Even the source code is much easier to understand than closure's
When I wrangled with Google Closure Compiler I had to figure out what it's doing with trial and error
@roberto: yeah, I agree with that point, when all you have is javadocs you don't really know where to start biting into the library. For a university project I was doing a Clojurescript frontend for a backend in Groovy. When I had to modify that for my convenience and there wasn't much docs besides API docs figuring out how the hell do I change data serialisation format took me literally hours.
yeah, people confuse api docs, tests and source docs for good documentation on HOW to use something.
most of the time I don’t care how something works, I just want to know how to use it.
I dunno, not saying Rich made a wrong decision building on GCC and GCL, the tree shaking thing is pretty awesome, but I think he might have the Java mindset - if there's Javadocs then it's awesomely documented and readily usable. I despise Java and Javadocs give me nothing in the way of understanding how to deal with something. I tried to use this once - http://oltu.apache.org/ - because all Clojure oAuth provider libraries were missing refresh tokens and this lib had it and I couldn't make head or tails of how to use it.
yeah, javadocs are good as a reference, which you need once you are familiar with a library. But if you are not familiar with it, javadocs are not much help.
it is like saying, if you want to learn OCaml, this should be enough http://caml.inria.fr/pub/docs/manual-ocaml/libref/
does anyone know how I could make a non-component function run after every react update?
i've got components running db transactions and I want to combine the transactions and only actually transact! them after the components are done rendering