ColorPicker: improve the API
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 717
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
Originally by PhiLho
I think the constructor of the ColorPicker should be similar to the one of the Button, since that's the first component we see.
Ie. the caption should be the one displayed on the button, and we should have a setPopupCaption() (or similar) instead of setButtonCaption().
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 cases, we might want to make the popup modal, too.
Imported from https://dev.vaadin.com/ issue #7864
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the ColorPicker constructor and its existing button, setButtonCaption(), window, and windowClose() behavior. Determine how the caption, button access, popup caption, and popup/window closing should be exposed; done means the requested API and closing behavior are defined and covered by relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100