Page MenuHomePhabricator

[Story] Allow simultaneous editing of mainsnak and references
Closed, ResolvedPublic1 Estimated Story Points

Description

Use cases

  • [add] When I am adding a new statement, it should be possible to add an arbitrary number of new references by clicking the "add reference" button. Newly added references get saved when the "save" button for the statement is clicked.
  • [edit] When I am editing an existing statement, I want to be able to edit all related references as well. All changes made to the references will be saved when the "save" button for the statement is clicked.
  • [remove] When I am editing an existing statement that has references I want to be able to remove an arbitrary number of existing references from this statement by clicking an "remove" button which is placed in the heading of each reference. Removing individual reference snaks from a particular reference is done by clicking the "remove" button just beside the snak as it is working right now. All changes made to the references will only be saved once the "save" button for the statement is clicked.
  • [error handling] Changes to the statement will only be saved successful when all data including the references is valid. Otherwise an error is shown just as it works right now for invalid qualifiers or main snaks.
NOTE: Add Reference button should always be visible.

pasted_file (382×1 px, 26 KB)

pasted_file (146×946 px, 12 KB)

pasted_file (348×935 px, 30 KB)

Details

SubjectRepoBranchLines +/-
mediawiki/extensions/Wikibasemaster+153 -57
mediawiki/extensions/Wikibasemaster+83 -16
mediawiki/extensions/Wikibasemaster+5 -0
mediawiki/extensions/Wikibasemaster+106 -0
mediawiki/extensions/Wikibasemaster+17 -1
mediawiki/extensions/Wikibasemaster+14 -0
mediawiki/extensions/Wikibasemaster+19 -14
mediawiki/extensions/Wikibasemaster+6 -1
mediawiki/extensions/Wikibasemaster+9 -10
mediawiki/extensions/Wikibasemaster+2 -2
mediawiki/extensions/Wikibasemaster+4 -1
mediawiki/extensions/Wikibasemaster+10 -11
mediawiki/extensions/Wikibasemaster+2 -10
mediawiki/extensions/Wikibasemaster+19 -20
mediawiki/extensions/Wikibasemaster+11 -7
mediawiki/extensions/Wikibasemaster+7 -14
Show related patches Customize query in gerrit

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.
StatusSubtypeAssignedTask
OpenNone
InvalidNone
ResolvedLydia_Pintscher
Declined Jonas
Invalidthiemowmde
Resolvedadrianheine
Resolvedadrianheine
Resolved Jonas
Resolved Jonas
Resolved Jonas
Resolvedadrianheine
Resolvedadrianheine
Resolved Jonas
Resolved Jonas
Resolved Jonas
Resolved Jonas
Resolved Jonas
Resolved Jonas
Resolved Jonas

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
thiemowmde edited subscribers, added: Jonas; removed: gerritbot.

Change 224072 merged by jenkins-bot:
Include references in statementview.isInitialValue()

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

Change 224076 abandoned by Thiemo Mättig (WMDE):
Add combined statementview-referenceview remove toolbar

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

Change 224074 merged by Thiemo Mättig (WMDE):
Add missing listview dependencies to toolbar controllers

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

Change 223542 abandoned by Thiemo Mättig (WMDE):
Make referencesChanger optional in the referenceview widget

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

Change 190799 abandoned by Jonas Kress (WMDE):
[DNM] Edit References along with Statement

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

[Task] Referenceview must *not* trigger any API request when clicking [remove]

Which remove button does this refer to?

[Task] The referenceview must bubble up "change" events to the referencelistview, then to the statementview

There is no referencelistview, there's just a listview of referenceview widgets in statementview.

[Task] Add new bool parameter "editReferencesAlongWithStatement" to referenceview to disable save+cancel

I suggest that we don't do this. Instead, we could a) use statementGuid as a flag (crude, but no so incorrect) or b) replace statementGuid and referencesChanger options with a simple saveReference ({Function|null}) option that acts as a flag (better, but a bit more work).

[Task] Reference views must switch back to non-edit mode when statementview's saving is done

That currently happens because the statementview recreates all it's child widgets on save.

[Task] Referenceview must *not* trigger any API request when clicking [remove]

Which remove button does this refer to?

When removing a reference the API request for removing should be sent when the save button of the statement is clicked.

That does not answer my question. Let me rephrase it: »For which [remove] button do we need a task of making sure it does not trigger an API call?« Remember that a Statement has multiple References which in turn have a SnakList which has multiple Snaks. There are multiple remove buttons within a statementview. I don't understand which one of these would be present in the case at hand but does currently trigger an API request.

When removing a reference the API request for removing should be sent when the save button of the statement is clicked.

Actually, this is not true: There shouldn't be an API request for removing a reference, since the statement is saved as a whole. This implicitly removes the reference.

Jonas assigned this task to adrianheine.
Jonas moved this task from Doing to Backlog on the Wikidata-Sprint-2015-10-13 board.
Jonas moved this task from Backlog to Doing on the Wikidata-Sprint-2015-10-13 board.
Jonas updated the task description. (Show Details)
Jonas moved this task from Doing to Backlog on the Wikidata-Sprint-2015-11-03 board.
Jonas updated the task description. (Show Details)

Did functional testing. Everything works pretty well as far as I can see.

Bugs found:

  • remove button on references snak removes whole reference instead of only one snak.

Error message is shown at save button approved by @Lydia_Pintscher