ayon-core icon indicating copy to clipboard operation
ayon-core copied to clipboard

Enhancement: Allow OptionalPyblishPluginMixin to apply a tooltip to the checkbox

Open BigRoy opened this issue 1 year ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues.

Please describe the feature you have in mind and explain what the current shortcomings are?

The OptionalPyblishPluginMixin makes it more trivial to implement optional checkboxes in the new publisher UI however, it'll always show the plug-in label as the checkbox label and generates no tooltip which can make it quite unclear what the checkbox does.

How would you imagine the implementation of the feature?

Implement the following methods on the mixin:

def get_optional_label(self):
    return self.label

def get_optional_tooltip(self):
    return None

These could then be overridden by child classes to e.g. provide a custom tooltip or label for the optional checkbox.

Are there any labels you wish to add?

  • [X] I have added the relevant labels to the enhancement request.

Describe alternatives you've considered:

The other approach would be to not use the OptionalPyblishPluginMixin and then generate the attribute definitions manually so you can set the labels and tooltips as wanted.

Additional context:

No response

[cuID:OP-6799]

BigRoy avatar Sep 11 '23 11:09 BigRoy