issue-09 #98
Labels
No labels
first-task
needs/docs
needs/research
needs/upstream
type/bug
type/external
type/feature
type/refactor
urgency
high
urgency
immediate
urgency
low
urgency
medium
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ScottyLabs/study!98
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-09"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Users can now filter the Group Finder by their Google Calendar availability. With "Only times I'm free" turned on, groups that overlap a busy time on the user's primary calendar are hidden. The Profile page shows a small Google Calendar connection status with a Connect link.
How it works:
A new endpoint, GET /api/v1/calendar/busy, calls Google's FreeBusy API on the server with the existing connection and returns only busy time ranges. It uses the calendar.freebusy scope that we already request.
A group counts as one hour from its start time, because groups have no end time and the Calendar events we create for them are one hour long. A group that only touches a busy time at its edge stays visible. Groups the user joined are never hidden.
To protect our Google quota from abuse, the server allows 10 Google calls per user per minute and 1,000 overall, and reuses a user's last result for 60 seconds. Ranges must start now or later and cover at most 60 days. The counters are in memory, which is correct because Kennel runs one app instance per environment.
I chose a live lookup over importing and storing busy times. It is always current, needs no schema change, and stores no calendar data.
Related Issue
N/A
Closes #9
Type of change
New Feature
Testing
Screenshots/Recordings
Checklist
Kennel Deployments
Last updated for commit
7291caf.Why is there a separate button on the profile page to connect Google Calendar? Why isn't that just automatically triggered if a user checks the box and calendar is not connected? What if a user has already made a group (which triggers a google calendar connection to create the event)? Will that connection allow filtering, or do they still have to connect again? The goal should be fewer clicks for users, so there shouldn't be any connection on the profile. Instead, clicking the filter checkbox should automatically check if google calendar has been connected before (either by making a group or using the filter previously), and if so, should immediately filter, if not, should trigger the connection popup.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.