Skip to content

Conversation

@hongquanli
Copy link
Collaborator

Summary

  • Make slider handle width proportional to the number of positions
  • Few positions (e.g., 3 channels) → wider handle (up to 40px)
  • Many positions (e.g., 100 timepoints) → narrower handle (min 8px)
  • Also fixes pytest compatibility with the root __init__.py shim

Test plan

  • Open a dataset with varying dimension sizes
  • Verify sliders with few positions have wider handles
  • Verify sliders with many positions have narrower handles
  • Run pytest tests/ -v - all 112 tests pass

🤖 Generated with Claude Code

hongquanli and others added 2 commits January 16, 2026 13:39
The root __init__.py is a shim for Squid submodule usage that uses
relative imports. When pytest tries to import it directly (not as
a submodule), the relative imports fail.

Fix by wrapping imports in `if __package__:` so they only execute
when used as an actual submodule. Also add explicit pytest config.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Make slider handle width proportional to the number of positions:
- Few positions (e.g., 3 channels) → wider handle (up to 40px)
- Many positions (e.g., 100 timepoints) → narrower handle (min 8px)

This provides better visual feedback about the slider's range.

Implementation extends the existing QLabeledSlider.setRange() monkey
patch to apply dynamic stylesheets based on the range size.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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