Page MenuHomePhabricator

Vuex store: Create JS class Row
Closed, ResolvedPublic

Description

Description

ZObjects are stored in vuex in the shape of tables, where each row has the following properties:

{
  id: 11
  key: "Z40K1"
  parent: 7
  value: "object"
}

Create a JS class for Row handles all the common behavior (getters, isObject, isArray, isTerminal, etc...)

Desired behavior/Acceptance criteria

  • Add Row class
  • Change Vuex store methods (getRowBy...) so that they return Row instead of Object
  • Move all common methods to this class (getters, isObject, isArray, isTerminal, etc...)
  • Replace the usage of row object with the new Row in the default components
  • Add tests!

Completion checklist

Event Timeline

Change 886377 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] [WIP] Add Row class and use in zobjectTree and zobject modules

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

Change 886377 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Add Row class and use in zobjectTree and zobject modules

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

gengh raised the priority of this task from High to Needs Triage.Jul 31 2023, 4:06 PM