Issues with ColorPicker

OK, yet again I retype this message… :frowning:

I wondered why this useful component isn’t part of the standard set of widgets. I think that the answer is that you wait for a stable version… :slight_smile:
At least, I am sure it isn’t because of the weight of the component, as it is rather small (compared to, say, the TreeTable…).
And it is generally useful, eg. as soon as you want to allow user settings or similar.

It is a nice component, well made and globally working well. But I quickly ran into some issues, so I thought I should list them, to help in the process into the standard widgetset… :slight_smile:

Some issues come from the dual nature of the component: it is both a button and a popup window, the former invoking the latter.

For example, I expected to set the text of the button from the text in the constructor. It appears that the caption goes to the popup window (title) and I have to use setButtonCaption to change the text of the button. Looks a bit unintuitive, perhaps because Button’s constructor precisely set the text appearing on the button. A setPopupCaption() method (or similar) would be better.

Another issue is that we have no access to the button itself. I cannot use getPositionX() on it, for example. I would like to position the popup relative to this button, but it appears not possible.

Likewise, I see a ‘window’ field in the component, but it isn’t exposed.
I added two color buttons to a modal dialog. If I close the dialog while a color popup is shown, the popup remains on screen. Either the windowClose() method isn’t called, or it misses a window.close() in it. In some case, we might want to make the popup modal, too.

Lastly, there is a little issue with the HSV tab: when opened for the first time, the sliders are set to 0, 0, 1 instead of showing the current color. It is annoying as I can switch from the RGB mode to alter the luminosity, for example.

Oh, and in the Swatches tab, the last row of colors is truncated. In Chrome 14, I see only the 4 topmost pixels (instead of the full 20 ones), while in Firefox 7 I see only 2! And in the latter, the text of the color has the bottom truncated too. See the screenshot.
11999.png

Hi,

The best way would be if you created tickets for the issues at http://dev.vaadin.com. Problems reported on the forum are typically forgotten or lost. Please create one ticket per issue and include a way to reproduce the issue, preferrably the code of a minimal test application.

And of course, if you want to help out, please check out the code (http://dev.vaadin.com/svn/addons/ColorPicker/), fix the issues and submit patches to the tickets :slight_smile:

Yes. I prefer to check on the forum before, to have some feedback, but I suppose my remarks are quite straightforward…
So, I opened:
#7862 (ColorPicker: wrong rendering of last column of swatches)[url]
, [url=http://dev.vaadin.com/ticket/7863]
#7863 (ColorPicker: bad values in HSV tab) – Vaadin
, and
#7864 (ColorPicker: improve the API)
.

And of course, I would be happy to contribute, but I am a bit in a hurry in putting up my prototype made with Vaadin. Perhaps later, when dust will settle…