File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,32 @@ const status = computed<ColumnCardStatus>(() => ({
24
24
const radicleInterfaceBaseUrl = useRadicleInterfaceBaseUrl ()
25
25
const isDebugging = useIsDebugging ()
26
26
27
+ // TODO: zac reduce duplication between ColumnIssueCard and ColumnPatchCard
27
28
const labels = computed (() =>
28
29
isDebugging .value
29
30
? props .issue .labels
30
31
: props .issue .labels .filter ((label ) => ! label .startsWith (dataLabelNamespace )),
31
32
)
32
33
34
+ const highlights = computed (() => {
35
+ if (! props .highlights ) {
36
+ return undefined
37
+ }
38
+
39
+ if (isDebugging .value ) {
40
+ return props .highlights
41
+ }
42
+
43
+ const filteredHighlightLabels = props .highlights .labels .filter (
44
+ (label ) => ! (label [0 ] ?? ' ' ).startsWith (dataLabelNamespace ),
45
+ )
46
+
47
+ return {
48
+ ... props .highlights ,
49
+ labels: filteredHighlightLabels ,
50
+ }
51
+ })
52
+
33
53
const href = computed (() =>
34
54
new URL (
35
55
` /nodes/${route .params .node }/${route .params .rid }/issues/${props .issue .id } ` ,
Original file line number Diff line number Diff line change @@ -29,12 +29,32 @@ const status = computed<ColumnCardStatus>(() => ({
29
29
const radicleInterfaceBaseUrl = useRadicleInterfaceBaseUrl ()
30
30
const isDebugging = useIsDebugging ()
31
31
32
+ // TODO: zac reduce duplication between ColumnIssueCard and ColumnPatchCard
32
33
const labels = computed (() =>
33
34
isDebugging .value
34
35
? props .patch .labels
35
36
: props .patch .labels .filter ((label ) => ! label .startsWith (dataLabelNamespace )),
36
37
)
37
38
39
+ const highlights = computed (() => {
40
+ if (! props .highlights ) {
41
+ return undefined
42
+ }
43
+
44
+ if (isDebugging .value ) {
45
+ return props .highlights
46
+ }
47
+
48
+ const filteredHighlightLabels = props .highlights .labels .filter (
49
+ (label ) => ! (label [0 ] ?? ' ' ).startsWith (dataLabelNamespace ),
50
+ )
51
+
52
+ return {
53
+ ... props .highlights ,
54
+ labels: filteredHighlightLabels ,
55
+ }
56
+ })
57
+
38
58
const href = computed (() =>
39
59
new URL (
40
60
` /nodes/${route .params .node }/${route .params .rid }/patches/${props .patch .id } ` ,
You can’t perform that action at this time.
0 commit comments