Nikki created this task.
Nikki added a project: Wikidata.
Restricted Application added a subscriber: Aklapper.

TASK DESCRIPTION
  There are a number of gadgets and user scripts which create or edit 
statements. These usually tell the user to refresh the page to see the updated 
data, or refresh the page automatically after editing, because there's no way 
for the scripts to do it themselves.
  
  If the page is not reloaded, the user sees an outdated version of the entity, 
which can cause problems (e.g. adding duplicate statements because the existing 
one is not visible). If the page is reloaded, that involves a lot of requests 
to the servers which could be avoided and slows down the user who needs to wait 
for the page to load and render and then find their position on the page again 
before they can continue editing. Therefore it would be useful for scripts to 
be able to tell the page to update the things they have changed without 
requiring a full page reload.
  
  It would be expected to behave something like this:
  
  - There should be a function which accepts at least one statement ID as a 
parameter.
  - Ideally it should allow an array of IDs so that it doesn't have to be 
called multiple times if multiple statements were added/edited.
  - It should check that the ID is for a statement on the current entity. If 
not, it should refuse to load it.
  - If the statement is not already loaded (i.e. a new statement was added), it 
should be added to the page.
  - If the statement is already loaded (i.e. an existing statement was edited), 
it should be updated to show the current state.
  - If the statement no longer exists (i.e. an existing statement was deleted), 
it should be removed from the page.
  - After adding/updating a statement, it should be possible to make further 
edits to it using the normal UI.
  - After adding/updating/removing a statement, statement-related hooks should 
be called (`wikibase.statement.saved` for adding/updating, 
`wikibase.statement.removed` for removing) so that code which reacts to 
statements being changed is run.

TASK DETAIL
  https://phabricator.wikimedia.org/T297061

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Nikki
Cc: Nikki, Aklapper, Invadibot, maantietaja, Akuckartz, Nandana, Lahi, Gq86, 
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, 
Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org

Reply via email to