Open BigRoy opened 4 years ago
For easier backwards compatibility I would say on = "warning"
would be best.
Users can always subclass to define the same action for failed
and warning
.
Yeah, agreed with Toke, and otherwise this looks good. On warning means on warning, not error.
Issue
The Action defines a couple of specific
on
states of when it can be triggered, likefailed
andprocessed
. However it lacks the ability to be shown only when (at least) warnings have occurred.This would be relevant visually for Pyblish-QML and Pyblish-Lite so for now I added this to pyblish-base as it also relates to the pyblish documentation itself.
Discussion
The question of course would be whether
on = "warning"
would also be valid whenever no warning was logged but an error did occur. As if the 'warning' level is the minimum level of verbosity for it to be shown, or whether it should be an exact match. In the case of only an exact match it should then still be skipped and only show whenever at least one warning was logged. That's up for discussion here.Note that there's currently no state that combines to different states, e.g.
warning+failed
. The problem at hand might also be solved differently, e.g. having a state likeon="custom"
that defines a method on the action like: