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
Make sure to either include the task in the docker image itself or make sure that the mix task gets called once the server starts up... when the app is deployed it could "install-adaptors" and "install-adaptor-icons".
Icon location
All adaptors have icon files in their /adaptors/packages/<adaptor-name>/assets/square.png folder. (at the time of writing these are not bundled into the package).
Other thoughts for icon loading (later maybe?)
Images can be loaded from jsdelivr. We can use it like a CDN and load the image files directly - a bit like how we load typescript files for the adaptor docs.
We probably want a server-side proxy for this, to enable caching and prevent cross-site requests.
Alternatively, we may want to consider loading icons from github (which probably doesn't allow us to use version control)
Icon format
Adaptors should provide square and circle icons.
Ideally all adaptor icons would be provided as SVG files, because we can scale and, if necessary, colour them.
Should we also support other image formats? This will make image loading harder. I suppose we could add a non-standard property to package.json to point to the icon file (but this means we need to make two requests to load the icon). I'd prefer to just be strict on SVGs.
Missing icons
Assuming we want to version icons (and we may not), old adaptors won't have an icon file.
If an icon isn't found for the current version, we should try and load an icon from @latest before falling back to just using the adaptor name.
Offline usage
We have a requirement for Lightning to run offline, in which case it can't call out for adaptor icons.
If we have a server-side proxy and cache, we could provide a script to pre-load the cache with icons for some adaptors.
The text was updated successfully, but these errors were encountered:
install-adaptor-icons mix task that loads them locally (like install-adaptors or install-schemas)
add a process that pre-seeds a list of available images for a given adaptorName (AdaptorService/ex-cache/new gen server?) - this second part needs more detail. first lets target building the icons into the docker image
The current design for the Workflow Diagram is to include an icon on each node to represent the adaptor.
https://github.com/OpenFn/Lightning/blob/main/assets/js/workflow-diagram/components/adaptor-icons.tsx
install-adaptor-icons
mix task.Icon location
All adaptors have icon files in their
/adaptors/packages/<adaptor-name>/assets/square.png
folder. (at the time of writing these are not bundled into the package).Other thoughts for icon loading (later maybe?)
Images can be loaded from
jsdelivr
. We can use it like a CDN and load the image files directly - a bit like how we load typescript files for the adaptor docs.We probably want a server-side proxy for this, to enable caching and prevent cross-site requests.
Alternatively, we may want to consider loading icons from github (which probably doesn't allow us to use version control)
Icon format
Adaptors should provide square and circle icons.
Ideally all adaptor icons would be provided as SVG files, because we can scale and, if necessary, colour them.
Should we also support other image formats? This will make image loading harder. I suppose we could add a non-standard property to package.json to point to the icon file (but this means we need to make two requests to load the icon). I'd prefer to just be strict on SVGs.
Missing icons
Assuming we want to version icons (and we may not), old adaptors won't have an icon file.
If an icon isn't found for the current version, we should try and load an icon from @latest before falling back to just using the adaptor name.
Offline usage
We have a requirement for Lightning to run offline, in which case it can't call out for adaptor icons.
If we have a server-side proxy and cache, we could provide a script to pre-load the cache with icons for some adaptors.
The text was updated successfully, but these errors were encountered: