diff --git a/templates/repo/issue/filter_list.tmpl b/templates/repo/issue/filter_list.tmpl index c6de4977dc5dd..3cb57b7f3db72 100644 --- a/templates/repo/issue/filter_list.tmpl +++ b/templates/repo/issue/filter_list.tmpl @@ -29,7 +29,7 @@ {{range .Labels}} {{$exclusiveScope := .ExclusiveScope}} {{if and (ne $previousExclusiveScope $exclusiveScope)}} -
+ {{end}} {{$previousExclusiveScope = $exclusiveScope}} diff --git a/templates/repo/issue/labels/labels_selector_field.tmpl b/templates/repo/issue/labels/labels_selector_field.tmpl index e5f15caca5a6f..1527c9037ab60 100644 --- a/templates/repo/issue/labels/labels_selector_field.tmpl +++ b/templates/repo/issue/labels/labels_selector_field.tmpl @@ -18,7 +18,7 @@ {{range .Labels}} {{$exclusiveScope := .ExclusiveScope}} {{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}} - + {{end}} {{$previousExclusiveScope = $exclusiveScope}} {{if $exclusiveScope}}{{svg "octicon-dot-fill"}}{{else}}{{svg "octicon-check"}}{{end}} {{RenderLabel $.Context ctx.Locale .}} @@ -26,12 +26,12 @@{{template "repo/issue/labels/label_archived" .}}
{{end}} - + {{$previousExclusiveScope = "_no_scope"}} {{range .OrgLabels}} {{$exclusiveScope := .ExclusiveScope}} {{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}} - + {{end}} {{$previousExclusiveScope = $exclusiveScope}} {{if $exclusiveScope}}{{svg "octicon-dot-fill"}}{{else}}{{svg "octicon-check"}}{{end}} {{RenderLabel $.Context ctx.Locale .}} diff --git a/web_src/js/features/repo-issue-list.js b/web_src/js/features/repo-issue-list.js index 92f058c4d20e1..8177a07b00a19 100644 --- a/web_src/js/features/repo-issue-list.js +++ b/web_src/js/features/repo-issue-list.js @@ -221,6 +221,8 @@ function initArchivedLabelFilter() { for (const label of archivedLabels) { const id = label.getAttribute('data-label-id'); toggleElem(label, archivedLabelEl.checked || selectedLabels.includes(id)); + // also toggle the divider + toggleElem($(label).next('.exclusive-scope'), archivedLabelEl.checked || selectedLabels.includes(id)); } }; diff --git a/web_src/js/features/repo-issue.js b/web_src/js/features/repo-issue.js index 2b2eed58bbfb3..2a65b1f3a103c 100644 --- a/web_src/js/features/repo-issue.js +++ b/web_src/js/features/repo-issue.js @@ -744,5 +744,7 @@ export function initArchivedLabelHandler() { if (!document.querySelector('.archived-label-hint')) return; for (const label of document.querySelectorAll('[data-is-archived]')) { toggleElem(label, label.classList.contains('checked')); + // also toggle the divider + toggleElem($(label).next('.exclusive-scope'), label.classList.contains('checked')); } }