Events Plugin šŸ“†

Fixed: https://github.com/angusmcleod/discourse-events/commit/f899310158984f18619cc7783c9abef53cb59126

3 Likes

Thanks @angus, that fixed the problem I was seeing

2 Likes

Thanks a lot! (i should have looked at the documentation.)

1 Like

@tobiaseigen @ChrisBeach Iā€™ve fine-tuned the event display to:

  • handle all the edge cases for all-day event blocks;
  • add titles to the start of each row for multi-day / multi-row events
  • Allow multi-day titles to take multiple cells;
  • Clearly delineate the start and end of multi-day events when multi-day events are back to back.

Yeah, one is US/Pacific, one is Canada/Pacific and one is US/Pacific-New (apparently itā€™s different from US/Pacific). I tried to do a bit of formatting on the timezone labels as some can be a bit long (i.e. remove the country), but itā€™s hard to come up with good formatting rules as timezones donā€™t have really have any universal conventions. Iā€™ve removed the formatting for now, so youā€™ll just see the full labels.

Screenshot%20at%20Feb%2021%2010-49-55

4 Likes

awesome! looking good. the ā€œselect a timezoneā€ issue is pretty minor.

I had a poke around in your sandbox and noticed a few oddities. See screenshot. one multiday event goes off the right side of the screen. The ā€œx moreā€ is showing on a day when there are only two events. One of those is pushed down on the day as well. I can see what youā€™re doing there but it looks weird - wonder how google calendar handles that use case?

I also added an event myself to the calendar and itā€™s not showing up.

3 Likes

Thanks again :slight_smile:

Arrangement of events

These are minor style calculation issues (fixed).

In most cases, the scenario youā€™re referring to here:

is necessary (the same is true in Google Calendar). This mostly happens because there are overlapping all-day events that end on different days. The plugin tries to ā€˜fill inā€™ when possible, but it canā€™t in a scenario like this.

If the hidden all-day event started on the 23rd, all of the events fit, e.g.

Itā€™s a bit like a jigsaw puzzle.

There was one edge case which was handled differently in this plugin from Google Calendar, which is when there are overlapping all-day events that end on different days, causing a gap on a day in which there is also a normal event. In that case Google Calendar will ā€˜fill inā€™ the normal event.

Screenshot%20at%20Feb%2022%2009-48-26

Iā€™ve updated the calendar sort logic to handle this case (see ā€˜Blacklightā€™ in above screenshots). Iā€™ve also increased the height of day cells to handle 4 event rows and made some slight adjustments to the ā€˜x moreā€™ style.

Routing and API

Iā€™ve added proper routing to the calendar, so that only the topics with events for the date range displayed are loaded at one time.

This also means that there is now an API for retrieving an arbitrary range of events created with this plugin

  • domain.com/calendar?start=start_date&end=end_date will retrieve events in all categories within the specified range

  • domain.com/c/category_slug/l/calendar?start=start_date&end=end_date will retrieve events in the specified category within the specified range

  • start and end dates are ISO86 format: YYYY-MM-DD

10 Likes

For ā€œnormal discourse categoriesā€ i can append an ā€œ.rssā€ to the url, in order to receive an RSS formatted feed.

with ā€œ/callendar.rssā€ or ā€œ/agenda.rssā€ this does not seem to work.
At least i just receive an empty reply. (not even a 404)

Is there different way to obtain that?

1 Like

This plugin is awesome!

Any chances to convert this plugin to official and enjoy it in Discourse hosted instances?

5 Likes

Iā€™d like to see this for the benefit of self-hosted instances too. The events plugin is really useful and universal. Making it an official plugin would reduce the risk of breaking changes between core and plugin. Obviously itā€™s up to the Discourse team as the more official plugins they support, the less agility they have to improve core.

4 Likes

Minor bug: when clicking on a day in the calendar (mobile view), the calendar may switch to a different month (which is fine), but when this happens, the day selection highlight is lost.

Day highlight (blue circle) showing:

Tapped on the 1st March and now no day highlight showing (same with subsequent taps on days in March)

2 Likes

Thanks @ChrisBeach, Iā€™ll fix this in the next day or so.

3 Likes

Youā€™ll have to ask @sam.

Iā€™ve added rss feeds to the site-wide /calendar and /agenda routes, e.g.

https://discourse.angusmcleod.com.au/calendar.rss
https://discourse.angusmcleod.com.au/agenda.rss

The calendar feed accepts start and end query parameters.

https://github.com/angusmcleod/discourse-events/commit/16fba9491c4a6b22456d7b4d07ee4af4a96efe00

Fixed: https://github.com/angusmcleod/discourse-events/commit/1c6c5bb299901e2edc7a5e965b7eb7bb3f86f842

4 Likes

Thanks a lot, itā€™s highly appreciated!

3 Likes

There seems to be an issue:

when adding ā€œto google callendarā€
the URLā€™s end-date is always ā€œcurrent dateā€ (or posting date?), even if it is ā€œwithout end dateā€.
(despite that current date is wrong value.)

eg. from this event
you get ā€œhttps://calendar.google.com/calendar/r/eventedit?text=03032018+ODDD18+Open+Data+Day+Dsseldorf&dates=20180304T100010Z/20180227T094116Z&details=Event+Details:+forum.freifunk.net/t/03-03-2018-oddd18-open-data-day-duesseldorf/18348&location=Haus+der+UniversitƤt,+14,+Schadowplatz,+Stadtmitte,+Stadtbezirk+1,+DĆ¼sseldorf,+Regierungsbezirk+DĆ¼sseldorf,+Nordrhein-Westfalen,+40212,+Deutschland&sf=true&output=xmlā€

BTW: 2nd small issue: handling of diacritical characters (here: ā€œUmlautsā€ like ā€œĆ¼ā€ are not passed to the URL.

3 Likes

I can choose the end date, but the end date will not be displayed in my topic, only the start date. When you add to the Google Calendar, the title can only recognize English numbers and symbols, but my website is not English - based,so the title is empty.

@adorfer Thanks, Iā€™ll have a look at these issues tomorrow.

@tran Thanks. Iā€™ll have a look at the Google Calendar issue tomorrow. For the end date issue, could you give me some more details and / or an example? I just tested the functionality on my sandbox and itā€™s working fine, see e.g. Late Night Jamming - Events - Pavilion

3 Likes

@angus THX for replying. Amazingļ¼Œthe end day is normally now.

My language is Chinese,title cannot be displayed in Chinese

1 Like

Bug report: I edited a post to add a date, and set it to be ā€œall dayā€

The date was then displayed on the post with a time of ā€œ00:00ā€ and when editing the post again, I noticed the ā€œall dayā€ checkbox was unticked.

4 Likes

@ChrisBeach The all day bug should be fixed now. Let me know how you go.

@adorfer @tran There were a few issues with adding to Google Calendar, some on my side, some weirdness with Google Calendar. Everything should work now.

Also, special characters should work in titles of events imported to Google Calendar now.


7 Likes

@angus The special characters problem still exists.

https://www.uiters.com/t/topic/86

1 Like