Page MenuHomePhabricator

[MEX] Add statement button works on items with no statement
Closed, ResolvedPublic

Description

Currently if an item doesn't have any statements in place, it's not possible to add a statement and see newly added statement after saving it without reloading the page.

It's something I figured out while working on T405454, it needs bigger changes therefore a new ticket would be better.

Currently every StatementGroupView is an individual Vue component, therefore if a new one is to be added, a new root component should be initialized. Instead of this, we can wrap those StatementGroupView components with one wrapper component, therefore we can add a new one easily within Vue.js.

AC:

  • After submitting a new statement to an item with no statements on mobile view, added statement is shown on the screen without page reload/refresh.

Event Timeline

Change #1212195 had a related patch set uploaded (by Hasan Akgün (WMDE); author: Hasan Akgün (WMDE)):

[mediawiki/extensions/Wikibase@master] Add statement group component on-the-fly if there is no element on DOM after creating a new statement

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

Change #1212195 abandoned by Hasan Akgün (WMDE):

[mediawiki/extensions/Wikibase@master] Add statement group component on-the-fly if there is no element on DOM after creating a new statement

Reason:

In favour of https://gerrit.wikimedia.org/r/1213469

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

This has been resolved with the patches from T411237