Nothing Special   »   [go: up one dir, main page]

Page MenuHomePhabricator

Prefill keys when adding an object
Closed, ResolvedPublic

Description

Currently, when we add an object, and then select the type for the object, the object is created without a single key, and then we have to manually add all keys.

The system could read the type specification, and add all keys for the given type.

Current:

Screenshot 2020-10-22 at 11.00.49.png (283×879 px, 38 KB)

After:

Screenshot 2020-10-22 at 11.01.32.png (370×864 px, 51 KB)

Event Timeline

DVrandecic triaged this task as Lowest priority.Oct 22 2020, 6:46 PM
DVrandecic raised the priority of this task from Lowest to Low.Jan 13 2021, 5:36 PM
DVrandecic raised the priority of this task from Low to Medium.

Change 656241 had a related patch set uploaded (by Gabrielchihonglee; owner: Gabrielchihonglee):
[mediawiki/extensions/WikiLambda@master] Prefill keys when adding an object

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

Some possible improvements over current behavior can be:

  • Adapt the API call to follow the Vuex store pattern: when adding an object, we can ask the store if it has the Zid information available, it will only follow through and make the API call if the Zid has not been fetched yet. The action fetchZkeys already does that, and handles the storage of both Zids and labels, so this could be used here as well.
  • When a type is selected during creation, initialize it with the labels as well.
  • When the type is changed, apart from adding the new labels, remove the labels that belonged to the previous type.

Change 656241 merged by jenkins-bot:
[mediawiki/extensions/WikiLambda@master] Prefill keys when adding an object

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

Change 658011 had a related patch set uploaded (by Gabrielchihonglee; owner: Gabrielchihonglee):
[mediawiki/extensions/WikiLambda@master] Follow Wikimedia Vue coding conventions for api calls and improvement for key prefillment

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

Change 658011 merged by jenkins-bot:
[mediawiki/extensions/WikiLambda@master] Follow Wikimedia Vue coding conventions for api calls and improvement for key prefillment

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

DVrandecic raised the priority of this task from Medium to High.Jan 27 2021, 5:18 PM

Change 661811 had a related patch set uploaded (by Gabrielchihonglee; owner: Gabrielchihonglee):
[mediawiki/extensions/WikiLambda@master] Prefill keys when ZObject is init-ed

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

Change 661811 merged by jenkins-bot:
[mediawiki/extensions/WikiLambda@master] Prefill keys when ZObject is initialized

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

Thank you, Gabriel, Geno!