Fix Gantt tooltip for single-day events

Show "Geomob Edinburgh (6 May)" instead of "Geomob Edinburgh (6 May–6 May)".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Edward Betts 2026-03-14 11:18:23 +00:00
parent 57054bb1bd
commit e36a326739

View file

@ -484,9 +484,13 @@ def build_conference_timeline(
"width_pct": width_pct, "width_pct": width_pct,
"key": f"{conf['start_date'].isoformat()}|{conf['name']}", "key": f"{conf['start_date'].isoformat()}|{conf['name']}",
"label": ( "label": (
f"{conf['name']}" f"{conf['name']} ({conf['start_date'].strftime('%-d %b')})"
f" ({conf['start_date'].strftime('%-d %b')}" if conf["start_date"] == conf["end_date"]
f"{conf['end_date'].strftime('%-d %b')})" else (
f"{conf['name']}"
f" ({conf['start_date'].strftime('%-d %b')}"
f"{conf['end_date'].strftime('%-d %b')})"
)
), ),
} }
) )