Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
ff42b38
+ prp quality changes pie chart in ec generalstats
agoujot Jun 27, 2025
a863827
Merge branch 'main' into ecprpchanges
agoujot Jul 14, 2025
5fbe22d
compile
agoujot Jul 14, 2025
8dd215d
Merge branch 'main' into ecprpchanges
agoujot Jul 17, 2025
6e737bc
compile
agoujot Jul 17, 2025
9bcab4a
Merge branch 'main' into ecprpchanges
agoujot Jul 21, 2025
fc4cd54
compile
agoujot Jul 21, 2025
949b3ff
Merge branch 'main' into ecprpchanges
agoujot Aug 6, 2025
c434248
compile
agoujot Aug 6, 2025
10949d6
Merge branch 'x-tools:main' into ecprpchanges
agoujot Aug 19, 2025
6ee93c7
add column in pages; take quality changes from the api; (and other th…
agoujot Aug 19, 2025
9835557
Merge branch 'main' into ecprpchanges
agoujot Aug 19, 2025
dde5474
commpile
agoujot Aug 19, 2025
8ed29c1
lints
agoujot Aug 19, 2025
7303495
PC: add pie chart; rm unused method (migrated to project)
agoujot Aug 20, 2025
54ae97b
refactor some ugly duplication on pa selects
agoujot Aug 20, 2025
c378fac
clean up getTopEditsAllNamespaces and fetch prp quality in both
agoujot Aug 20, 2025
01f086d
lint
agoujot Aug 20, 2025
55486be
add column to TE and add proper sort keys for quality
agoujot Aug 20, 2025
64f584c
add in wikitext, tsv, csv
agoujot Aug 20, 2025
d791813
add tests for most of EditCounter; a few other tweaks
agoujot Aug 20, 2025
dd23577
a few more tests and finish removing an unused method
agoujot Aug 20, 2025
a28e61d
code coverage for AutoEdits
agoujot Aug 20, 2025
14db2fb
fix
agoujot Aug 20, 2025
462ee05
these two lines did have coverage; try explicit false
agoujot Aug 20, 2025
80614ba
as always, the cache is god and the devil
agoujot Aug 20, 2025
880df65
+forgotten paren
agoujot Aug 20, 2025
302d6cc
code coverage for Project.php; rewrite testEditData cleaner with prov…
agoujot Aug 21, 2025
2b77a63
try to fix and finish Project.php coverage
agoujot Aug 21, 2025
c52008d
code coverage for TopEdits
agoujot Aug 21, 2025
82f10ad
fixed test for te not opted in
agoujot Aug 21, 2025
fe716d2
do test model-side caching in EC
agoujot Aug 21, 2025
e1cd739
do test PA in Project; fix EC average test case
agoujot Aug 21, 2025
cd88cc7
coverage for UserRights
agoujot Aug 21, 2025
737ec27
finish coverage for UserRights
agoujot Aug 21, 2025
b24cd58
coverage for Pages.php
agoujot Aug 21, 2025
0559fef
coverage for a few small classes
agoujot Aug 21, 2025
b37bcb3
coverage for blame
agoujot Aug 21, 2025
8bf740a
lints
agoujot Aug 21, 2025
dd3887a
fix coverage of asof caching in blame
agoujot Aug 21, 2025
3951249
coverage for Edit.php
agoujot Aug 21, 2025
619bd75
fix test for edit wikifystring with section
agoujot Aug 21, 2025
07987ee
lint
agoujot Aug 21, 2025
cd1a6f6
codeCoverageignore the admin score
agoujot Aug 21, 2025
725f0bd
coverage for admin stats
agoujot Aug 22, 2025
cd8a7d8
finish admin stats coverage
agoujot Aug 22, 2025
120ccf9
code coverage for page.php
agoujot Aug 23, 2025
48cb2cb
coverage for User.php
agoujot Aug 23, 2025
af8b259
lint
agoujot Aug 23, 2025
2182462
lint
agoujot Aug 23, 2025
cbc888f
coverage for Authorship.php
agoujot Aug 23, 2025
e498358
coverage for PageAssessments.php
agoujot Aug 23, 2025
451c77f
lint
agoujot Aug 23, 2025
48f9e28
start work on pageinfo coverage
agoujot Aug 23, 2025
cc7a773
lint
agoujot Aug 23, 2025
62a9e50
lint
agoujot Aug 23, 2025
fb85638
continue pageinfo coverage
agoujot Aug 23, 2025
1596490
try and finish pageinfo coverage
agoujot Aug 24, 2025
e5db1b1
try and finish pageinfo coverage
agoujot Aug 24, 2025
b4e83a0
I think it's done
agoujot Aug 24, 2025
89bdbb9
quick xtoolshttpexception coverage
agoujot Aug 24, 2025
bab4f18
Merge branch 'main' into ecprpchanges
agoujot Aug 27, 2025
468f560
compile
agoujot Aug 27, 2025
e10812c
Merge branch 'main' into ecprpchanges
agoujot Oct 26, 2025
3866cee
test autoeditcount in EC
agoujot Oct 26, 2025
003fba8
try to fix tests
agoujot Oct 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions assets/css/_darkmode.scss
Original file line number Diff line number Diff line change
Expand Up @@ -329,4 +329,23 @@ $tooltip-shadow: #333;
filter:invert(1) hue-rotate(180deg);
}

.prp-qualitytext {
color:white; /* needed to have enough contrast */
}
.prp-quality0 {
background-color:#55585e;
}
.prp-quality1 {
background-color:#971602;
}
.prp-quality2 {
background-color:#40408c;
}
.prp-quality3 {
background-color:#5C5C00;
}
.prp-quality4 {
background-color:#00662e;
}

}
24 changes: 23 additions & 1 deletion assets/css/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,29 @@ a.help-icon {
clear: both;
}


.prp-qualitytext {
border-radius: 3px;
padding: 0 2px;
}

.prp-quality0 {
background-color:#ddd;
}
.prp-quality1 {
background-color:#ffabab;
}
.prp-quality2 {
background-color:#bbbbff;
}
.prp-quality3 {
background-color:#ffe867;
}
.prp-quality4 {
background-color:#90ff90;
}

.link-loading {
pointer-events: none;
font-style: italic;
}
}
4 changes: 4 additions & 0 deletions assets/css/editcounter.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
height: auto;
width: auto;
}

div.chart-wrapper.qualitychangechart {
float:none;
}

.top-project-edit-counts td {
white-space: nowrap;
Expand Down
2 changes: 2 additions & 0 deletions i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@
"priority": "Priority",
"project": "Project",
"projects": "Projects",
"proofreadpage-quality": "Page status",
"proofreadpage-qualitychanges": "Proportions of ProofreadPage quality changes",
"prose": "Prose",
"protect": "Protect",
"proxy-check": "Proxy check",
Expand Down
2 changes: 2 additions & 0 deletions i18n/qqq.json
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@
"priority": "Label for the priority of a 'bug' in a wiki page that needs fixing.\n{{Identical|Priority}}",
"project": "Header for the part of the interface that lets the user select which project they want to view statistics for.\n{{Identical|Project}}",
"projects": "Label for a number of projects.\n{{Identical|Projects}}",
"proofreadpage-quality": "Label for the transcription status of a page, as recorded by Extension:ProofreadPage.",
"proofreadpage-qualitychanges": "Label for a chart of the proportions of the different quality changes.",
"prose": "Term used to describe the text content of an article.",
"protect": "Name of the MediaWiki log action 'protect', as in page protection.\n{{Identical|Protect}}",
"proxy-check": "Label for link to the Proxy Check tool on Toolforge. The tool can tell you if the given IP address is a proxy or not.",
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/build/entrypoints.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"/build/app.93b4ef2d.js"
],
"css": [
"/build/app.7692d209.css"
"/build/app.ed7ba741.css"
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion public/build/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"build/app.css": "/build/app.7692d209.css",
"build/app.css": "/build/app.ed7ba741.css",
"build/app.js": "/build/app.93b4ef2d.js",
"build/runtime.js": "/build/runtime.c217f8c4.js",
"build/852.96913092.js": "/build/852.96913092.js",
Expand Down
1 change: 1 addition & 0 deletions src/Model/AdminScore.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/**
* An AdminScore provides scores of logged actions and on-wiki activity made by a user,
* to measure if they would be suitable as an administrator.
* @codeCoverageIgnore
*/
class AdminScore extends Model
{
Expand Down
2 changes: 0 additions & 2 deletions src/Model/AdminStats.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ public function getActions(): array
* adding in a key/value for user groups.
* @param string[][] $data As retrieved by AdminStatsRepository::getStats
* @return string[] Stats keyed by user name.
* Functionality covered in test for self::getStats().
* @codeCoverageIgnore
*/
private function groupStatsByUsername(array $data): array
{
Expand Down
14 changes: 8 additions & 6 deletions src/Model/Authorship.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ private function getTargetRevId(?string $target): ?int
/**
* Domains of supported wikis.
* @return string[]
* Is a constant.
* @codeCoverageIgnore
*/
public function getSupportedWikis(): array
{
Expand Down Expand Up @@ -108,20 +110,20 @@ public function getError(): ?string

/**
* Get the total number of authors.
* @return int
* @return int|null
*/
public function getTotalAuthors(): int
public function getTotalAuthors(): ?int
{
return $this->data['totalAuthors'];
return $this->data['totalAuthors'] ?? null;
}

/**
* Get the total number of characters added.
* @return int
* @return int|null
*/
public function getTotalCount(): int
public function getTotalCount(): ?int
{
return $this->data['totalCount'];
return $this->data['totalCount'] ?? null;
}

/**
Expand Down
82 changes: 39 additions & 43 deletions src/Model/AutoEdits.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,29 +153,26 @@ public function getAutomatedPercentage(): float
*/
public function getNonAutomatedEdits(bool $forJson = false): array
{
if (isset($this->nonAutomatedEdits)) {
return $this->nonAutomatedEdits;
if (!isset($this->nonAutomatedEdits)) {
$revs = $this->repository->getNonAutomatedEdits(
$this->project,
$this->user,
$this->namespace,
$this->start,
$this->end,
$this->offset,
$this->limit
);
$this->nonAutomatedEdits = Edit::getEditsFromRevs(
$this->pageRepo,
$this->editRepo,
$this->userRepo,
$this->project,
$this->user,
$revs
);
}

$revs = $this->repository->getNonAutomatedEdits(
$this->project,
$this->user,
$this->namespace,
$this->start,
$this->end,
$this->offset,
$this->limit
);

$this->nonAutomatedEdits = Edit::getEditsFromRevs(
$this->pageRepo,
$this->editRepo,
$this->userRepo,
$this->project,
$this->user,
$revs
);

if ($forJson) {
return array_map(function (Edit $edit) {
return $edit->getForJson();
Expand All @@ -192,30 +189,27 @@ public function getNonAutomatedEdits(bool $forJson = false): array
*/
public function getAutomatedEdits(bool $forJson = false): array
{
if (isset($this->automatedEdits)) {
return $this->automatedEdits;
if (!isset($this->automatedEdits)) {
$revs = $this->repository->getAutomatedEdits(
$this->project,
$this->user,
$this->namespace,
$this->start,
$this->end,
$this->tool,
$this->offset,
$this->limit
);
$this->automatedEdits = Edit::getEditsFromRevs(
$this->pageRepo,
$this->editRepo,
$this->userRepo,
$this->project,
$this->user,
$revs
);
}

$revs = $this->repository->getAutomatedEdits(
$this->project,
$this->user,
$this->namespace,
$this->start,
$this->end,
$this->tool,
$this->offset,
$this->limit
);

$this->automatedEdits = Edit::getEditsFromRevs(
$this->pageRepo,
$this->editRepo,
$this->userRepo,
$this->project,
$this->user,
$revs
);

if ($forJson) {
return array_map(function (Edit $edit) {
return $edit->getForJson();
Expand Down Expand Up @@ -255,6 +249,8 @@ public function getToolCounts(): array
/**
* Get a list of all available tools for the Project.
* @return array
* Just passes along a repository result.
* @codeCoverageIgnore
*/
public function getAllTools(): array
{
Expand Down
4 changes: 3 additions & 1 deletion src/Model/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ public static function wikifyString(
$sectionTitleLink = html_entity_decode(html_entity_decode(str_replace(' ', '_', $sectionTitle)));

$sectionWikitext = "<a target='_blank' href='$pageUrl#$sectionTitleLink'>&rarr;</a>" .
"<em class='text-muted'>" . $sectionTitle . ":</em> ";
"<em class='text-muted'>" . $sectionTitle . ":</em>";
$summary = str_replace($sectionMatch[0][0], $sectionWikitext, $summary);
}

Expand Down Expand Up @@ -484,6 +484,8 @@ public function getTags(): array
/**
* Get HTML for the diff of this Edit.
* @return string|null Raw HTML, must be wrapped in a <table> tag. Null if no comparison could be made.
* Just returns a repository result.
* @codeCoverageIgnore
*/
public function getDiffHtml(): ?string
{
Expand Down
Loading
Loading