jmix-framework / jmix

Jmix framework
https://www.jmix.io
Apache License 2.0
695 stars 124 forks source link

Ability to set classname to view wrapper component #3926

Open syncro opened 6 days ago

syncro commented 6 days ago

UI development purposes are often require style or logic customization for particular screens/dialogs. So there should be a simple way to assign id/classnames to concrete dialog windows to be able to manipulate them from frontend(browser) context on both 1.x and 2.x Jmix versions.

Use cases:

  1. Setup unique dialog window title styling(colour, font size) from CSS

  2. Call javascript function selecting dialog window element for manipulations, e.g. toggle attributes/classNames from runtime

  3. Select dialog window from UI tests

glebfox commented 3 days ago

Possible solutions:

  1. New attribute:
<view xmlns="http://jmix.io/schema/flowui/view"
      classNames="foo"

Apply it to dialog window or root tab (Tabbed mode)

  1. Add attribute to io.jmix.flowui.view.DialogMode as it needed for dialogs only