Budibase / budibase

Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
https://budibase.com
Other
22.47k stars 1.55k forks source link

[ Client ] [ Block Component ] - Show Error when unable to instantiate component #12770

Open poirazis opened 9 months ago

poirazis commented 9 months ago

When a Block Component is instructed to instantiate an unavailable component , to throw an error, or show a message.

The Block Component, is also unable to instantiate components that maybe installed, but havent been placed on any screen yet as the plugin isnt included.

linear[bot] commented 9 months ago

BUDI-7894 [ Client ] [ Block Component ] - Show Error when unable to instantiate component

andz-bb commented 9 months ago

@poirazis is there a way to do this programmatically within your block code, i.e. if a required child is not present you can throw an error? I don't know if this is in scope for plugin development otherwise.

poirazis commented 9 months ago

Hey @andz-bb yes, it is possible to do these checks programmatically ( one can lookup componentStore ) to see what plugins are installed.

What i didnt find a way to check is if the plugin has been instantiated at least once. This is the case i couldnt find a way to check for. if the plugin is installed, but has never been placed on a screen so the plugin isnt served / included.