Page MenuHomePhabricator

create Schema entity
Closed, ResolvedPublic13 Story Points

Description

As an editor I want to store a Schema I just prepared in order to share it with other editors.

Mockup:

BDD
GIVEN the SpecialPage Special:NewSchema
WHEN clicking "Create"
THEN a new Schema entity is created and persisted
AND it is assigned an ID
AND the user is redirected to the new Schema page

Acceptance criteria:

  • new Schema entities can be created
  • new Schema entities go to their own namespace (Schema:)
  • new Schema entities are given incrementing unique IDs starting with an O followed by numbers
  • Schema entity page contains the following data: ID, label, description and aliases in the user interface language
  • Label, description and alias in the user language are displayed in the header, or "there is no label" when there is no data in the user language
  • a new entry is added to Recent changes, watchlist and Schema page history with the text "Created a new Schema: label, description"
  • blocked users are not able to create a new Schema

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 22 2018, 3:16 PM
abian awarded a token.Jan 7 2019, 3:08 PM
abian added a subscriber: abian.
Tarrow updated the task description. (Show Details)Jan 7 2019, 3:11 PM
Tarrow updated the task description. (Show Details)
Tarrow added a subscriber: Tarrow.Jan 7 2019, 3:18 PM

The recent changes entry should be as similar as possible to the "New Item" one. i.e. include the label in the language used for the creation

abian added a comment.EditedJan 13 2019, 11:46 PM

Some questions (and opinions, some of them quite uninformed):

  1. What should the content of labels, descriptions and aliases be for Schemas?
  2. Should we have more than one Schema for the same explicit class?
    1. If so, how could we link all the Schemas that are affecting the same explicit class (and, for example, virtually merge them for reasoning purposes in case we want to find duplicate rules at some point)?
    2. If not (my preferred option), what's the point of having manually typed labels? Schema's labels may be the corresponding class' labels, so they could be automatically retrieved.
  3. Should we explicitly affect more than one class from the same Schema? (At an organizational level I would say the best option is to have 1 explicit class and optionally its subclasses ↔ 1 Schema.)
  4. How should we link classes to their related Schemas in a way readable by machines? I guess these links, maybe statements, can be automatically materialized and updated. Would we do so?
  5. Will subclasses inherit their parent classes' Schemas?
  6. What privileges should be needed to create/modify a Schema that doesn't have a special protection status? (I would say a confirmed status.)
  7. Should at least one label be required? (I would say yes.)
  8. Should at least one description be required? (I would say no.)
  9. Should different Schemas with duplicate labels in the same language be accepted? (I would say no, they shouldn't be accepted; however, if we have the option "1 explicit class and optionally its subclasses ↔ 1 Schema", then we'll have to choose the same criteria applied to Items: the duplicate combination of label+description is what we shouldn't accept.)
  10. Should different Schema entities be able to specify the same schema on the same classes? (I would say no, they shouldn't.)
  11. How do we prevent one Schema from contradicting another?

They are many questions but perhaps it's good to begin to discuss them soon and, in any case, before Schemas are already working.

Some questions (and opinions, some of them quite uninformed):

  1. What should the content of labels, descriptions and aliases be for Schemas?

I'm imagining something like "humans - Schema to ensure basic structure of Items about humans"

  1. Should we have more than one Schema for the same explicit class?

I wouldn't want to restrict this.

  1. If so, how could we link all the Schemas that are affecting the same explicit class (and, for example, virtually merge them for reasoning purposes in case we want to find duplicate rules at some point)?

They could be linked from statements on the Item for the class or probably more useful on pages of related wiki projects.

  1. If not (my preferred option), what's the point of having manually typed labels? Schema's labels may be the corresponding class' labels, so they could be automatically retrieved.

See above.

  1. Should we explicitly affect more than one class from the same Schema? (At an organizational level I would say the best option is to have 1 explicit class and optionally its subclasses ↔ 1 Schema.)

I wouldn't want to prevent it.

  1. How should we link classes to their related Schemas in a way readable by machines? I guess these links, maybe statements, can be automatically materialized and updated. Would we do so?

Yeah probably statements later.

  1. Will subclasses inherit their parent classes' Schemas?

I have not thought much about that.

  1. What privileges should be needed to create/modify a Schema that doesn't have a special protection status? (I would say a confirmed status.)

I think especially at the beginning it will be very obscure and there is no large scale implications like with creating a new property. So I wouldn't initially restrict it. If it turns out to be a problem this should be easy enough to do.

  1. Should at least one label be required? (I would say yes.)

We don't require it for items. And it probably makes moving a label from one language to another more bothersome than it needs to be.

  1. Should at least one description be required? (I would say no.)

Agreed.

  1. Should different Schemas with duplicate labels in the same language be accepted? (I would say no, they shouldn't be accepted; however, if we have the option "1 explicit class and optionally its subclasses ↔ 1 Schema", then we'll have to choose the same criteria applied to Items: the duplicate combination of label+description is what we shouldn't accept.)

See above.

  1. Should different Schema entities be able to specify the same schema on the same classes? (I would say no, they shouldn't.)

It'd probably mean they are redundant but I'm not sure how we'd prevent it technically.

  1. How do we prevent one Schema from contradicting another?

I'd like to see if this actually becomes a problem. I am worried that if we make things too strict we're also breaking the system. It's a delicate balance.

They are many questions but perhaps it's good to begin to discuss them soon and, in any case, before Schemas are already working.

Jep :)

WMDE-leszek updated the task description. (Show Details)Jan 14 2019, 4:08 PM
WMDE-leszek updated the task description. (Show Details)Jan 14 2019, 4:13 PM
WMDE-leszek updated the task description. (Show Details)
WMDE-leszek triaged this task as Normal priority.Jan 14 2019, 4:17 PM
WMDE-leszek updated the task description. (Show Details)
WMDE-leszek set the point value for this task to 13.
Lydia_Pintscher closed this task as Resolved.Jan 29 2019, 8:16 AM
Lydia_Pintscher claimed this task.