Page MenuHomePhabricator

Replace claim with violation message in Special:ConstraintReport
Closed, ResolvedPublic

Description

The big table in Special:ConstraintReport currently has a “claim” column with the property and value of the snak being checked. (I suppose “claim” is strictly speaking a misnomer since T168532: Check constraints on qualifiers and references.) If a violation message exists, the “status” column has a small “question mark” indicator ([?]) which, when hovered, shows the violation message.

We could replace the “claim” column with a dedicated column for the violation message (and move it out of the [?] indicator). This would make the violation message more prominent (which is probably a good idea since T163997: Improve constraint violation messages), and will let us remove the data value from the CheckResult class, which makes serializing check results for the cache easier (T185714).

However, it’s not clear what should happen for results that don’t have a violation message: compliance (complies with constraint), exception (subject entity is marked as exception to this constraint), todo (unimplemented constraint type), deprecated (statement deprecated), and not-in-scope (constraint is not checked on this kind of context). Perhaps we can just remove them from the table? Their total number would still be available in the summary line above the table.

I think we also need to add a separate column for the property with the constraint in that case, because not all messages include that, and some messages are hard or impossible to understand without it (“This property should only be used for the main value of a statement, not for qualifiers or references.”).

Patch-For-Review:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 2 2018, 1:15 PM

Current special page (on my test wiki, so disregard any nonsensical data):


Proposed change:

thiemowmde triaged this task as Normal priority.Mar 2 2018, 3:55 PM
thiemowmde added a project: WMDE-Design.

I'm very happy with the proposed change for multiple reasons:

  • The (in my opinion) misplaced question mark goes away.
  • The actual error becomes visible right away.
  • What the special page shows becomes much more similar to what can be seen on the Entity pages.
  • Removing the claim allows us to get rid of a lot of special-case code that exists only for this special page.

I would love to have a brief look by @Jan_Dittrich's WMDE-Design team. Is this a good direction that fits to the designs previously done for Wikibase-Quality-Constraints?

Restricted Application added a project: Design. · View Herald TranscriptMar 2 2018, 3:55 PM

Change 415882 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Reorganize Special:ConstraintReport

https://gerrit.wikimedia.org/r/415882

The above change implements this (and that’s what I used for the “proposed change” screenshot too). WMDE-Design – if you want, I can put it on wikidata-lexeme.wmflabs.org so you can try it out yourself. (Or just come to my desk :) )

From looking at at (and there might be things I don't understand/misinterpret) the new version also looks better to me, design wise.

If the things in "status" are the same we signify with the icons in the item-UI, we should reuse the icons here, too, to make them easier to learn and give people who learned them already the benefit of using their knowledge.

Hm, very good point. We do have different icons for warning, violation, and bad-parameters, and I think those are the only statuses that would be shown in the new version of the table. Would you add the icons to the “status” column (after the text) or replace the text?

Would you add the icons to the “status” column (after the text) or replace the text?

Adding them in front of the text: [ICON] Statustext

Okay, that would look like this:


The way the code is currently arranged, there’s also an icon in front of some (but not all) of the statuses in the summary line (“[icon] bad parameters: 2, [icon] warning: 7, compliance: 7”). Do you think that’s good or not?

Yes, go ahead!

Change 417987 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Add icons before statuses on special page

https://gerrit.wikimedia.org/r/417987

I just noticed that “exception” results also have a message (“This entity is a known exception for this constraint and has been marked as such.”). I’m not sure what to do with this message – do we want to keep it? Or should we perhaps just remove it? Do we want to show these results on the special page or not?

Decision: keep the message, and show “exception” results on the special page as well.

Change 415882 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Reorganize Special:ConstraintReport

https://gerrit.wikimedia.org/r/415882

Change 417987 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Add icons before statuses on special page

https://gerrit.wikimedia.org/r/417987

Lucas_Werkmeister_WMDE closed this task as Resolved.Apr 9 2018, 2:25 PM
Lucas_Werkmeister_WMDE claimed this task.