This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-15
Channels
- # admin-announcements (10)
- # aws (2)
- # beginners (27)
- # boot (3)
- # cbus (4)
- # cider (1)
- # clara (6)
- # cljs-dev (3)
- # cljsrn (14)
- # clojure (98)
- # clojure-boston (1)
- # clojure-brasil (1)
- # clojure-czech (3)
- # clojure-dusseldorf (11)
- # clojure-greece (3)
- # clojure-japan (3)
- # clojure-korea (1)
- # clojure-russia (138)
- # clojure-uk (11)
- # clojurescript (76)
- # component (2)
- # core-matrix (1)
- # cursive (25)
- # data-science (3)
- # devcards (1)
- # euroclojure (4)
- # events (3)
- # funcool (1)
- # hoplon (219)
- # immutant (40)
- # juxt (8)
- # leiningen (1)
- # off-topic (34)
- # om (148)
- # onyx (10)
- # overtone (2)
- # proton (1)
- # re-frame (8)
- # reagent (3)
- # ring-swagger (5)
- # spacemacs (17)
- # untangled (47)
- # yada (19)
if anybody is interested in a relatively simple PR, that would be a good one. the keys that we use in the default reconciler config should definitely not be overwritten
@ethangracer: thanks for the reply, actually I found out that my problem wasn't related to that, I fixed with something else
although, I agree with you about the reconciler options, having then being configurable is a must
@wilkerlucio: There is no problem, in principle, with letting you send extra args, but realize we've provided stuff for: - Parser - Merging - Networking
and none of that should be touched. If you have specific configuration options you want access to, would be willing to make them available if they make sense. It is important to understand that a lot of the stuff you can configure in Om is configured to "just work" correctly...e.g. tempid remapping is fixed...deep merge and attribute stomping....lots of stuff.
@wilkerlucio: You don't need to set id-key
. Tempids "just work". We've fixed them. Just return a {:tempids {}}
remap from you server-side action
...which is a touch-up from Om as well...they'll automatically get sent back and merged properly
The whole point of Untangled is that you should not have to configure things like the id-key, merge behavior, etc.
@tony.kay: thanks, one case that I'm still missing configuration options is about the logger, I would like to disable it
@wilkerlucio: it is currently broken on the public repo, but the untangled.client.logging
namespace has a set-level
function that you can use to turn the logging off. Right now it it'll change the logging level appropriately for every level except for off
Call it in your dev user namespace before mounting the app
@ethangracer: cool, but what about the Om itself logging (that happens on transactions), is that going to be disabled as well?
Yes, we just hijack om's logger and use it ourselves 😄
So if you turn logging off, om stops logging too
thanks for the clarification
I’m watching Tony Kay’s presentation but don’t understand how you can eliminate query params. If I want to load the fifth page of comments, how is that accomplished without a query param?
@joshg let’s say you have a list of 25 items, and you want to show them 5 at a time
your database will have idents that look like [:item/by-id 1] [:item/by-id 2] …
so you set up your UI to load initially and only use the first 5 idents
then when the user clicks the link to switch to page 5, you just swap out the idents in the app state that belong on page 5
i.e. 20 - 25
then you load them from the server
if they don’t exist at all, i guess don’t show a link to page 5?
or you could load the first page as one load, and immediately load all the other pages. just don’t show them immediately
e.g. (app/load page-1) — render page 1 — (app/load remaining-pages)
also, changing pages is just a UI concern, so that doesn’t require a trip to the server
so even if you load each page one at a time, it’s only one trip per page
totally depends on your implementation
you get to decide how you want to do that
Assuming that the cost to preload all results is too high, the way to load page 20 would be to request the idents from the server and then swap them, which will load those idents?
@joshg you could load a map like this: {:list/page 1 :list/total-pages 3 :list/items [...]}
since Untangled use explicitly commands to load the data, you can send the current page to load via a param, the first load would always use page 1, and the others would be sent
with the info on that map you can figure if there is a next page
then you could use something like: (df/load-data reconciler [{:some-list [:list/page :list/total-pages {:list/items (om/get-query ItemsComp)} ]}] :params {:list/page 2})
that makes sense?
Yes, I think so. That seems like cleaner solution that would support more traditional paging queries.
Thanks @ethangracer and @wilkerlucio for your help
welcome!
no problem