際際滷

際際滷Share a Scribd company logo
111
SMART DATE
Date handling made simple(r)
2
MARTIN
@mandclu
ANDERSON-CLUTZ
3
SMART DATE
4
HISTORY
UI COMPARISON
5
- All Day checkbox
- More natural output for date ranges
EDITOR EXPERIENCE
6
- Crawling a site about to launch, realized the slowest page was
an events archive
PERFORMANCE ISSUE
7
NEED FOR A MODULE
8
Editor UX
Performance
Formatting
9
APPROACH
LEVERAGE CORE
10
- Extend core Date Range field
- Uses an HTML5 datetime picker
- Store data as timestamps
- Native db Datetime has advantages, but 100% custom
- Also not as portable
- Postgres uses timestamps to store dates
- Use existing class and methods
- JS uses timestamps for internal storage too
RECURRING DATES
11
- Stores recurring instances as normal field deltas, so views will
work like normal multivalued fields
- Able to override specific instances
- Reschedule or cancel
- Special formatter for recurring dates
- Show a specific number of
upcoming and/or past instances
- Able to customize text display
or recurrence rule
CALENDAR INTEGRATION
12
- Originally a patch on Fullcalendar Views
- Now a plugin instance
- Drag-and-drop support
- Full support for recurring dates
- Fullcalendar View actively maintained
STARTER KITS
13
- Bundles of configuration to get you up and running quickly
- Install an Event content type and related views
- A great way to try out Smart Date, or jump start your project
- Easiest way to use Smart Date with Fullcalendar View
- Patches welcome!
DEMO TIME!
14
- Editor
- Field config
- Output examples
- Display config
- Smart Date formats
MORE DEMOS!
15
- Recurring Dates
- Formatter
- Calendar
- Starter Kit
16
CHALLENGES
RESOLVED!
17
- No interface in core to translate field config (output format)
- Created config entity type, also makes it reusable
- Views support, especially separate display of start and end
- Custom coded, even allows filtering by duration
- Tokens support
- Use an existing or custom format
- Timezones per event
- Works for core Datetime and Datetime Range fields
COMMUNITY ADOPTION
18
- Blogs
- Newsletters
- Presentations (like this one!)
- Online discussions (Slack, etc)
- Support
COMMUNITY HELP
19
- D7 migration
- D9 compatibility
- Misc fixes
- Drag-and-drop editing in calendar
- Views granularity?
THE PATH FORWARD
20
- Views granularity
- Allowed start, end range per field
- Registration
- Smart(er) date elements in core
ADDRESSING THE PROBLEMS
21
SPEED
Timestamps for
better
performance
FORMAT
Intelligent
formatting of
output,
translatable
EDITOR UX
JS-rich interface
provides app-like
functionality
22
COMMENTS
QQUESTIONS
23
THANKS!

More Related Content

Smart Date - Drupalcamp Colorado 2020

  • 6. - All Day checkbox - More natural output for date ranges EDITOR EXPERIENCE 6
  • 7. - Crawling a site about to launch, realized the slowest page was an events archive PERFORMANCE ISSUE 7
  • 8. NEED FOR A MODULE 8 Editor UX Performance Formatting
  • 10. LEVERAGE CORE 10 - Extend core Date Range field - Uses an HTML5 datetime picker - Store data as timestamps - Native db Datetime has advantages, but 100% custom - Also not as portable - Postgres uses timestamps to store dates - Use existing class and methods - JS uses timestamps for internal storage too
  • 11. RECURRING DATES 11 - Stores recurring instances as normal field deltas, so views will work like normal multivalued fields - Able to override specific instances - Reschedule or cancel - Special formatter for recurring dates - Show a specific number of upcoming and/or past instances - Able to customize text display or recurrence rule
  • 12. CALENDAR INTEGRATION 12 - Originally a patch on Fullcalendar Views - Now a plugin instance - Drag-and-drop support - Full support for recurring dates - Fullcalendar View actively maintained
  • 13. STARTER KITS 13 - Bundles of configuration to get you up and running quickly - Install an Event content type and related views - A great way to try out Smart Date, or jump start your project - Easiest way to use Smart Date with Fullcalendar View - Patches welcome!
  • 14. DEMO TIME! 14 - Editor - Field config - Output examples - Display config - Smart Date formats
  • 15. MORE DEMOS! 15 - Recurring Dates - Formatter - Calendar - Starter Kit
  • 17. RESOLVED! 17 - No interface in core to translate field config (output format) - Created config entity type, also makes it reusable - Views support, especially separate display of start and end - Custom coded, even allows filtering by duration - Tokens support - Use an existing or custom format - Timezones per event - Works for core Datetime and Datetime Range fields
  • 18. COMMUNITY ADOPTION 18 - Blogs - Newsletters - Presentations (like this one!) - Online discussions (Slack, etc) - Support
  • 19. COMMUNITY HELP 19 - D7 migration - D9 compatibility - Misc fixes - Drag-and-drop editing in calendar - Views granularity?
  • 20. THE PATH FORWARD 20 - Views granularity - Allowed start, end range per field - Registration - Smart(er) date elements in core
  • 21. ADDRESSING THE PROBLEMS 21 SPEED Timestamps for better performance FORMAT Intelligent formatting of output, translatable EDITOR UX JS-rich interface provides app-like functionality