w3c / wot-marketing

Web of Things (WoT) Marketing
https://www.w3.org/WoT/
Other
13 stars 18 forks source link

W3C Calendar with fullcalendar library #420

Closed danielpeintner closed 3 months ago

danielpeintner commented 1 year ago

TODOs:

ISSUES:

fixes https://github.com/w3c/wot-marketing/issues/268

netlify[bot] commented 1 year ago

Deploy Preview for wot-marketing ready!

Name Link
Latest commit bb59156d59fff97f144b7166c4327c8a80c77c15
Latest deploy log https://app.netlify.com/sites/wot-marketing/deploys/6478370ce6d9a10007281afc
Deploy Preview https://deploy-preview-420--wot-marketing.netlify.app/activities/meetings
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

egekorkan commented 1 year ago

This is actually pretty good for a first try. I agree with the improvements above. Also not showing the useless days (Friday, Saturday, Sunday) and useless hours (where there are no meetings) would be nice improvements that can be done in another PR

danielpeintner commented 1 year ago

Also not showing the useless days (Friday, Saturday, Sunday)

Partially done. It does no longer show weekends

useless hours (where there are no meetings) would be nice improvements

This, I think, is hard to do since changing the timezone makes other hours useful et cetera

danielpeintner commented 1 year ago

There is somehow an issue with ICS and the combination of fullcalendar&timezones.

There are simple examples like https://fullcalendar.io/docs/timeZone-demo

Unfortunately.. this does NOT work with ICS files.. like we use now

            events: {
                url: 'localCopy.ics',
                // url: 'https://www.w3.org/groups/ig/wot/calendar/export',
                format: 'ics'
            },

Once I change it to something like the following it does work

            events: [
                {
                  title  : 'event3',
                  start  : '2023-05-31T12:30:00',
                  end    : '2023-05-31T14:30:00',
                  allDay : false // will make the time show
                }

So either we find the reason for it or we need to parse the ICS file on our own... which wouldn't be an issue since we have https://cdnjs.cloudflare.com/ajax/libs/ical.js/1.5.0/ical.min.js but we also need to convert it to the format fullcalendar is looking for...

Any ideas/proposals...

egekorkan commented 1 year ago

but we also need to convert it to the format fullcalendar is looking for...

I think that the library you have used before (https://gitlab.nomagic.uk/popi/js_calendar_from_ics/-/tree/master/) is doing exactly that no?

danielpeintner commented 1 year ago

I think that the library you have used before (https://gitlab.nomagic.uk/popi/js_calendar_from_ics/-/tree/master/) is doing exactly that no?

Maybe, did not look into it more closely... the library we are using (https://cdnjs.cloudflare.com/ajax/libs/ical.js/1.5.0/ical.js) does also something along these lines but I guess it is better if we can rely on the library. Hence I opened https://github.com/fullcalendar/fullcalendar/issues/7364

For the time being I think we can also have a simple solution for now.

egekorkan commented 1 year ago

Call of 06.06:

egekorkan commented 1 year ago

Call of 13.06: Let's wait 2 weeks to see any progress on the abovementioned issue. Otherwise, we can switch to https://gitlab.nomagic.uk/popi/js_calendar_from_ics/-/tree/master/ and do the timezone changes before passing it to the fullcalendar.

egekorkan commented 1 year ago

Call of 11.07: @danielpeintner will try with the js_calendar_from_ics from above. If that works, no manual timezone conversion is needed. https://gist.github.com/danielpeintner/c2a744aa2c37574d7e2e16686e64f84d can be used as the starting point.

danielpeintner commented 1 year ago

I quickly looked into the library and I think it works somehow.. anyhow.. the library seems to have issues with timezone again 🤷‍♂️

https://gitlab.nomagic.uk/popi/js_calendar_from_ics/-/blob/master/js/ical_fullcalendar.js#L10-13

egekorkan commented 1 year ago

Call of 18.07:

egekorkan commented 3 months ago

Now fixed via #495