Refactor listItems computed for clarity
What does this MR do and why?
This MR implements a suggestion from !109508 (comment 1249635857)
Suggestion(not a blocker) For clarity I think the sortedDraft
count can be moved at the beginning of the computed prop for better readability
const sortedDraftCount = this.sortedDrafts.length - 1;
return this.sortedDrafts.map((item, index) => ({
text: item.id.toString(),
action: () => {
this.onClickDraft(item);
},
last: index === sortedDraftCount,
...item,
}));
},
Screenshots or screen recordings
No visual changes
How to set up and validate locally
- Start reviewing an MR with the
Start review
button - Validate the
Pending review comments
dropdown
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.