Page MenuHomePhabricator

Special:CreateZObject
Closed, ResolvedPublic

Description

Implement a special page for creating ZObjects. Takes care of setting up the embedding Z2/Persistent object. Based on the designs.

Event Timeline

DVrandecic renamed this task from Specia:CreateObject to Special:CreateZObject.Jul 27 2020, 3:48 AM
DVrandecic triaged this task as Low priority.

Change 622365 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/WikiLambda@master] [WIP] Provide Special:CreateZObject

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

We aim for this task to cover a first, rough implementation. During the implementation it is expected that TODOs will remain open. That is expected and won't block the closing of these tasks, but these TODOs should be captured as new tasks and added for triage.

So that we have an early version up and running, that is not exactly specified.

DVrandecic raised the priority of this task from Low to High.Aug 27 2020, 9:35 PM
DVrandecic lowered the priority of this task from High to Medium.
DVrandecic raised the priority of this task from Medium to High.Sep 3 2020, 3:31 PM

I notice this is (so far) being implemented as a plain form with ooui - I think this is fine, though it limits what you can initially create. But Wikidata's create item is similarly limited to just the label, description and aliases in a given language. So I would suggest this should also be limited to the Z1 keys (type, label and description in a single language), with the id (Z1K2) auto-generated. Maybe I should check out the "designs" - I'm assuming the metawiki pages? (Edit: I just realized that the current design has Z2 - persistent Zobject - replacing most of the Z1 keys, so the id and labels come from Z2 now - anyway the same point stands that the initial creation of the object maybe could only use these required keys for a persistent ZObject.)

Is this the right design page: https://meta.wikimedia.org/wiki/Abstract_Wikipedia/Early_mockups#Create_an_object ?
I guess my question is whether the create page should be separated from the edit page (Special:CreateZObject as outlined in the approach here) or just go to a generic edit page which can do everything... ??

The create page should not be limited to just the label, description, etc., but involve also the creation of the object. That's why we made the edit page have this as a dependency - the edit page will probably be mostly the same code.

And yes, you got the designs right.

Jdforrester-WMF lowered the priority of this task from High to Medium.Sep 16 2020, 4:27 PM

Just a thought here - I would guess the main difference from the generic ZObject editor for the "Create" process is that there is no page ID yet. Presumably we want to generate the id's automatically - Z3834 followed by Z3835, Z3836, etc. Is there a standard approach to do that reliably? I know Wikidata's had issues with id values for their items (Qxxx...) getting skipped, but at least there doesn't seem to have been any issue with the same ID being generated twice in create. Anyway, whether or not that specific solution is adopted it sounds like that's an extra piece that's different from how normal wiki pages work generally...

Change 622365 merged by jenkins-bot:
[mediawiki/extensions/WikiLambda@master] Provide Special:CreateZObject by re-using the Vue editor

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

Just a thought here - I would guess the main difference from the generic ZObject editor for the "Create" process is that there is no page ID yet. Presumably we want to generate the id's automatically - Z3834 followed by Z3835, Z3836, etc. Is there a standard approach to do that reliably? I know Wikidata's had issues with id values for their items (Qxxx...) getting skipped, but at least there doesn't seem to have been any issue with the same ID being generated twice in create. Anyway, whether or not that specific solution is adopted it sounds like that's an extra piece that's different from how normal wiki pages work generally...

The way I've done it for now is to tell the editor we'll be Zn on init, with n picked to be the highest current ZID +1 (or Z100, to avoid writing in the 'protected' number range). This'll not scale when two people create at the same time (added a TODO); the Wikidata way involves creating a new API endpoint for creating them, and assigning the title in the API rather than in the request. We might do that, but it's a mess and as you say doesn't work perfectly when the DBs get confused.

I notice the special page is called Special:CreateZObject. Is there a precedent for CreateSomething as the name in other extensions? Because in the Wikibase universe we have Special:NewItem, NewProperty, NewLexeme, and NewEntitySchema; for editors already familiar with (some of) those pages, I worry that Special:CreateZObject might be a bit harder to remember.

I notice the special page is called Special:CreateZObject. Is there a precedent for CreateSomething as the name in other extensions? Because in the Wikibase universe we have Special:NewItem, NewProperty, NewLexeme, and NewEntitySchema; for editors already familiar with (some of) those pages, I worry that Special:CreateZObject might be a bit harder to remember.

All of this is preliminary; we can re-name it later, or add aliases. However, people shouldn't need to "remember" the URL that the big button on the main page takes them to…

Ah, my mistake, I forgot that it was NewItem and not CreateItem in Wikidata. Yeah, we can change it any time - if someone makes a patch to change it, put me as a reviewer, I'll accept it.

Probably better to call it NewObject even, instead of NewZObject, to reduce neologisms further.

But one way or the other, this task is resolved as the page is there and will get better as the editing elements get better.. Yay!

Change 633016 had a related patch set uploaded (by Lucas Werkmeister; owner: Lucas Werkmeister):
[mediawiki/extensions/WikiLambda@master] Rename Special:CreateZObject to Special:NewObject

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