Remove deprecated HTML:infoBox

Change-Id: I90ce9798be0dbf2fbcb700fe5b735e39508db50e
This commit is contained in:
bwang 2021-06-18 11:19:29 -05:00
parent 4c85648f32
commit 7f1e4447fb
4 changed files with 1 additions and 68 deletions

View file

@ -274,6 +274,7 @@ because of Phabricator reports.
* The protected property LocalFile::$metadata was removed without deprecation.
* WatchedItem::getUser, hard deprecated since 1.36, has been removed.
* AuthManager::singleton, hard deprecated since 1.36, has been removed.
* Html::infobox, deprecated since 1.36, was removed.
* …
=== Deprecations in 1.37 ===

View file

@ -1011,44 +1011,6 @@ class Html {
return (bool)preg_match( '!^(text|application)/xml$|^.+/.+\+xml$!', $mimetype );
}
/**
* Get HTML for an information message box with an icon.
*
* @internal For use by the WebInstaller class only.
* @deprecated since 1.36
*
* @param string $rawHtml HTML
* @param string $icon Path to icon file (used as 'src' attribute)
* @param string $alt Alternate text for the icon
* @param string $class Additional class name to add to the wrapper div
* @return string HTML
*/
public static function infoBox( $rawHtml, $icon, $alt, $class = '' ) {
wfDeprecated( __METHOD__, '1.36' );
$s = self::openElement( 'div', [ 'class' => "mw-infobox $class" ] );
$s .= self::openElement( 'div', [ 'class' => 'mw-infobox-left' ] ) .
self::element( 'img',
[
'src' => $icon,
'alt' => $alt,
]
) .
self::closeElement( 'div' );
$s .= self::openElement( 'div', [ 'class' => 'mw-infobox-right' ] ) .
$rawHtml .
self::closeElement( 'div' );
$s .= self::element( 'div', [ 'style' => 'clear: left;' ], ' ' );
$s .= self::closeElement( 'div' );
$s .= self::element( 'div', [ 'style' => 'clear: left;' ], ' ' );
return $s;
}
/**
* Generate a srcset attribute value.
*

View file

@ -1,22 +0,0 @@
/**
* File to be removed in 1.37.
* Rules are duplicated in '/mw-config/config.css', where they are still in use by WebInstaller.
* Add here for skins/extensions that may be using the deprecated `Html::infoBox` method.
*/
.mw-infobox {
border: 2px solid #fc3;
margin: 0.5em;
clear: left;
overflow: hidden;
}
.mw-infobox-left {
margin: 7px;
float: left;
width: 35px;
}
.mw-infobox-right {
margin: 0.5em 0.5em 0.5em 49px;
}

View file

@ -180,14 +180,6 @@ a.new {
color: #14866d;
}
/**
* `HTML::infobox` `.mw-infobox` class.
*
* Deprecated since 1.36.
*/
// Deprecate on directory base to uniquely mark its status.
@import 'deprecated/mw-infobox.less';
.visualClear {
clear: both;
}