Page MenuHomePhabricator

Simplify and extend JADE content schema (based on API spec insights)
Closed, ResolvedPublic

Description

In developing the API spec, we learned about some constrains and expectations WRT to how people should interact with Jade and what should be included in the content schema.

See https://www.mediawiki.org/wiki/JADE/Use_cases and https://www.mediawiki.org/wiki/JADE/Glossary

Discussion/rules:

  • A Jade page can be created without any facets, but it serves little purpose. It might only really be possible to arrive here by creating a proposal + endorsement and then deleting it.
  • Each facet may only appear once. This is largely enforced by object member naming in JSON (e.g. "editquality" is a unique identifier of the "editquality" facet)
  • Each facet may have zero or more proposals, but the data for a proposal must be unique. E.g. for "ediitquality" there are only 4 options for proposals: damaging, goodfaith; damaging, badfaith; good, goodfaith; good, badfaith (unlikely, probably a mistake)
  • Each proposal may have zero or more endorsements. A user may only endorse one proposal within a facet.
  • A proposal is identified by: entity data, facet, and label data.
  • An endorsement is identified by: entity data, facet, and user data. (Note that label data is implied because a user can only endorse one proposal per facet)

Event Timeline

Halfak created this task.Jul 30 2019, 4:43 PM
Halfak updated the task description. (Show Details)Jul 30 2019, 4:50 PM

Here's an example entity:

1{
2 "$schema": "/mediawiki/jade/entity/1.0.0",
3 "facets": {
4 "editquality": {
5 "proposals": [
6 {
7 "labeldata": {"damaging": false, "goodfaith": true},
8 "notes": "Adds a link #anon #link",
9 "preferred": true,
10 "author": {"id": 10, "gid": 101},
11 "endorsements": [
12 {
13 "author": {"id": 10, "gid": 101},
14 "comment": "As proposer",
15 "origin": "Huggle 2.1.0",
16 "created": "2019-01-01T12:53:01Z",
17 "touched": "2019-01-01T12:53:01Z"
18 },
19 {
20 "author": {"ip": "123.12.14.150"},
21 "comment": "Definitely good.",
22 "origin": "Special:Recentchanges",
23 "created": "2019-01-01T09:13:43Z",
24 "touched": "2019-01-01T09:18:00Z"
25 }
26 ]
27 }
28 ]
29 },
30 "contentquality": {
31 "proposals": [
32 {
33 "labeldata": 4,
34 "notes": "The lead section doesn't follow MOS. One major section unreferenced.",
35 "preferred": true,
36 "author": {"id": 22, "gid": 501},
37 "endorsements": [
38 {
39 "author": {"id": 22, "gid": 501},
40 "comment": "As proposer",
41 "origin": "Wiki labels",
42 "created": "2019-01-05T21:22:45Z"
43 "touched": "2019-01-05T21:22:45Z"
44 }
45 ]
46 },
47 {
48 "labeldata": 5,
49 "notes": "The last section is a bit of a mess, but otherwise perfect.",
50 "preferred": false,
51 "author": {"id": 13, "gid": 232},
52 "endorsements": [
53 {
54 "author": {"id": 13, "gid": 232},
55 "comment": "As proposer",
56 "origin": "Entity page",
57 "created": "2019-01-01T12:53:01Z",
58 "touched": "2019-01-02T18:03:24Z"
59 }
60 ]
61 }
62 ]
63 }
64 }
65}

Halfak closed this task as Resolved.Aug 16 2019, 9:16 PM