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
When writing the plugin guide, it occurred to me that the current API for printing messages could be improved. Instead of importing these functions:
zabbix_cli.output.console.success
zabbix_cli.output.console.info
zabbix_cli.output.console.warning
zabbix_cli.output.console.error
We could define methods on zabbix_cli.app.app.StatefulApp which provides these functions wherever we have access to the app object. Furthermore, this would let us give the user more control over the styling of these functions by letting us automatically pass in some sort of state wherever these are accessed.
The abstraction is not clear to me yet. We need to figure out if we want to create a rich.console.Console subclass that provides these methods or some sort of thin abstraction class that wraps our existing functions.
The text was updated successfully, but these errors were encountered:
When writing the plugin guide, it occurred to me that the current API for printing messages could be improved. Instead of importing these functions:
zabbix_cli.output.console.success
zabbix_cli.output.console.info
zabbix_cli.output.console.warning
zabbix_cli.output.console.error
We could define methods on
zabbix_cli.app.app.StatefulApp
which provides these functions wherever we have access to the app object. Furthermore, this would let us give the user more control over the styling of these functions by letting us automatically pass in some sort of state wherever these are accessed.So in essence we would go from:
To:
Or:
The abstraction is not clear to me yet. We need to figure out if we want to create a
rich.console.Console
subclass that provides these methods or some sort of thin abstraction class that wraps our existing functions.The text was updated successfully, but these errors were encountered: