Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publisher: Display overridden vs default values of attributes #982

Conversation

iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Nov 4, 2024

Changelog Description

Visualy display if value of attributes on instance does not match default value.

Additional info

It should also behave correctly on multiselection of instances even if they don't have same default values. But if at least one of selected instances does not use default value it is shown as overriden.

Testing notes:

  1. Open Publisher in host of your choice.
  2. Create an instance (or use existing one).
  3. Change any attribute value.
  4. It should change color of it's label.

Resolves #139

@iLLiCiTiT iLLiCiTiT self-assigned this Nov 4, 2024
@ynbot ynbot added type: enhancement Improvement of existing functionality or minor addition size/S labels Nov 4, 2024
@iLLiCiTiT iLLiCiTiT removed the size/S label Nov 4, 2024
@BigRoy BigRoy changed the title Publisher: Display overriden vs default values of attributes Publisher: Display overridden vs default values of attributes Nov 4, 2024
Copy link
Collaborator

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love this!

image

I do think this should absolutely come with a means to "reset to defaults" so that one could easily learn also that the color hinting means that it's "not at default value". But it does work very nice! Great work. Here's a good reference on revert to defaults.

I would almost go as far as saying it should be part of this PR - but I'm technically fine with it as a follow up PR.

@BigRoy
Copy link
Collaborator

BigRoy commented Nov 4, 2024

@iLLiCiTiT should we somehow dim the color if it's 'disabled'?

image

(This is e.g. after publishing, before reset)

And, the orange color is relatively 'negative'. Should we use the "green" color for saved studio override settings on web frontend instead?
Or the blue color for unsaved overrides?

image

@LiborBatek LiborBatek self-requested a review November 5, 2024 08:19
Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works nicely, the only occasion which throw some traceback is when trying to switch settings for context and Validate outdated containers

Screenshot 2024-11-05 094409

resulting in

// Traceback (most recent call last):
//   File "C:\Work\REPO\ayon-core\client\ayon_core\lib\events.py", line 332, in process_event
//     callback(event)
//   File "c:\Work\REPO\ayon-maya\client\ayon_maya\plugins\create\create_maya_usd.py", line 30, in on_values_changed
//     if instance["creator_identifier"] != self.identifier:
// TypeError: 'NoneType' object is not subscriptable

Not failing but worth mentioning imho....

@BigRoy
Copy link
Collaborator

BigRoy commented Nov 5, 2024

resulting in

// Traceback (most recent call last):
//   File "C:\Work\REPO\ayon-core\client\ayon_core\lib\events.py", line 332, in process_event
//     callback(event)
//   File "c:\Work\REPO\ayon-maya\client\ayon_maya\plugins\create\create_maya_usd.py", line 30, in on_values_changed
//     if instance["creator_identifier"] != self.identifier:
// TypeError: 'NoneType' object is not subscriptable

Not failing but worth mentioning imho....

Thanks - that's actually a bug outside of this PR then. I'll fix it. 👍

@iLLiCiTiT
Copy link
Member Author

iLLiCiTiT commented Nov 5, 2024

should we somehow dim the color if it's 'disabled'?

I've changed color to the "greenish" one, and with that I would keep it even if is disabled. But I don't have strong opinion about this, should be easy to change.

I would almost go as far as saying it should be part of this PR - but I'm technically fine with it as a follow up PR.

Separate issue, this was easy, reverting might be a little but more complicated.

@BigRoy
Copy link
Collaborator

BigRoy commented Nov 5, 2024

Just adding some screenshots with latest changes:

image

image

image

Looking really nice. I'd say, ready to merge - except maybe last debate on the chosen color?


I do wonder whether Green or Orange is the best color pick here. Artist here said "looks like an approved value".

Maybe the blue tint would still be better?

@mkolar @Innders thoughts?

@iLLiCiTiT
Copy link
Member Author

For comparison adding how it would look with the blue color
image

@BigRoy
Copy link
Collaborator

BigRoy commented Nov 5, 2024

Yes - blue is much better!

image

Ready for me. 🚀

@iLLiCiTiT
Copy link
Member Author

I like blue the most.

@iLLiCiTiT iLLiCiTiT merged commit 9fbc08d into develop Nov 5, 2024
1 check passed
@iLLiCiTiT iLLiCiTiT deleted the enhancement/139-enhancement-display-overriden-vs-default-values-of-attributes-in-publisher-ui branch November 5, 2024 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvement of existing functionality or minor addition
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Enhancement: Display overriden vs. default values of attributes in publisher UI
4 participants