ynput / ayon-core

Apache License 2.0
28 stars 34 forks source link

Publisher: Avoid confirm button of context change #756

Open iLLiCiTiT opened 1 year ago

iLLiCiTiT commented 1 year ago

Is your feature request related to a problem? Please describe. Avoid requirement of Confirming change of context on instances. When context is changed on instance it is required to confirm the changes -> that does not save the changes yet. Context changes are variant, asset or task change. All of the context changes can change subset name which may also cause that subset name cannot be created. For example if task is unset but subset name tempalte reuqires task it tells user on confirm that the change cannot be made because it would cause invalid instance.

Describe the solution you'd like The subset name update must not happen on save of changes because save of changes can also automatically happen on triggering of publish which is too late. Realtime subset name update on each change would slowdown the work with UI massivelly. Trigger update subset name as deffered callback on any of context value change may be "strange" for user that it can change instance as invalid after he did it and changed selection, he may also meanwhile click on publish/save which has to be captured and probably give user option to resolve the issue.

Possible solution

On change of any context value, disable publish buttons and disable change of selection, until subset names for selection are recaculated. Value change of context values is deffered by ~500ms so it is not blocking UI a lot. When subset name is recalculated, selection is enabled again and publish buttons are enabled (if there are enabled only valid instances).

[cuID:OP-5356]

BigRoy commented 3 months ago

I believe this is still relevant for AYON - yet also have heard less issues about it recently? Should we move it to ayon-core?

@iLLiCiTiT @antirotor

iLLiCiTiT commented 3 months ago

Not sure. I think it is relevant issue, without known solution.