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

Open
wants to merge 3 commits into
base: 1.5_maintenance
Choose a base branch
from

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
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Pending Review
Development

Successfully merging this pull request may close these issues.

1 participant