You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At some point in the flow, when a service is available (either automatic or user-driven, not sure). A redux event announcing a service has been found is raised:
If an extension is installed (via saga or middleware) it could listen for these events and respond if it implements the service.
function*imageServiceSaga(){yieldtakeEvery('SERVICE_ANNOUNCE',function*({ payload }){if(isImageService(payload)){yieldput({type: 'IMAGE_SERVICE_IMPORT', payload });// other instantiation logic..// Finally let redux know its acceptedyieldput({type: 'SERVICE_ACTIVATED',{payload: {service: payload.service,id: 'my-image-service',label: 'My great image service',}});}});}
This will go back to redux, and allow it to keep track of available extensions, and if they loaded successfully. It also allows redux to expose some methods:
isServiceActive
isServiceExtensionEnabled
enableExtensionService
disabledExtensionService
getServiceExtensions (on resources)
Which will provide a standard model for enabling/disabling them. The extensions can also listen for these events as they get fired and react as needed.
It would be likely that services would expose UI components of some form, or at very least state selectors that can power custom components. This should all fit into this model to allow any custom service to be bootstrapped, but still known to IIIF Redux.
As for end-users creating UIs that use image services:
An idea for supporting services.
At some point in the flow, when a service is available (either automatic or user-driven, not sure). A redux event announcing a service has been found is raised:
If an extension is installed (via saga or middleware) it could listen for these events and respond if it implements the service.
This will go back to redux, and allow it to keep track of available extensions, and if they loaded successfully. It also allows redux to expose some methods:
Which will provide a standard model for enabling/disabling them. The extensions can also listen for these events as they get fired and react as needed.
It would be likely that services would expose UI components of some form, or at very least state selectors that can power custom components. This should all fit into this model to allow any custom service to be bootstrapped, but still known to IIIF Redux.
As for end-users creating UIs that use image services:
How the API could work
With image service maybe looking like this, using the custom selectors:
Although it would be likely that these services would have components themselves that you can simply drop in that provide this functionality.
The text was updated successfully, but these errors were encountered: