Lucas Werkmeister (WMDE) has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/366581 )
Change subject: Finish constraint status for deprecated statements
......................................................................
Finish constraint status for deprecated statements
In I8ec04faa05, I added a new constraint status for deprecated
statements but forgot to update a whole bunch of places that need to be
updated whenever a status is added :(
The $order array in DelegatingConstraintChecker::sortResult() is
rearranged so that new entries can be added in a single line.
Bug: T170391
Change-Id: I266e8504b741dcfba20d0dfd04380847a047ae47
---
M i18n/en.json
M i18n/qqq.json
M includes/ConstraintCheck/DelegatingConstraintChecker.php
M modules/SpecialConstraintReportPage.css
4 files changed, 15 insertions(+), 1 deletion(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityConstraints
refs/changes/81/366581/1
diff --git a/i18n/en.json b/i18n/en.json
index fae7f77..6f104b7 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -22,6 +22,7 @@
"wbqc-constraintreport-status-exception": "Exception",
"wbqc-constraintreport-status-todo": "Todo",
"wbqc-constraintreport-status-bad-parameters": "Bad parameters",
+ "wbqc-constraintreport-status-deprecated": "Deprecated",
"wbqc-constraintreport-result-table-header-status": "Status",
"wbqc-constraintreport-result-table-header-claim": "Claim",
"wbqc-constraintreport-result-table-header-constraint": "Constraint",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index cea1bb9..071ea19 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -24,6 +24,7 @@
"wbqc-constraintreport-status-exception": "Status for claims that were
marked as a exception",
"wbqc-constraintreport-status-todo": "Status for constraints which
cannot be checked yet.\n{{Identical|Todo}}",
"wbqc-constraintreport-status-bad-parameters": "Status for constraints
that have missing or invalid constraint parameters.",
+ "wbqc-constraintreport-status-deprecated": "Status for constraint
checks that have been skipped because the statement is deprecated.",
"wbqc-constraintreport-result-table-header-status": "Header of the
column that tells whether the check found a violation or something
else.\n{{Identical|Status}}",
"wbqc-constraintreport-result-table-header-claim": "Header of the
column that displays a link to the claim, the used property and its
value.\n{{Identical|Claim}}",
"wbqc-constraintreport-result-table-header-constraint": "Header of the
column that gives information about which constraint was
checked.\n{{Identical|Constraint}}",
diff --git a/includes/ConstraintCheck/DelegatingConstraintChecker.php
b/includes/ConstraintCheck/DelegatingConstraintChecker.php
index 339ceee..d5b0a7c 100644
--- a/includes/ConstraintCheck/DelegatingConstraintChecker.php
+++ b/includes/ConstraintCheck/DelegatingConstraintChecker.php
@@ -345,7 +345,15 @@
}
$sortFunction = function ( CheckResult $a, CheckResult $b ) {
- $order = [ 'other' => 4, 'compliance' => 3, 'exception'
=> 2, 'violation' => 1, 'bad-parameters' => 0 ];
+ $orderNum = 0;
+ $order = [
+ 'bad-parameters' => $orderNum++,
+ 'violation' => $orderNum++,
+ 'exception' => $orderNum++,
+ 'compliance' => $orderNum++,
+ 'deprecated' => $orderNum++,
+ 'other' => $orderNum++,
+ ];
$statusA = $a->getStatus();
$statusB = $b->getStatus();
diff --git a/modules/SpecialConstraintReportPage.css
b/modules/SpecialConstraintReportPage.css
index 831949f..7dcc63d 100644
--- a/modules/SpecialConstraintReportPage.css
+++ b/modules/SpecialConstraintReportPage.css
@@ -40,6 +40,10 @@
color: #b32424; /* Red30 */
}
+.wbqc-status-deprecated {
+ color: #72777d; /* Base30 */
+}
+
/* Tooltip */
.wbqc-indicator {
color: #72777d; /* Base30 */
--
To view, visit https://gerrit.wikimedia.org/r/366581
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I266e8504b741dcfba20d0dfd04380847a047ae47
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits