Refactor update list for boards

Summary

As a result of working on this MR and the discussion, gitlab-foss!32909 (comment 216668724), I thought it would be a good idea to consider refactoring how we update Board Lists https://gitlab.com/gitlab-org/gitlab/blob/master/app%2Fassets%2Fjavascripts%2Fboards%2Fmodels%2Flist.js#L115. Currently we are pulling directly from the model which unnecessarily couples the list to the board_store and board_service. Also, we are working on features in Plan where we are adding more functionality and customizability to the Board Lists. In this case well only want to update the parts of the list that have changed, not the entire list object as proposed gitlab-foss!32909 (comment 216408990).

Improvements

  1. Decoupling
  2. Making our requests to the backend contain less information
  3. More flexible approach to updating board lists.
  4. Allow for list state to be updated independent of request values and avoid mutation side effects.

Risks

None that I can think of.

Involved components

  • https://gitlab.com/gitlab-org/gitlab/blob/master/app%2Fassets%2Fjavascripts%2Fboards%2Fmodels%2Flist.js
  • https://gitlab.com/gitlab-org/gitlab/blob/master/app%2Fassets%2Fjavascripts%2Fboards%2Fservices%2Fboard_service.js

related issue: #28616 (closed)

Optional: Intended side effects

Optional: Missing test coverage

/cc @winh I just saw this #28616 (closed). But didnt see an updateList function in the BoardStore. If we remove boardService that will need to be built as well i believe.

Edited Sep 13, 2019 by Scott Stern
Assignee Loading
Time tracking Loading