Matthias Mullie has submitted this change and it was merged.

Change subject: Hygiene: Remove templates for flow_topic_navigation
......................................................................


Hygiene: Remove templates for flow_topic_navigation

It just serves to confuse people reading your code. This template doesn't
render anywhere and is full of @todo notes.

It's very bad practice having unused code lying around the place.

Change-Id: I794a921fee616c5589440737b7f1682dce8e1329
---
M Resources.php
M handlebars/Makefile
M handlebars/compiled/flow_block_topiclist.handlebars.php
M handlebars/compiled/flow_board.handlebars.php
M handlebars/flow_block_topiclist.handlebars
D handlebars/flow_topic_navigation.handlebars
M includes/TemplateHelper.php
M modules/new/flow-handlebars.js
8 files changed, 1 insertion(+), 65 deletions(-)

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



diff --git a/Resources.php b/Resources.php
index 1eeefe9..09319b9 100644
--- a/Resources.php
+++ b/Resources.php
@@ -67,7 +67,6 @@
                        "flow_topic_titlebar.handlebars",
                        "flow_topic_titlebar_close.handlebars",
                        "flow_topic_titlebar_watch.handlebars",
-                       "flow_topic_navigation.handlebars",
                        "flow_topic_titlebar_content.handlebars",
                        "flow_topic_titlebar_summary.handlebars",
                        "flow_topiclist_loop.handlebars",
diff --git a/handlebars/Makefile b/handlebars/Makefile
index f63e5aa..bfbf9d9 100644
--- a/handlebars/Makefile
+++ b/handlebars/Makefile
@@ -95,7 +95,6 @@
 compiled/flow_block_topiclist.handlebars.php: \
                flow_block_topiclist.handlebars \
                flow_board_navigation.handlebars \
-               flow_topic_navigation.handlebars \
                flow_newtopic_form.handlebars \
                flow_anon_warning.handlebars \
                flow_tooltip.handlebars \
diff --git a/handlebars/compiled/flow_block_topiclist.handlebars.php 
b/handlebars/compiled/flow_block_topiclist.handlebars.php
index 65b9c3b..985aa6a 100644
--- a/handlebars/compiled/flow_block_topiclist.handlebars.php
+++ b/handlebars/compiled/flow_block_topiclist.handlebars.php
@@ -81,11 +81,6 @@
 
 
 <div class="flow-board">
-       <ul class="flow-topic-navigation flow-list" style="display:none;">
-       '.''.'
-</ul>
-
-
        '.'
        <div class="flow-newtopic-container">
                <div class="flow-nojs">
@@ -515,4 +510,4 @@
 </div>
 ';
 }
-?>
+?>
\ No newline at end of file
diff --git a/handlebars/compiled/flow_board.handlebars.php 
b/handlebars/compiled/flow_board.handlebars.php
index fcdc1aa..45b355b 100644
--- a/handlebars/compiled/flow_board.handlebars.php
+++ b/handlebars/compiled/flow_board.handlebars.php
@@ -34,7 +34,6 @@
 ' : '').'
 </div>
 
-       
                        <a href="'.((LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['isWatched'])) ? $in['isWatched'] : null))) ? 
''.htmlentities(((is_array($in['links']['unwatch-board']) && 
isset($in['links']['unwatch-board']['url'])) ? 
$in['links']['unwatch-board']['url'] : null), ENT_QUOTES, 'UTF-8').'' : 
''.htmlentities(((is_array($in['links']['watch-board']) && 
isset($in['links']['watch-board']['url'])) ? $in['links']['watch-board']['url'] 
: null), ENT_QUOTES, 'UTF-8').'').'"
                           class="mw-ui-constructive
                           '.((LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['isWatched'])) ? $in['isWatched'] : null))) ? 
'flow-watch-link-unwatch' : 'mw-ui-quiet flow-watch-link-watch').'"
diff --git a/handlebars/flow_block_topiclist.handlebars 
b/handlebars/flow_block_topiclist.handlebars
index e4c8c8d..d5493c4 100644
--- a/handlebars/flow_block_topiclist.handlebars
+++ b/handlebars/flow_block_topiclist.handlebars
@@ -1,8 +1,6 @@
 {{> flow_board_navigation}}
 
 <div class="flow-board">
-       {{> flow_topic_navigation}}
-
        {{! new-topic form should only be displayed when run with JS, otherwise 
link to designated page }}
        <div class="flow-newtopic-container">
                <div class="flow-nojs">
diff --git a/handlebars/flow_topic_navigation.handlebars 
b/handlebars/flow_topic_navigation.handlebars
deleted file mode 100644
index f828081..0000000
--- a/handlebars/flow_topic_navigation.handlebars
+++ /dev/null
@@ -1,34 +0,0 @@
-<ul class="flow-topic-navigation flow-list" style="display:none;">
-       {{!-- @todo reimplement this after Sprint B --}}{{!--
-       <li class="flow-topic-navigation-heading"><h5>{{l10n "Topics_n" 
this}}</h5></li>
-       {{#each roots}}
-               {{#eachPost @root this}}
-                       <li class="flow-topic-navigator-wrap">
-                               <a href="#flow-topic-{{postId}}" 
class="flow-topic-navigator">
-                                       {{math @index "+" "1"}}. 
{{escapeContent content.format content.content}}
-                                       <span class="flow-topic-navigator-meta">
-                                               {{#if last_updated}}
-                                                       {{timestamp 
last_updated "active_ago"}}
-                                               {{else}}
-                                                       {{uuidTimestamp postId 
"started_ago"}}
-                                               {{/if}}
-                                       </span>
-                               </a>
-                       </li>
-               {{/eachPost}}
-       {{/each}}
-       <li class="flow-topic-navigation-footer">
-               {{l10n "topic_count_sidebar" this}}
-               {{#if links.pagination.fwd}}
-                       <a href="{{links.pagination.fwd.url}}" 
title="{{links.pagination.fwd.title}}" class="mw-ui-button mw-ui-progressive 
mw-ui-quiet"><span class="wikiglyph wikiglyph-article"></span> {{l10n 
"flow-load-more"}}</a>
-               {{else}}
-                       {{if links.pagination.rev}}
-                               <a href="{{links.pagination.rev.url}}" 
title="{{links.pagination.rev.title}}" class="mw-ui-button mw-ui-progressive 
mw-ui-quiet"><span class="wikiglyph wikiglyph-article"></span> {{l10n 
"flow-load-more"}}</a>
-                       {{else}}
-                               <!-- @todo make disabled class do something? -->
-                               <a class="mw-ui-button mw-ui-progressive 
mw-ui-quiet disabled"><span class="wikiglyph wikiglyph-article"></span> {{l10n 
"flow-load-more"}}</a>
-                       {{/if}}
-               {{/if}}
-       </li>
-       --}}
-</ul>
diff --git a/includes/TemplateHelper.php b/includes/TemplateHelper.php
index 84d1be6..a8e6fdb 100644
--- a/includes/TemplateHelper.php
+++ b/includes/TemplateHelper.php
@@ -215,26 +215,12 @@
                        $message = wfMessage( $str, $moderator );
                        break;
 
-               case 'Topics_n':
-                       $topiclist = $args[0];
-                       $message = wfMessage( 'flow-topic-count', count( 
$topiclist['roots'] ) );
-                       break;
-
                case 'started_with_participants':
                        $topicTitle = $args[0];
                        $message = wfMessage(
                                'flow-topic-participants-second-try',
                                $topicTitle['creator']['name'],
                                $topicTitle['author_count'] - 1
-                       );
-                       break;
-
-               case 'topic_count_sidebar':
-                       $topiclist = $args[0];
-                       $message = wfMessage(
-                               'flow-topic-count-sidebar',
-                               count( $topiclist['roots'] ),
-                               '???' //$topiclist['topic_count']
                        );
                        break;
 
diff --git a/modules/new/flow-handlebars.js b/modules/new/flow-handlebars.js
index 7553c18..6320892 100644
--- a/modules/new/flow-handlebars.js
+++ b/modules/new/flow-handlebars.js
@@ -165,9 +165,6 @@
                var parameters = Array.prototype.slice.call( arguments, 1 ),
                        strings = ( {
                                "Reply": "Reply", // TODO: pass in and parse 
$author['gender']
-                               "Topics_n": function ( count, options ) {
-                                       return "Topics (" + count + ")";
-                               },
 
                                // @todo - use real i18n message keys instead 
of cancatenation
                                "started_with_participants": function ( 
context, options ) {
@@ -176,9 +173,6 @@
                                                ", with " + ( 
context.author_count - 1 ) + " other participant" +
                                                        ( context.author_count 
> 2 ? 's' : '' )
                                                ) : '' );
-                               },
-                               "topic_count_sidebar": function ( context, 
options ) {
-                                       return "Showing " + 
context.topics.length + " of " + context.topic_count + " topics attached to 
this page";
                                },
                                "comment_count": function ( context, options ) {
                                                return context.reply_count + " 
comment" + ( !context.reply_count || context.reply_count > 1 ? 's' : '' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I794a921fee616c5589440737b7f1682dce8e1329
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Matthias Mullie <[email protected]>
Gerrit-Reviewer: SG <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to