-
Notifications
You must be signed in to change notification settings - Fork 108
CardDeck/general addUserAction icon support #1849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
slightly related with #1848, I highly support unified look & feel (and impl.) |
Initially, I thought this is supported, but not honored by CardDeck. The UserAction is a class defined in atk4/data. This class cannot hold any UI specific information. this is correctly documented in https://github.com/atk4/data/blob/82fe55997a6c0cb73a982bfd86698d3a0ba9118d/src/Model/UserAction.php#L19 however, an however, in atk4/data, we cannot still specify any UI specific default value, thus no default icon for the default UAs ( so if these actions are desired to have an icon, it must be defined by some helper, but central/deduplicated method/registry in atk4/ui |
Understood for the default actions and also understood that we have to change that on the Ui side. I would though ask for adding the ui property to UserAction as in Field, that at least custom defined UserActions can easily be setup and configured to show icon |
Today, the UserActions are all automatically rendered based on the UserAction's name, so 'Edit', 'Delete' or the like. The 'name' by nature becomes then also the caption for all buttons. In Cruds, the 'Edit' UserActions are shown by an edit icon, in Cards not.
Generally, it would be helpful if there is an easy and direct way to also set the 'icon' for a UserAction that Ui is taking. Consider this as an alternative to describe the UserAction instead of the name. The name is as good or bad to describe it as caption or an icon would be. To my knowledge, this was easily possible in earlier versions of the UserActions, but was removed and transferred to ExecutionFactory - this makes it very time-consuming and complex, to add a simple UserAction like 'Archive entry' - it should be as easy as:
The text was updated successfully, but these errors were encountered: