ripe-tech / ripe-sdk

The public Javascript SDK for RIPE Core
https://www.platforme.com
Apache License 2.0
8 stars 4 forks source link

Calling config(), setParts() and setPart() now cascades options to configurators #265

Closed veryprofessionaldodo closed 3 years ago

veryprofessionaldodo commented 3 years ago
- -
Issue None
Dependencies None
Decisions Below

When the specified functions are called, they call an update, with a specified reason. However, the options which were passed for the functions are not passed on in the update, so a configurator has no way of reading extra information, such as the duration of any event, for example. This caused problems when attempting to use CSR as an alternative for PRC to create static images. When changing a configuration, a crossfade event is triggered, in which the CSR seamlessly transitions from one state to the next. For the use case of the issue, we needed the crossfade to be instantaneous, so as to generate a valid frame as soon as possible. Since the functions did not cascade the options, there was no way to explicitly tell the duration (despite the CSR being able to handle the parameter correctly).

This PR enables this feature, so that we can explicitly call options with duration, which are passed onto the configurator to better deal with this specific issue.

ripe-tobias-bot[bot] commented 3 years ago

Woof, Woof!

Thank you for submitting the "Calling config() now cascades options to configurators" pull request 😎.

Please do not forget to review our internal guidelines:

Engaging in the development process in the best possible way helps it being efficient and fast.

Your friend, Tobias (Platforme's mascot)

Tobias Bot
gcandal commented 3 years ago

@veryprofessionaldodo how is ConfiguratorPrc able to handle this scenario?

veryprofessionaldodo commented 3 years ago

If it is regarding changing the model itself, if I understand the code correctly, the brand and model are passed as mandatory parameters to the config function, with only the options parameter being optional. The update function that is called (that the configurators also use), has explicit parameters that do not take into account any extra information that may be passed through the config.

gcandal commented 3 years ago