Repository navigation
Mapped slider - #361
Mapped slider#361bnorthan wants to merge 5 commits into
Conversation
QLabeledMappedSlider extends QLabeledDoubleSlider so that the slider position is mapped to the value using a log or power curve. "log" gives each decade the same space on the slider. "power" can start at 0 and gives finer control near the minimum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Constructor overloads like the other sliders, with mapping and exponent set by setMapping and setExponent. camelCase private methods, and typing fixes for mypy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #361 +/- ##
==========================================
+ Coverage 84.92% 85.17% +0.25%
==========================================
Files 49 50 +1
Lines 3940 4034 +94
==========================================
+ Hits 3346 3436 +90
- Misses 594 598 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Hey @bnorthan. |
|
We still want this feature. I'll probably re-open this in a few days. I closed it because we are still discussing our AI policy and how to open up pull requests to the sibling repos in the AI age. It looks like you already have some Claude co-commits so I assume some level of agentic assistance is okay in superqt. I rushed a bit opening this and we want to do due diligence making sure we give enough context and evidence of testing when opening AI assisted PRs. |
|
Sibling repos... of napari? I definitely don't mind AI driven PRs. They are actually more and more often equal or higher quality. For me, the onus is on the reviewer/merger, not the contributor. (And certainly, reviewers/repos are justified in having policies that they don't accept AI PRs, but I don't mind them if they are short) So, feel free to just leave it open and I'll have a look soon. But if you'd prefer to tune it manually go for it :) |
While discussing this issue napari/napari#8241 it was suggested that it would be useful to add a mapped slider so that we can have finer control of the attenutaiton parameter for amip. There are two modes. In log mode each decade gives the same space on the slider but it doesn't handle min=0. In power mode the min can be 0.
The original implementation was done by @TimMonko as part of a pull request for Napari.
AI Disclaimer: The code was largely generated by pointing Claude at Tim's prototype and requesting Claude clean it up, handle min=0 better, move it here, and make it consistent with the superqt style guide.
to test
to test in the context of napari/napari#8241