[Story] Allow simultaneous editing of mainsnak and references
Closed, ResolvedPublic1 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.



Related Objects

StatusAssignedTask
OpenNone
InvalidNone
ResolvedLydia_Pintscher
DeclinedJonas
Invalidthiemowmde
Resolvedadrianheine
Resolvedadrianheine
ResolvedJonas
ResolvedJonas
ResolvedJonas
Resolvedadrianheine
Resolvedadrianheine
ResolvedJonas
ResolvedJonas
ResolvedJonas
ResolvedJonas
ResolvedJonas
ResolvedJonas
ResolvedJonas
There are a very large number of changes, so older changes are hidden. Show Older Changes
Jonas updated the task description. (Show Details)Aug 20 2015, 9:07 AM
thiemowmde updated the task description. (Show Details)Aug 20 2015, 11:00 AM
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

Tobi_WMDE_SW updated the task description. (Show Details)Sep 15 2015, 1:23 PM
thiemowmde updated the task description. (Show Details)Sep 15 2015, 1:31 PM
Tobi_WMDE_SW removed thiemowmde as the assignee of this task.Sep 29 2015, 2:00 PM

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).

adrianheine updated the task description. (Show Details)Oct 20 2015, 8:18 AM

[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.

Jonas added a comment.Oct 20 2015, 9:04 AM
[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.

adrianheine updated the task description. (Show Details)Oct 21 2015, 11:58 AM
Jonas removed adrianheine as the assignee of this task.Oct 21 2015, 12:25 PM
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 assigned this task to adrianheine.
Jonas updated the task description. (Show Details)
Jonas removed adrianheine as the assignee of this task.
Jonas updated the task description. (Show Details)
Jonas updated the task description. (Show Details)Nov 4 2015, 10:23 AM
adrianheine updated the task description. (Show Details)Nov 4 2015, 1:27 PM
adrianheine updated the task description. (Show Details)Nov 4 2015, 1:35 PM
Jonas moved this task from Review to Backlog on the Wikidata-Sprint-2015-11-03 board.

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

Jonas updated the task description. (Show Details)Nov 9 2015, 3:00 PM
Lydia_Pintscher closed this task as Resolved.Dec 1 2015, 10:39 AM
Lydia_Pintscher claimed this task.