From 0fdb9cf1ad571b7ba10c8dd971c9245691906c7e Mon Sep 17 00:00:00 2001 From: Alex Sorafumo Date: Mon, 10 Aug 2026 15:42:19 +1000 Subject: [PATCH] feat(place/bookings): add timeline settings for booking panel Expose show_timeline and timeline_position bindings for the booking panel timeline view (PPT-2570). Co-Authored-By: Claude Fable 5 --- drivers/place/bookings.cr | 14 ++++++++++---- drivers/place/bookings_spec.cr | 3 +++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/place/bookings.cr b/drivers/place/bookings.cr index 5510ceeb899..f483ec054bd 100644 --- a/drivers/place/bookings.cr +++ b/drivers/place/bookings.cr @@ -42,10 +42,13 @@ class Place::Bookings < PlaceOS::Driver room_image: "https://domain.com/room_image.svg", _sensor_mac: "device-mac", - show_tentative_meetings: false, - hide_meeting_details: false, - hide_meeting_title: false, - enable_end_meeting_button: false, + show_tentative_meetings: false, + hide_meeting_details: false, + hide_meeting_title: false, + enable_end_meeting_button: false, + show_timeline: false, + # one of: left, right, bottom, floating-left, floating-bottom + timeline_position: "bottom", max_user_search_results: 20, poll_x_seconds_after_booking: 2, @@ -195,6 +198,9 @@ class Place::Bookings < PlaceOS::Driver self[:max_duration] = setting?(Int32, :max_duration) || 480 self[:enable_end_meeting_button] = setting?(Bool, :enable_end_meeting_button) || false + + self[:show_timeline] = setting?(Bool, :show_timeline) || false + self[:timeline_position] = setting?(String, :timeline_position) || "bottom" end # This is how we check the rooms status diff --git a/drivers/place/bookings_spec.cr b/drivers/place/bookings_spec.cr index f4001e6fc9a..9737e4d5028 100644 --- a/drivers/place/bookings_spec.cr +++ b/drivers/place/bookings_spec.cr @@ -17,6 +17,9 @@ DriverSpecs.mock_driver "Place::Bookings" do bookings = status[:bookings].as_a bookings.size.should eq(4) + status[:show_timeline].should eq(false) + status[:timeline_position].should eq("bottom") + sleep 200.milliseconds status[:booked].should eq(true)