Style changes for unwatch actions

- Reverse 'watch' / 'unwatch' star icons
- Truncate title texts
- Minor indentation fix

Bug: T132975
Change-Id: I1dbd6d1480f6ef5a45184271c932cd27258f7424
This commit is contained in:
Moriel Schottlender 2016-08-26 14:49:10 -07:00
parent 1521db756a
commit a0e02da71f

View file

@ -631,7 +631,7 @@ abstract class EchoEventPresentationModel implements JsonSerializable {
'description' => $this
->msg( 'notification-dynamic-actions-' . $availableAction . '-confirmation-description' )
->params(
$title->getPrefixedText(),
$this->getTruncatedTitleText( $title ),
$title->getFullURL()
),
),
@ -645,14 +645,19 @@ abstract class EchoEventPresentationModel implements JsonSerializable {
return $this->getDynamicActionLink(
$title,
$isTitleWatched ? 'unStar' : 'star',
// Design requirements are to flip the star icons
// in their meaning; that is, for the 'unwatch' action
// we should display an empty star, and for the 'watch'
// action a full star. In OOUI icons, their names
// are reversed.
$isTitleWatched ? 'star' : 'unStar',
// notification-dynamic-actions-watch
// notification-dynamic-actions-unwatch
$this->msg( 'notification-dynamic-actions-' . $availableAction )
->params(
$title->getPrefixedText(),
$title->getFullURL( array( 'action' => $availableAction ) )
),
->params(
$this->getTruncatedTitleText( $title ),
$title->getFullURL( array( 'action' => $availableAction ) )
),
null,
$data,
array( 'action' => $availableAction )