Skip to content

Rename cmap_mode in image viewer to color_mode for consistency#2569

Draft
astrofrog wants to merge 2 commits intoglue-viz:mainfrom
astrofrog:rename-cmap-mode
Draft

Rename cmap_mode in image viewer to color_mode for consistency#2569
astrofrog wants to merge 2 commits intoglue-viz:mainfrom
astrofrog:rename-cmap-mode

Conversation

@astrofrog
Copy link
Copy Markdown
Member

This is testing out a new feature added in echo to be able to have aliases for callback properties. For now this just changes the property without changing all the instances of using cmap_mode to check that the alias does indeed work.

The 2D scatter mode and glue-wwt both use color_mode, and I think that name makes more sense since the choice is between fixed color and cmap.

cc @Carifio24

@astrofrog
Copy link
Copy Markdown
Member Author

@Carifio24 - does glue-ar depend on this property? If so, could you test this PR out with the latest developer version of echo and glue-ar to make sure everything is working well on that side?

@Carifio24
Copy link
Copy Markdown
Member

@astrofrog glue-ar is only concerned with the 3D viewers, so it won't be affected by this unless the 3D scatter state inherits from this one.

glue-plotly probably does though, so I could use that for testing this

@astrofrog
Copy link
Copy Markdown
Member Author

@Carifio24 - that'd be great, could you confirm if glue-ar works fine with this?

@Carifio24
Copy link
Copy Markdown
Member

Carifio24 commented Feb 10, 2026

@astrofrog I ran the glue-plotly test suite with this PR and dev echo, and it passed fine! So at that level I think this is okay

However, I also tried opening up glue-qt in the same environment. The application opens fine, but the layer options panel doesn't open. The glue terminal gives an error about the C++ combo box being deleted, but the issue ultimately comes from here

I can confirm that if I replace that line with (kinda gross, maybe there's a cleaner check?)

type_prop = getattr(type(instance), prop)
        if not (isinstance(type_prop, SelectionCallbackProperty) or (isinstance(type_prop, CallbackPropertyAlias) and isinstance(type_prop._target_property, SelectionCallbackProperty))):

then the panel will open, so we might need to make checks of this sort in the echo connection classes.

@astrofrog
Copy link
Copy Markdown
Member Author

@Carifio24 I think the Qt issue will be fixed in echo 0.12.1 (building right now)

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.

2 participants