Skip to content

Update ipyvolume viewer to use reference data#520

Open
Carifio24 wants to merge 19 commits intoglue-viz:mainfrom
Carifio24:reference-data
Open

Update ipyvolume viewer to use reference data#520
Carifio24 wants to merge 19 commits intoglue-viz:mainfrom
Carifio24:reference-data

Conversation

@Carifio24
Copy link
Copy Markdown
Member

This PR updates the ipyvolume viewer to use the same viewer-level resolution/fixed resolution buffer scheme used in e.g. glue-vispy-viewers.

The one thing that I'm having trouble with here is the float sliders that control vmin/vmax for each layer. It looks like they should be set to track the min/max data from the layer state, but they keep getting reset to 0/1.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 94.73684% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.20%. Comparing base (3218d36) to head (fcd5f32).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
glue_jupyter/widgets/glue_float_field.py 70.00% 3 Missing ⚠️
glue_jupyter/ipyvolume/volume/layer_artist.py 92.00% 2 Missing ⚠️
...lue_jupyter/ipyvolume/volume/layer_style_widget.py 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #520      +/-   ##
==========================================
- Coverage   79.11%   78.20%   -0.91%     
==========================================
  Files          96       97       +1     
  Lines        6013     6001      -12     
==========================================
- Hits         4757     4693      -64     
- Misses       1256     1308      +52     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Carifio24 Carifio24 marked this pull request as ready for review February 25, 2026 16:18
@Carifio24
Copy link
Copy Markdown
Member Author

I ended up using a small Python wrapper around the float-field widget for setting vmin and vmax instead. This also has the advantage of letting the user set the bounds outside of the data range (maybe someone would want this?) and allowing them to set at whatever precision they need.

@astrofrog
Copy link
Copy Markdown
Member

@Carifio24 - just to check, is this ready for review/testing?

@Carifio24
Copy link
Copy Markdown
Member Author

@astrofrog It is, yes

@Carifio24 Carifio24 requested a review from astrofrog March 16, 2026 19:28
import traitlets


class GlueFloatField(v.VuetifyTemplate):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This currently introduces a vuetify widget in the middle of the ipywidgets options - I think it would be best to either go with an ipywidget or go all in on vuetify in the 3D viewers. If we do the latter, then the existing glue-float-field solves this issue?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed that mixing the widget types is not ideal. I would vote for going all on Vuetify, in which case yeah the existing glue-float-field would work perfectly.

I can update the 3D viewer widget in this PR. I'm thinking makes sense to wait for #529, then rebase this so that any Vuetify template updates are using the new echo scheme, does that seem reasonable?

@Carifio24 Carifio24 marked this pull request as draft March 30, 2026 21:22
@Carifio24
Copy link
Copy Markdown
Member Author

Rebased on top of main to pick up the changes from #529. Marking this as a draft until I finish the relevant 3D viewer widget updates.

@Carifio24 Carifio24 marked this pull request as ready for review March 31, 2026 20:26
@Carifio24
Copy link
Copy Markdown
Member Author

@astrofrog I've updated the 3D viewer widgets to use Vuetify now. I'm having one issue with the 3D scatter widget - I keep getting a warning because resolution is not defined. The template renders fine because the resolution widget is in a v-if block that won't get rendered, just not sure how to avoid the warning.

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