Conversation
db3a5dd to
2282aaf
Compare
ce3a04e to
35b5b9d
Compare
knoobie
reviewed
Jan 16, 2026
| @Tag("vaadin-slider") | ||
| // @NpmPackage(value = "@vaadin/slider", version = "25.1.0-alpha1") | ||
| // @JsModule("@vaadin/slider/src/vaadin-slider.js") | ||
| public class Slider extends SliderBase<Slider, Double> { |
Contributor
There was a problem hiding this comment.
Thinking out load: I'm wondering if it's better for java developer to either use
Slider<T extends Number> or IntSlider / DoubleSlider.
Having to deal with double all the time when I just have a simple 0-5 slider feels awkward. (Same could be said for min/max and step.. might be good to add overloaded methods?)
Contributor
Author
There was a problem hiding this comment.
Valid point, thank you. We could add an IntegerSlider later
1 task
Add Slider Flow component wrapping <vaadin-slider> web component. The Slider extends AbstractSinglePropertyField and provides min, max, step, and value properties. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove explicit flow dependency versions from integration-tests pom.xml - Add README.md and LICENSE files - Add vite.config.ts for integration tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add tests for constructors, min/max/step properties, and validation that throws IllegalArgumentException for invalid values. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ider - Add ExperimentalFeatureException thrown when feature flag is disabled - Add feature flag check in Slider.onAttach - Add getMin, getMax, getStep methods to SliderElement - Add basic integration test verifying slider properties Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…rties - Create SliderBase<TComponent, TValue> abstract class extending AbstractSinglePropertyField - Move min, max, step getters/setters with validation to SliderBase - Update Slider to extend SliderBase<Slider, Double> Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move min, max, step tests to SliderBaseTest. Add tests for SliderBase constructors and value change listener constructors. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a utility method to schedule actions that run before the client response, with deduplication by key. This allows deferring state validity checks until all property changes are complete. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Log warnings when setMin, setMax, or setStep is called and the current value becomes inconsistent with the new constraints. The warnings are deferred using beforeClientResponse to check the final state after all property changes in the current request are complete. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add tests verifying that warnings are logged when value doesn't align with min, max, or step constraints after property changes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change SliderBase constructor from protected to package-private. Update SliderTest to use the 4-parameter constructor with step value. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
sissbruecker
reviewed
Feb 3, 2026
Remove redundant override methods in Slider that just called super. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change setValue(min, max, value) to setValue(value, min, max) and setValue(min, max, step, value) to setValue(value, min, max, step). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
SliderBase now implements InputField which consolidates HasLabel, HasHelper, HasSize, HasStyle, HasTooltip, HasEnabled, and HasValue. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove getEmptyValue() override and have clear() directly set value to minimum. Add test for clear() behavior. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Invalid values (out of range or not aligned with step) sent from the client are now silently ignored, returning the current value instead of throwing an exception. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Synchronize slider value with the server on the change event instead of relying on deferred updates. This also adds TestBench utility interfaces and a setValue method for emulating user input in tests. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Verify that setValue synchronizes the value to the server by checking the value change event is fired with the correct value. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
sissbruecker
approved these changes
Feb 4, 2026
web-padawan
reviewed
Feb 4, 2026
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Avoid using the word "range" in Slider Javadoc to prevent confusion with RangeSlider. Also rename requireValidRange to requireValidMinMax. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
web-padawan
approved these changes
Feb 4, 2026
|
Collaborator
|
This ticket/PR has been released with Vaadin 25.1.0-alpha6. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
The PR introduces a Flow counterpart for the
<vaadin-slider>web component, with the following API:Constructors:
Slider()Slider(valueChangeListener)Slider(min, max, value)Slider(min, max, value, valueChangeListener)Slider(min, max, step, value)Slider(min, max, step, value, valueChangeListener)Slider(label)Slider(label, valueChangeListener)Slider(label, min, max, value)Slider(label, min, max, value, valueChangeListener)Slider(label, min, max, step, value)Slider(label, min, max, step, value, valueChangeListener)Methods:
setValue(value)setValue(value, min, max)setValue(value, min, max, step)setMin(min)getMin()setMax(max)getMax()setStep(step)getStep()Fixes #8480
Type of change