mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-24 07:43:47 +00:00
Add logging to the add topic button when it's promoted to the header
Bug: T330191 Change-Id: If3ccbe82e85fdedcbb34b43f6d34c83caa08eae3
This commit is contained in:
parent
091705df88
commit
d041a7334e
|
@ -15,23 +15,28 @@ class VectorComponentButton implements VectorComponent {
|
|||
private $href;
|
||||
/** @var string|null */
|
||||
private $icon;
|
||||
/** @var string|null */
|
||||
private $event;
|
||||
|
||||
/**
|
||||
* @param string $label
|
||||
* @param string|null $id
|
||||
* @param string|null $href
|
||||
* @param string|null $icon
|
||||
* @param string|null $event
|
||||
*/
|
||||
public function __construct(
|
||||
string $label,
|
||||
$id = null,
|
||||
$href = null,
|
||||
$icon = null
|
||||
$icon = null,
|
||||
$event = null
|
||||
) {
|
||||
$this->id = $id;
|
||||
$this->href = $href;
|
||||
$this->label = $label;
|
||||
$this->icon = $icon;
|
||||
$this->event = $event;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -44,7 +49,8 @@ class VectorComponentButton implements VectorComponent {
|
|||
'html-vector-button-icon' => Hooks::makeIcon( $this->icon ),
|
||||
'label' => $this->label,
|
||||
'is-quiet' => true,
|
||||
'class' => 'mw-ui-primary mw-ui-progressive'
|
||||
'class' => 'mw-ui-primary mw-ui-progressive',
|
||||
'event' => $this->event,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -394,7 +394,8 @@ class SkinVector22 extends SkinMustache {
|
|||
$this->msg( [ 'vector-2022-action-addsection', 'skin-action-addsection' ] )->text(),
|
||||
'ca-addsection',
|
||||
$this->getTitle()->getLocalURL( 'action=edit§ion=new' ),
|
||||
'wikimedia-speechBubbleAdd-progressive'
|
||||
'wikimedia-speechBubbleAdd-progressive',
|
||||
'addsection-header'
|
||||
) : null,
|
||||
'data-vector-variants' => new VectorComponentMenuVariants(
|
||||
// @phan-suppress-next-line PhanTypeInvalidDimOffset, PhanTypeMismatchArgument
|
||||
|
|
Loading…
Reference in a new issue