Merge "Consistent Casing for "iconUrl""

This commit is contained in:
jenkins-bot 2024-08-19 20:04:09 +00:00 committed by Gerrit Code Review
commit 1b4ba9a09c
7 changed files with 12 additions and 12 deletions

View file

@ -18,7 +18,7 @@ class EchoFlyoutFormatter extends EchoEventFormatter {
'img',
[
'class' => 'mw-echo-icon',
'src' => $this->getIconURL( $model ),
'src' => $this->getIconUrl( $model ),
]
);
@ -70,7 +70,7 @@ class EchoFlyoutFormatter extends EchoEventFormatter {
);
}
private function getIconURL( EchoEventPresentationModel $model ) {
private function getIconUrl( EchoEventPresentationModel $model ) {
return EchoIcon::getUrl(
$model->getIconType(),
$this->language->getDir()

View file

@ -23,7 +23,7 @@ class SpecialNotificationsFormatter extends EchoEventFormatter {
'img',
[
'class' => 'mw-echo-icon',
'src' => $this->getIconURL( $model ),
'src' => $this->getIconUrl( $model ),
]
);
@ -112,7 +112,7 @@ class SpecialNotificationsFormatter extends EchoEventFormatter {
);
}
private function getIconURL( EchoEventPresentationModel $model ) {
private function getIconUrl( EchoEventPresentationModel $model ) {
return EchoIcon::getUrl(
$model->getIconType(),
$this->language->getDir()

View file

@ -391,7 +391,7 @@
compactHeader: content.compactHeader,
body: content.body
},
iconURL: content.iconUrl,
iconUrl: content.iconUrl,
iconType: content.icon,
primaryUrl: OO.getProp( content.links, 'primary', 'url' ),
secondaryUrls: OO.getProp( content.links, 'secondary' ) || [],

View file

@ -29,7 +29,7 @@
// bundled notifications use the compact header and do not have icons
bundledNotificationModels.forEach( ( bundled ) => {
bundled.content.header = bundled.content.compactHeader;
delete bundled.iconURL;
delete bundled.iconUrl;
} );
this.list = new mw.echo.dm.NotificationsList();

View file

@ -57,7 +57,7 @@
this.bundled = !!config.bundled;
this.source = config.source || '';
this.iconType = config.iconType;
this.iconURL = config.iconURL;
this.iconUrl = config.iconUrl;
this.read = !!config.read;
this.seen = !!config.seen;
@ -242,8 +242,8 @@
*
* @return {string} Notification icon URL
*/
mw.echo.dm.NotificationItem.prototype.getIconURL = function () {
return this.iconURL;
mw.echo.dm.NotificationItem.prototype.getIconUrl = function () {
return this.iconUrl;
};
/**

View file

@ -39,7 +39,7 @@
} );
let $icon;
const iconUrl = this.model.getIconURL();
const iconUrl = this.model.getIconUrl();
// Icon
if ( iconUrl ) {
// Only invert non colored images
@ -52,7 +52,7 @@
$icon = $( '<div>' )
.addClass( `mw-echo-ui-notificationItemWidget-icon ${ invertIconClass }` )
.append( $( '<img>' ).attr( {
src: this.model.getIconURL(),
src: this.model.getIconUrl(),
role: 'presentation',
alt: ' '
} ) );

View file

@ -80,7 +80,7 @@ QUnit.module( 'ext.echo.dm - NotificationItem', ( hooks ) => {
isBundled: false,
getTimestamp: nowFormatted,
getPrimaryUrl: undefined,
getIconURL: undefined,
getIconUrl: undefined,
getIconType: undefined,
getSecondaryUrls: [],
getModelName: 'local',