summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Dziewoński <matma.rex@gmail.com>2023-01-11 21:18:06 +0100
committerBartosz Dziewoński <matma.rex@gmail.com>2023-01-11 20:39:35 +0000
commit3ef4e23a0299de6fd204cbf550316c8f54b17a5f (patch)
treed000d1cdf7b5d0a82bc38f7ae212a6015119874a
parent77baa2ff0ee07bf0af3564191e75a166dd7733a5 (diff)
Revert "ChangeTags: When showing a tag, also link to a filtered RecentChanges view"wmf/1.40.0-wmf.17
The consensus on T326399 and in other discussions seems clear: when many tags are used, such as on Wikimedia wikis, these links take up more space than acceptable. Perhaps the feature can be brought back in the future with a different design. This reverts commit efd25911258d4baeb6eeb4c4c310f48504770179. Bug: T301063 Bug: T326399 Change-Id: Ia11a5dc59bcb56a7c3b5b7bf9f1d9eb24a81d2c3 (cherry picked from commit 45da1f49e396a0ff8e5f66800c781a3e9cef2e76)
-rw-r--r--RELEASE-NOTES-1.402
-rw-r--r--includes/changetags/ChangeTags.php15
-rw-r--r--languages/i18n/en.json1
-rw-r--r--languages/i18n/qqq.json1
-rw-r--r--resources/src/mediawiki.interface.helpers.styles.less4
-rw-r--r--tests/phpunit/includes/changetags/ChangeTagsTest.php27
6 files changed, 6 insertions, 44 deletions
diff --git a/RELEASE-NOTES-1.40 b/RELEASE-NOTES-1.40
index 479f270cd6d4..6ac6b5468c4a 100644
--- a/RELEASE-NOTES-1.40
+++ b/RELEASE-NOTES-1.40
@@ -60,8 +60,6 @@ For notes on 1.39.x and older releases, see HISTORY.
hook) for more than NS_FILE titles in Special:Search results.
* New preference ('search-thumbnail-extra-namespaces') to allow users to
control whether to show more thumbnails (per $wgThumbnailNamespaces)
-* (T301063) Change tags now also link to a filtered view of Recent Changes, to
- make it easy to find similarly-tagged recent edits.
* (T324910) On pages using multi-content revisions, the raw content of a
specific slot can be retrieved using the action=raw&slot=<role-name> query
parameters.
diff --git a/includes/changetags/ChangeTags.php b/includes/changetags/ChangeTags.php
index a0d30ae9c99f..cc22cde7dfa2 100644
--- a/includes/changetags/ChangeTags.php
+++ b/includes/changetags/ChangeTags.php
@@ -23,7 +23,6 @@
use MediaWiki\HookContainer\HookRunner;
use MediaWiki\Language\RawMessage;
-use MediaWiki\Linker\Linker;
use MediaWiki\MainConfigNames;
use MediaWiki\MediaWikiServices;
use MediaWiki\Permissions\Authority;
@@ -218,22 +217,11 @@ class ChangeTags {
if ( $description === false ) {
continue;
}
-
- $otherEditsLink = $localizer->msg( 'parentheses' )->rawParams(
- Linker::linkKnown(
- SpecialPage::getTitleFor( 'Recentchanges' ),
- $localizer->msg( 'tag-link-other-edits' )->escaped(),
- [],
- [ 'tagfilter' => $tag ]
- )
- );
- $moreEditsLink = Xml::tags( 'span', [ 'class' => 'mw-tag-other-edits' ], $otherEditsLink );
-
$displayTags[] = Xml::tags(
'span',
[ 'class' => 'mw-tag-marker ' .
Sanitizer::escapeClass( "mw-tag-marker-$tag" ) ],
- $description . ' ' . $moreEditsLink
+ $description
);
}
@@ -241,7 +229,6 @@ class ChangeTags {
return [ '', $classes ];
}
- // @phan-suppress-next-line SecurityCheck-XSS Phan assumes rawParams() is unsafe.
$markers = $localizer->msg( 'tag-list-wrapper' )
->numParams( count( $displayTags ) )
->rawParams( implode( ' ', $displayTags ) )
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index aefd69e4c120..422e55f77a12 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -3812,7 +3812,6 @@
"tag-filter": "[[Special:Tags|Tag]] filter:",
"tag-filter-submit": "Filter",
"tag-hidden": "$1 (hidden tag)",
- "tag-link-other-edits": "other edits",
"tag-list-wrapper": "[[Special:Tags|{{PLURAL:$1|Tag|Tags}}]]: $2",
"tag-mw-contentmodelchange": "content model change",
"tag-mw-contentmodelchange-description": "Edits that [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel change the content model] of a page",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index 4d8b82a5fdd8..639f4e55013d 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -4059,7 +4059,6 @@
"tag-filter": "Caption of a filter shown on lists of changes (e.g. [[Special:Log]], [[Special:Contributions]], [[Special:Newpages]], [[Special:Recentchanges]], [[Special:Recentchangeslinked]], page histories)",
"tag-filter-submit": "Caption of the submit button displayed next to the tag filter on lists of changes (e.g. [[Special:Log]], [[Special:Contributions]], [[Special:Newpages]], [[Special:Recentchanges]], [[Special:Recentchangeslinked]], page histories)\n\n{{Identical|Filter}}",
"tag-hidden": "Label used in a dropdown listing all available tags, when the tag has no human-readable name, because it is ''hidden'' (not shown on histories, recent changes, diffs, etc.).\n\nParameters:\n$1 - internal tag name (usually in English)",
- "tag-link-other-edits": "Label used to link to a filtered view of Recent Changes showing other edits also tagged with this tag",
"tag-list-wrapper": "Wrapper for the list of tags shown on recent changes, watchlists, history pages and diffs. The message will be wrapped in {{msg-mw|parentheses-start}} and {{msg-mw|parentheses-end}} if set. \n\nParameters:\n* $1 - number of distinct tags for given edit\n* $2 - comma-separated list of tags for given edit",
"tag-mw-contentmodelchange": "Change tag for edits that change the content model of a page",
"tag-mw-contentmodelchange-description": "Description for \"content model change\" change tag",
diff --git a/resources/src/mediawiki.interface.helpers.styles.less b/resources/src/mediawiki.interface.helpers.styles.less
index a497ba45ac7a..0bdb470c3045 100644
--- a/resources/src/mediawiki.interface.helpers.styles.less
+++ b/resources/src/mediawiki.interface.helpers.styles.less
@@ -77,10 +77,6 @@
}
}
-.mw-tag-other-edits {
- font-size: 90%;
-}
-
.mw-changeslist-links {
display: inline-block;
diff --git a/tests/phpunit/includes/changetags/ChangeTagsTest.php b/tests/phpunit/includes/changetags/ChangeTagsTest.php
index 5603c996a20e..79a109075581 100644
--- a/tests/phpunit/includes/changetags/ChangeTagsTest.php
+++ b/tests/phpunit/includes/changetags/ChangeTagsTest.php
@@ -728,10 +728,7 @@ class ChangeTagsTest extends MediaWikiIntegrationTestCase {
'tag1',
[
'<span class="mw-tag-markers">(tag-list-wrapper: 1, '
- . '<span class="mw-tag-marker mw-tag-marker-tag1">(tag-tag1) '
- . '<span class="mw-tag-other-edits">(parentheses: '
- . '<a href="/w/index.php?title=Special:RecentChanges&amp;tagfilter=tag1" '
- . 'title="Special:RecentChanges">(tag-link-other-edits)</a>)</span></span>'
+ . '<span class="mw-tag-marker mw-tag-marker-tag1">(tag-tag1)</span>'
. ')</span>',
[ 'mw-tag-tag1' ]
]
@@ -740,10 +737,7 @@ class ChangeTagsTest extends MediaWikiIntegrationTestCase {
'0',
[
'<span class="mw-tag-markers">(tag-list-wrapper: 1, '
- . '<span class="mw-tag-marker mw-tag-marker-0">(tag-0) '
- . '<span class="mw-tag-other-edits">(parentheses: '
- . '<a href="/w/index.php?title=Special:RecentChanges&amp;tagfilter=0" '
- . 'title="Special:RecentChanges">(tag-link-other-edits)</a>)</span></span>'
+ . '<span class="mw-tag-marker mw-tag-marker-0">(tag-0)</span>'
. ')</span>',
[ 'mw-tag-0' ]
]
@@ -758,15 +752,9 @@ class ChangeTagsTest extends MediaWikiIntegrationTestCase {
yield 'mutliple tags' => [
'tag1,0,,hidden-tag',
[
- '<span class="mw-tag-markers">(tag-list-wrapper: 2,'
- . ' <span class="mw-tag-marker mw-tag-marker-tag1">(tag-tag1)'
- . ' <span class="mw-tag-other-edits">(parentheses:'
- . ' <a href="/w/index.php?title=Special:RecentChanges&amp;tagfilter=tag1"'
- . ' title="Special:RecentChanges">(tag-link-other-edits)</a>)</span></span>'
- . ' <span class="mw-tag-marker mw-tag-marker-0">(tag-0)'
- . ' <span class="mw-tag-other-edits">(parentheses:'
- . ' <a href="/w/index.php?title=Special:RecentChanges&amp;tagfilter=0"'
- . ' title="Special:RecentChanges">(tag-link-other-edits)</a>)</span></span>'
+ '<span class="mw-tag-markers">(tag-list-wrapper: 2, '
+ . '<span class="mw-tag-marker mw-tag-marker-tag1">(tag-tag1)</span>'
+ . ' <span class="mw-tag-marker mw-tag-marker-0">(tag-0)</span>'
. ')</span>',
[ 'mw-tag-tag1', 'mw-tag-0', 'mw-tag-hidden-tag' ]
]
@@ -777,11 +765,6 @@ class ChangeTagsTest extends MediaWikiIntegrationTestCase {
* @dataProvider provideFormatSummaryRow
*/
public function testFormatSummaryRow( $tags, $expected ) {
- $this->overrideConfigValues( [
- MainConfigNames::LanguageCode => 'qqx',
- MainConfigNames::Script => '/w/index.php',
- ] );
-
$qqx = new MockMessageLocalizer();
$localizer = $this->createMock( MessageLocalizer::class );
$localizer->method( 'msg' )