MareoRaft/calendar

'waiting' message while waiting for events

MareoRaft opened this issue · 5 comments

Sometimes it takes google a long time to deliver the events (or maybe another issue?). In the meantime, the calendar should somehow indicate that the events are not yet populated.

The latest commit (5e45868) resolves this. It can be further customized if anyone requests specific behavior for the status indicator.

Currently, the behavior is that "Loading" appears when the page loads. Immediately after the events are populated, and only in the case where there exists at least 1 event, the "Loading" sign disappears.

I would like to change it so the server caches the events. When a request comes, it sends the most up-to-date events along with the time-of-update. The server will routinely update the events (maybe every 5 minutes) and when somebody calls the page, it can also trigger the server to update the events, so that the next time they reload, they hopefully will get the newest stuff.

On the user side, "Loading" will be replaced by "Last updated --datetime--"

This is now good, with the exception that I want the status to be truncated when the date is today. For example, it need not say "Tuesday July 3 2:00 PM" when that is today. Rather, in that case, it can just say "2:00 PM".

Issue persists. Example:

  1. I go to page
  2. It says "loading", but doesn't load even after 15 seconds
  3. I reload page twice
  4. It gets evens and says "last update 1 month ago" or similar
  5. I reload again
  6. It gets events and says "last updated 1 minute ago"

Now we have a daemon that periodically fetches events from google and stores them in a database. The server simply fetches the events from the database.