We have a SmartClient plugin that populates the timeline with markers that indicate when a sound level exceeds a threshold. The user can adjust this threshold at runtime, and we send a SmartClient RefreshTimelineRequest to cause the timeline ribbons to be re-fetched.
This stopped working properly in SmartClient 2023R1. Now the timeline is only refreshed if the user clicks a different SmartClient view after the RefreshTimelineRequest message has been sent. By adding trace statements to the TimelineSequenceSource, I see that StartGetSequences is not being called immediately after a RefreshTimelineRequest, so I think this is a bug in SmartClient
I’ve created a minimally reproducible example by modifying the TimelineViewItem in the PluginSamples repo, adding a slider which adjusts the length of a TimelineDataArea and sends a RefreshTimelineRequest. In SC 2022, the timeline ribbons immediately change when the slider is moved. In 2023R1 and later, the ribbons only change after first moving the slider, then clicking a different (empty) ViewItem.
I cannot say how this have been able to work previously, as there is a couple of issues with the provided implementation:
As stated in the documentation, RefreshTimelineRequest message must contain the Id of the timeline source to refresh in the relatedFQID parameter
You cannot replace the list of TimeLineSequenceSources exposed by the property on the ViewItemManager on the fly. Once it has been read by the Smart Client it will keep a reference to those.
I made the following change to the RibbonLengthInSeconds property on the provided sample (and added small property for setting the value on the ribbon source as well) and it works fine:
public double RibbonLengthInSeconds { set
{
var ribbonSource = (\_timelineSequenceSources.First() as TimelineRibbonSource);
ribbonSource.RibbonLengthInSeconds = value;
EnvironmentManager.Instance.PostMessage(new Message(MessageId.SmartClient.RefreshTimelineRequest, new FQID(EnvironmentManager.Instance.CurrentSite.ServerId, Guid.Empty, [ribbonSource.Id](https://ribbonSource.Id), [FolderType.No](https://FolderType.No), Guid.Empty)));
Debug.WriteLine($"set ribbon length to {value} seconds and sent RefreshTimelineRequest");
}
}