Simplify usage of isClosed property in job logs
What does this MR do and why?
This change removes Vuex state management when toggling a section in the
job logs in favor a simple Vue data()
state.
This change help separate the data (job logs) from the its presentation (section open/closed).
Why now?
As part of #409350 (closed), I plan to refactor how we process logs when they reach the frontend (demonstrated in the early draft !135861 (closed)). In that design, the collapsed state of the logs must be kept separate from the actual log data, as the nested sections format is no preserved in the store, but recalculated when logs are modified, such as when they get fetched.
This change also has some advantages:
- Removes some coupling between Vuex and Vue, as we remove the mutation that called
Vue.set
. - Remove some events being passed in between components to reach the Vuex state.
- Less code for the same result.
Screenshots or screen recordings
Same as before, log sections can be collapsed or uncollapsed:
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #409350 (closed)