Port LineDoubleSlider2D and RangeSlider to v2#1157
Port LineDoubleSlider2D and RangeSlider to v2#1157JigyasuRajput wants to merge 1 commit intofury-gl:v2from
Conversation
Implement LineDoubleSlider2D and RangeSlider following the v2 pygfx-based architecture established by LineSlider2D. Remove legacy commented-out code and add 16 new tests covering both components. Closes fury-gl#1117
|
@JigyasuRajput I am currently working on a related issue where I am introducing a Slider2D base class in my PR #1121 that all slider components will inherit from as suggested by @ganimtron-10 . Since this component will also inherit from that base class, I plan to address it once that work is completed. Also, apologies for the delayed response, I completely missed this earlier. Therefore I will create the PR on this issue when #1121 is completed thanks! |
|
Hey @medha-14, thanks for the heads up! I see that your PR #1121 introduces a Slider2D base class Since I've already done a fair amount of work on this PR (porting both LineDoubleSlider2D and |
|
Hi @JigyasuRajput, I had already made those changes locally a while ago as I was waiting for #1121 to get merged first. However, since you have opened this PR, it's fine. But please confirm beforehand before opening a PR, as it can lead to duplicate work and waste both of our time. Thanks :) |
|
Hi @medha-14, thanks for the clarification. Apologies for the noise here. When I checked the issue earlier, I didn’t see any recent activity or comments indicating that someone was actively working on it (issue 1117), so I went ahead and started implementing it. While working on #1117 I realized that #1115 was a prerequisite, which is why I included it in this PR as well. Since I had already completed a substantial portion of the implementation (including tests), I thought it would be useful to open the PR and iterate from there. I’m happy to rebase or adapt the implementation once #1121 is merged so that it aligns with the new If you'd prefer a different approach or collaboration on this, I’m open to that as well. Thanks! |
Closes #1117
Closes #1115
Implement LineDoubleSlider2D and RangeSlider following the v2 pygfx-based architecture established by LineSlider2D. Remove legacy commented-out code and add 16 new tests covering both components.
This pull request introduces and tests two new UI slider components,
LineDoubleSlider2DandRangeSlider, into the FURY UI module. It adds them to the public API, provides comprehensive unit tests for their initialization, behavior, and integration, and removes old commented-out tests for these components.New UI Components and Public API Exposure:
LineDoubleSlider2DandRangeSliderto the__all__list and import statements infury/ui/__init__.pyi, making them available as public UI elements. [1] [2]Comprehensive Unit Tests for New Components:
LineDoubleSlider2D, covering initialization, value clamping, handle crossing prevention, synchronization between value and ratio, alias property consistency, layout, text formatting, callbacks, visibility propagation, and edge cases.RangeSlider, verifying correct initialization, actor aggregation, sizing, visibility propagation, text precision, and scene integration.Cleanup of Old/Commented Code:
LineDoubleSlider2DandRangeSlider, as well as related value range tests, to streamline the test suite and avoid redundancy. [1] [2]