Closed petschki closed 1 year ago
Looks really good. I am interested. Can I review the draft? A local test yesterday was ok for Plone 6 / Python 3.9. Couldn't reproduce the error mentioned in ci test.
Yes, please test it!
Though the start
filter shouldn't default to now()
since one likes to view older events too. And if an end
is in the query it should be used too.
@ksuess instead of duplicating the logic of plone.app.event.browser.event_listing here I suggest to rethink the strategy now. I have a productive site with this branch and since our changes the results gets worse ... the customer wants to display recurring events which have their end in the future and we do not reflect that right now. I'd like to refactor the whole expand_events
boolean to something like use_event_listing_results
and simply lookup the @@event_listing
BrowserView with the whole start-end expanding logic already done ...
@petschki that sounds like a really good plan: support start and end date range.
While refactoring plone.app.event.base.expand_events: Maybe it's worth thinking about supporting RET_MODE_BRAINS. This would allow using custom tile templates as they are, untouched, expecting brains, not objects.
Sure but this is out of scope of this package/PR ... I'd suggest to make a feature issue in plone.app.event
I've refactored this and it works good so far. But there's a bug in plone.app.event which I have to investigate further ... see https://github.com/plone/plone.app.event/issues/347
I would like to see the limit to be applied.
The use case "show events with end date in the next 8 days" fails with displaying too many events back before today. Same use case fails also by displaying "duplicates": event and occurence with same date.
BTW this implementation lacks a rewriting of plone.app.event: _expand_events_start_end needs to generate a range for start and end both. And expand_events needs to regard ranges for both instead of dates.
I think we can move the discussion of event listing specific issues to plone.app.event issue ... when it gets fixed there its fixed here too.
fixes #124