Icons for Actions #5282
Unanswered
pedro-santiago
asked this question in
Ideas & Feature Requests
Replies: 2 comments
-
|
I would love to see something like this. I think it may also be helpful if a given resource could have some kind of hot bar on the detail page where actions can be trigger just by clicking their icon. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
One approach that might be valuable here is to use the spatie/emoji package. You could customize an action's Stack::make('Game', [
Line::make('Name', 'name'),
Line::make('Icons')->resolveUsing(function () {
return collect([
Emoji::brokenHeart() => $this->model()->isBroken(),
Emoji::zzz() => !$this->model()->expectsUpdates(),
Emoji::whiteExclamationMark() => $this->model()->expectsUpdates(),
])
->filter()
->keys()->join(' ');
})->asSmall(),
]), |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Context
When having several actions (let's say more than 30) for a resource, it's rather difficult to differentiate one from another. One of ways we came across to make it better for our users is to define custom Icons (and grouping) for actions. This way they can improve their visual mnemonics and have less chance to miss click.
Idea of Implementation
iconmethod, that is a getter forprivate string $iconattribute, defined on the mainActionclass. This way we follow current patterns.<Icon :type=directive to dynamically load them.In our case we have also created an Enum to avoid our developers to try icons that don't exist.
Beta Was this translation helpful? Give feedback.
All reactions