Commit a10d4fda authored by Scott Hampton's avatar Scott Hampton

Use utility classes and nest props for list

- Use utility classes in the summary row instead
of the original classes. This makes it easier to
override individual classes.
- Add a `nested-level` prop for the issues list so
that we can nest according to the padding we want.
parent 2fda18cc
...@@ -172,7 +172,7 @@ export default { ...@@ -172,7 +172,7 @@ export default {
:new-issues="newIssues(report)" :new-issues="newIssues(report)"
:resolved-issues="resolvedIssues(report)" :resolved-issues="resolvedIssues(report)"
:component="$options.componentNames.TestIssueBody" :component="$options.componentNames.TestIssueBody"
class="report-block-group-list gl-pl-8" :nested-level="2"
/> />
</template> </template>
<modal <modal
......
...@@ -67,6 +67,11 @@ export default { ...@@ -67,6 +67,11 @@ export default {
required: false, required: false,
default: null, default: null,
}, },
nestedLevel: {
type: Number,
required: false,
default: 0,
},
}, },
computed: { computed: {
issuesWithState() { issuesWithState() {
...@@ -80,6 +85,12 @@ export default { ...@@ -80,6 +85,12 @@ export default {
wclass() { wclass() {
return `report-block-list ${this.issuesUlElementClass}`; return `report-block-list ${this.issuesUlElementClass}`;
}, },
listClasses() {
return {
'gl-pl-7': this.nestedLevel === 1,
'gl-pl-8': this.nestedLevel === 2,
};
},
}, },
}; };
</script> </script>
...@@ -89,6 +100,7 @@ export default { ...@@ -89,6 +100,7 @@ export default {
:remain="$options.maxShownReportItems" :remain="$options.maxShownReportItems"
:size="$options.typicalReportItemHeight" :size="$options.typicalReportItemHeight"
class="report-block-container" class="report-block-container"
:class="listClasses"
wtag="ul" wtag="ul"
:wclass="wclass" :wclass="wclass"
> >
......
...@@ -49,18 +49,9 @@ export default { ...@@ -49,18 +49,9 @@ export default {
}, },
rowClasses() { rowClasses() {
if (!this.nestedSummary) { if (!this.nestedSummary) {
return ['report-block-list-issue', 'report-block-list-issue-parent']; return ['gl-px-5'];
} }
return [ return ['gl-pl-7', 'gl-pr-5', { 'gl-bg-gray-10': this.statusIcon === ICON_WARNING }];
'gl-display-flex',
'gl-pl-7',
'gl-py-3',
'gl-pr-3',
'gl-border-t-solid',
'gl-border-t-gray-100',
'gl-border-t-1',
{ 'gl-bg-gray-10': this.statusIcon === ICON_WARNING },
];
}, },
statusIconSize() { statusIconSize() {
if (!this.nestedSummary) { if (!this.nestedSummary) {
...@@ -72,7 +63,10 @@ export default { ...@@ -72,7 +63,10 @@ export default {
}; };
</script> </script>
<template> <template>
<div class="gl-align-items-center" :class="rowClasses"> <div
class="gl-border-t-solid gl-border-t-gray-100 gl-border-t-1 gl-py-3 gl-display-flex gl-align-items-center"
:class="rowClasses"
>
<div class="gl-mr-3"> <div class="gl-mr-3">
<gl-loading-icon <gl-loading-icon
v-if="statusIcon === 'loading'" v-if="statusIcon === 'loading'"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment