jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400108 )

Change subject: Replace deprecated <tt> tag with custom styled <div> tag in 
error output
......................................................................


Replace deprecated <tt> tag with custom styled <div> tag in error output

Bug: T182968
Change-Id: Ie8f45d26eb3831793a988bcc1c91da3c2239d832
---
M Timeline.body.php
M resources/ext.timeline.styles/timeline.css
2 files changed, 13 insertions(+), 7 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Timeline.body.php b/Timeline.body.php
index b6c3926..6788531 100644
--- a/Timeline.body.php
+++ b/Timeline.body.php
@@ -152,19 +152,19 @@
                                }
                                if ( !$backend->doQuickOperations( $ops 
)->isOK() ) {
                                        // FIXME Hard coded english text
-                                       return "<div class=\"error\" 
dir=\"ltr\"><tt>Timeline error. "
-                                               . "Could not store output 
files</tt></div>";
+                                       return "<div class=\"error 
timeline-error\" dir=\"ltr\">Timeline error. "
+                                               . "Could not store output 
files</div>";
                                }
                        } else {
                                // FIXME Hard coded english text
-                               return "<div class=\"error\" 
dir=\"ltr\"><tt>Timeline error. "
-                                       . "Could not create temp 
file</tt></div>";
+                               return "<div class=\"error timeline-error\" 
dir=\"ltr\">Timeline error. "
+                                       . "Could not create temp file</div>";
                        }
 
                        if ( $ret == "" || $retVal > 0 ) {
                                // Message not localized, only relevant during 
install
-                               return "<div class=\"error\" 
dir=\"ltr\"><tt>Timeline error. "
-                                       . "Command line was: " . 
htmlspecialchars( $cmdline ) . "</tt></div>";
+                               return "<div class=\"error timeline-error\" 
dir=\"ltr\">Timeline error. "
+                                       . "Command line was: " . 
htmlspecialchars( $cmdline ) . "</div>";
                        }
                }
 
@@ -184,7 +184,7 @@
 
                        // Now convert back to HTML again
                        $encErr = nl2br( htmlspecialchars( $err ) );
-                       $txt = "<div class=\"error\" 
dir=\"ltr\"><tt>$encErr</tt></div>";
+                       $txt = "<div class=\"error timeline-error\" 
dir=\"ltr\">$encErr</div>";
                } else {
                        $map = $backend->getFileContents( [ 'src' => 
"{$fname}.map" ] );
 
diff --git a/resources/ext.timeline.styles/timeline.css 
b/resources/ext.timeline.styles/timeline.css
index 07d6de9..cec4e77 100644
--- a/resources/ext.timeline.styles/timeline.css
+++ b/resources/ext.timeline.styles/timeline.css
@@ -3,3 +3,9 @@
        max-width: 100%;
        overflow: auto;
 }
+
+/* Custom styling for error output to match the deprecated <tt> tag */
+.timeline-error {
+       font-family: monospace;
+       font-size: 17px;
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/400108
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie8f45d26eb3831793a988bcc1c91da3c2239d832
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/timeline
Gerrit-Branch: master
Gerrit-Owner: Divadsn <[email protected]>
Gerrit-Reviewer: Aklapper <[email protected]>
Gerrit-Reviewer: Divadsn <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to