vaadin / flow

Vaadin Flow is a Java framework binding Vaadin web components to Java. This is part of Vaadin 10+.
Apache License 2.0
618 stars 167 forks source link

Highlight active drop target out-of-the-box #7334

Open pleku opened 4 years ago

pleku commented 4 years ago

When making an application with drag and drop features, I want all the drop target components to be highlighted visually out-of-the-box when a valid drag-over happens, because I don't know how to do CSS for web components and it should just work for all Vaadin components based on the used theme... and I want to utilize the same feature for my own components acting as drop targets

Currently the v-drag-over-target class name is added to the drop target, but the user has to do the theming themselves. Grid and Upload components have their own drop hint visualization, and it should be trivial to get this for all the Vaadin components when those are acting as drop targets.

Since there is already a class name in use since 14.1, it might be necessary to make this feature as opt-in, meaning that the default is the current state and users can opt-in for their app to use the drop hints from Lumo/Material themes.

pleku commented 4 years ago

This is blocked until the themes have something that we can enable for the Java integrations.

jouni commented 4 years ago

@pleku, you should talk with @tomivirkki who will do the work on the themes. Right now, I don’t think anyone is working on it. The visual design specs are in the Lumo theme issue.