Feedback on wrapper component

I created a vaadin component which essentially is a wrapper for the @material/slider. Can i get feedback on it?
Essentially I want to know if things could have been done better/smarter.
Link: https://github.com/AbdullahGheith/vaadin-paper-slider

Hi. I found this in PiperSlider.java

PaperSlider self = this;

That’s not necessary. It’s Java not JavaScript

In the readme you write this:
How to use it?
Instructions found in Vaadin directory: Component link

I wouldn’t do that but keep all information in the readme and add a link to the readme in the link section of the component directory

If I add the Maven dependency to my project I get

Failed to find the following css files in the `node_modules` or `C:\Users\simon\Workspace\_trash\bean-validation\frontend` directory tree:
      - ./themes/slider.css
  Check that they exist or are installed. If you use a custom directory for your resource files instead of the default `frontend` folder then make sure it's correctly configured (e.g. set 'vaadin.frontend.frontend.folder' property)

That means that I have to add a slider.css but what if I don’t have one? And what will the content of this=?

Besides that: The path themes/slider.css will not be appropriate.

You must remove this @CssImport

Hi @adaptable-uakari
Thanks for looking at it.

The PaperSlider self = this; is because i wanted to refer back to my instance of PaperSlider. As you see on line 95, I am in an inner class, so i can’t use “this” in there. I have to use my self object.

I will change the readme to include the maven dependency.

You are completely right about the slider.css. I used it as a test in the start and removed it afterwards, but forgot to remove the @CssImport

working v2.0.1 is up now

Great!

Btw. to reference this of the PaperSlider you really don’t need self. This is how it’s done in Java

listener.valueChanged(new ComponentValueChangeEvent<>(PaperSlider.this, newHasValue, oldValue, false));

Oh neat. didnt know, thanks!