You need to sign in or sign up before continuing.
Follow-up: Simplify project and group VSA base.vue computed properties
The following discussion from !67556 (merged) should be addressed:
-
@markrian started a discussion: (+1 comment) suggestion (non-blocking): I personally find object unpacking hard to read when it goes more than one level deep, so I would probably have written this like so:
selectedStageCount() { return this.selectedStage ? this.stageCounts[this.selectedStage.id] ?? 0 : 0;
But that's a personal preference, and I see similar object unpacking going on in the area, so feel free to disregard this.
question: Having said that, given that this depends entirely on store state, would this make more sense as a Vuex getter, rather than a component's computed prop?
Implementation guide
Simplify access to nested attributes in the stage table computed properties:
- https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/cycle_analytics/components/base.vue
- https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/cycle_analytics/components/stage_table.vue
- https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/cycle_analytics/components/total_time_component.vue
Edited by Ezekiel Kigbo