All calendar related functionality is provided by the Calendar skill. While you can use all the components that the Calendar skill uses to build your calendaring experience from scratch, it's much faster and more reliable to use the tools Calendar provides.
This is an overview on how the calendar.spruce.bot is built to support robust customization.
- A
CalendarSkillViewController
renders theCalendarViewController
from 'heartwood-view-controllers' - A
CalendarViewController
rendersCalendarEventViewController
's- You can override the view controller an event uses through 'Event Types'
- I cover this in detail below!
- A
CalendarEventViewController
can implementgetToolBeltState()
to take over control of the 'Tool Belt'- You can provide your own tools (cards rendered in the tool belt)
- You can also provide "remote" tools to populate events defined by other skills
- Calendar Event - An object represented in the Calendar Skill and defined in
@sprucelabs/calendar-utils
. In context, sometimes just called "Event".- "Don't forget to click the Calendar Event"
- "There are way too many events in this calendar"
- Repeating Event - Any event with
repeats
set.- "Is that a repeating event?"
- "Configure your repeating event for weekly on Mon, Wed, and Fri"
- Source Event - The "Repeating Event" future events are generated from (never actually returned from api)
- "When updating a repeating event, if they chose 'Update All Events', we actually update the source event"
- "The source event is actually never rendered in the calendar."
- Generated Event - The event generated from the "Source Event". Will have the same
id
as the source event, but with a differentstartDateTimeMs
.- "If we're talking a repeating event, then only generated events are rendered on the calendar."
- Series - All generated events.
- "How many events are in the series?"
- "Technically you'd ask, 'How many generated events are in the series?', but everyone here knows what you mean, so don't sweat it."
I'm gonna take you through everything right now! But first, lets make sure we have the dependencies we need!
We're gonna need 3 dependencies to continue. 1 development (for testing) and 1 production (for code compiled and sent to Heartwood), and the Calendar skill itself.
yarn add -D @sprucelabs/spruce-calendar-test-utils
yarn add @sprucelabs/spruce-calendar-components
spruce add.dependency
Ok, that was easy, now the question is: