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

Allow unloaded channels to be enabled #179

Merged
merged 1 commit into from
Jan 9, 2024
Merged

Conversation

frasercl
Copy link
Contributor

@frasercl frasercl commented Jan 9, 2024

Quick fix: currently, channel settings are not updated on channels that are never loaded. When allen-cell-animated/volume-viewer#173 is published, disabled channels may never be loaded when the user moves to a new time point. Currently, this would cause these channels to be stuck in the disabled state. This change allows the enabled/disabled setting to be changed on unloaded channels.

@frasercl frasercl requested a review from a team as a code owner January 9, 2024 00:56
@frasercl frasercl requested review from toloudis, meganrm, blairlyons, interim17, ShrimpCryptid and ascibisz and removed request for a team January 9, 2024 00:56
@@ -31,18 +31,19 @@ const ChannelUpdater: React.FC<ChannelUpdaterProps> = ({ index, channelState, vi
}, [...deps, image, version]);
};

useImageEffect(
Copy link
Contributor

@ShrimpCryptid ShrimpCryptid Jan 9, 2024

Choose a reason for hiding this comment

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

Quick question because I'm not as familiar with this repo, what's different between useImageEffect and a useEffect dependent on image?

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, answered my own question. useImageEffect checks for changes to the image but only executes the body if the image is loaded.

@frasercl frasercl merged commit 25d5c07 into main Jan 9, 2024
3 checks passed
@frasercl frasercl deleted the fix/update-disabled-channels branch January 9, 2024 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants