-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Batching for content listing tile #56
Comments
If we enable batching for content listing tiles, some questions need to be answered before we can start implementing it:
@datakurre, what's your opinion on that? |
@tmassman I would vote for JS-only version, where batching within tiles has direct urls for the tile view. It should work with pat-contentloader, even without ajax-load. It might even be good for accessibility without JS, because without JS it would open just the listing tile without any confusing surroundings. It would also be fast, because loading only the tile view with AJAX should be fast. My vote for that because tiles should ideally be independent (not relying on being able to access “paren request” somehow). Bookmarking is harder. It would the require pat-contentloader to append something to browser url that it could use later to reload the correct content on load. So that is actually a more generic bookmarkability issue with the patterns Alternative “pure” version could use those prefixed query parameters on main page, but require a new transform that would append batching parameters to tile URLs before tile merge. It would work without AJAX and be bookmarkable, but would also be much slower. |
@datakurre, sounds good. Thanks for your input! |
I disagree. I think its important to keep plones frontend to retain progressive enhancement.
https://www.gov.uk/service-manual/technology/using-progressive-enhancement
but I guess one way to solve that in this case is to have a link which takes you to a page that has the full list on it.
|
That latest option is currently the only easy one. Only clean way to pass information from the render context to tile is querystring and there’s not much space in it (and danger to break tile if cannot handle unexpected parameters). |
@datakurre I see the potential problem but it doesn't seem right to prevent a better UX because of such an internal detail.
|
I agree that URL length might be just a theoretical issue. So, we need is to define a prefixing syntax for passing GET query-parameters from the main requests to the tile request. The easiest way would be to limit this support for tiles with ids (which covers all tiles created through Mosaic Editor). Semantically I see it as the same as prefixing HTML forms to allow multiple forms on the same without conflicting fields or actions. So, should
become
or something better? Tile would still not know on which URL it is being rendered (this is a more generic issue with tiles). Of course, ff tile would just render relative URLs starting with Possibly, if the current view is not a default view, tile transform should also pass the name of the current view to tile in some documented query parameter (I recall that viewlet tiles already support viewname parameter for rendering viewlets registered for non default views). |
@datakurre or another idea could be that the tile specifies what params it should be passed and there is some matching that goes on. e.g. the definition of the listing tile includes b_start:int=0 and if that exists in the top level request then its gets replaced. There could be support for a **args equivalent to get everything. A bit like python functions. Not sure if this makes ESI much more complicated though. |
on 2nd thoughts that is a bit of security issue as it allows anyone to change a tiles params. Maybe they need to be at the end, or have a special value? e.g. |
It seems that content listing doesn't provide batching by default.
It should! doesn'it?
There's missing "Item count" like in collections.
The text was updated successfully, but these errors were encountered: