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

Inspector : Make handling of downstream overrides consistent #6178

Merged
merged 3 commits into from
Jan 21, 2025

Conversation

johnhaddon
Copy link
Member

We were already allowing edits in a nominated EditScope even when there was a downstream override that would prevent you from seeing the result. This was communicated in the UI by an orange "overridden" background colour in the inspector cell, and a warning message in the editing popup window. But in "Source" mode we made no such allowance, meaning that you couldn't make an edit at source if it was overridden downstream, and the UI didn't even show you that it was overridden downstream. There was no background colour and a spurious message about the target not being in the history.

We now treat "Source" mode the same as EditScope mode, allowing edits at source even when overridden downstream. Along with that the UI now also shows the overridden status in the background colour and shows the appropriate warning when editing.

@tomc-cinesite, if you have any bandwidth you'd be welcome to take a look at this. Although as I explained just now, I think changes in between the Tom-era EditScopes and the current setup mean that there's a good reason we didn't do this originally, but must do it now.

@johnhaddon johnhaddon self-assigned this Dec 10, 2024
@johnhaddon johnhaddon changed the base branch from main to 1.5_maintenance December 10, 2024 15:18
@johnhaddon
Copy link
Member Author

Would be good to get some feedback on this @murraystevenson.

@johnhaddon
Copy link
Member Author

Are we good to merge this now that 1.5.3 is out?

Copy link
Contributor

@murraystevenson murraystevenson left a comment

Choose a reason for hiding this comment

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

Thanks John! With 1.5.3.0 released now is a good time to merge. While this is a change in behaviour, it is logical and the end result is more consistent and fits better with the previous change from "None" -> "Source".

This change does highlight a couple of interactions where the user is able to make edits to an upstream plug with downstream overrides with little direct feedback of the change they're making to the upstream plug as they're only ever seeing the value of the downstream override - namely InspectorColumn's editing of bools and the LightTool in general. These issues aren't new, just made a little more apparent with this change to "Source" editing, so I'm happy for this to be merged and we can consider those separately along with making our warnings a bit more visible in PlugPopup...

We were already allowing edits in a nominated EditScope even when there was a downstream override that would prevent you from seeing the result. This was communicated in the UI by an orange "overridden" background colour in the inspector cell, and a warning message in the editing popup window. But in "Source" mode we made no such allowance, meaning that you couldn't make an edit at source if it was overridden downstream, and the UI didn't even show you that it was overridden downstream. There was no background colour and a spurious message about the target not being in the history.

We now treat "Source" mode the same as EditScope mode, allowing edits at source even when overridden downstream. Along with that the UI now also shows the overridden status in the background colour and shows the appropriate warning when editing.

This commit bundles a couple of other things which might ideally have been separate commits, but which arose naturally while figuring out the implementation :

- Consolidated some member data into a single `Result::m_editors` struct. This encourages everything to be initialised together, making the data flow a little clearer, and using `std::optional` to make it unambiguous whether we have initialised yet or not.
- Adjusted the failure messages when an attempt is made to disabled a non-existent edit. Instead of directing the user to change edit scope and disabled a _different_ edit, we now just explain that there is no edit to disable.

Fixes GafferHQ#6172.
@johnhaddon johnhaddon merged commit f1380ea into GafferHQ:1.5_maintenance Jan 21, 2025
5 checks passed
@johnhaddon
Copy link
Member Author

Thanks Murray - rebased and merged.

@johnhaddon johnhaddon deleted the inspectorFixes branch January 21, 2025 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Pending release
Development

Successfully merging this pull request may close these issues.

2 participants