dev/core#1899 specify display mode for action links with icons #17947
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a 5.28 RC equivalent of #17933.
Overview
Changes in #17319 allow action links to be specified with
icon
to display the icon only instead of the link text. However, case activity action links have icons specified dating back to #14349 because they serve double-duty as specifying the buttons when viewing a single activity. This is a nice pattern to follow elsewhere in the future, but the result is that it forced the action links to render as icons only.This allows the
$iconMode
to be set inCRM_Core_Action::formLink()
in order to decide whether to display each action link as an icon (if specified), text, or both.Before
Activity listing when viewing a case:
After
Technical Details
I set it so
icon
mode doesn't stash extra items under the "more >" both since there's more real estate and it just looks stupid. The screenshot below is what the same activity listing would appear as if it were inicon
mode now (though it is not set this way as submitted):Note that
icon
mode displays the text if there is no icon specified.Comments
The only place where the links are displayed as icons is the edit payment link (a pencil) when viewing a contribution.