-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Hide archived labels by default from the suggestions when assigning labels for an issue #27451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e25b7fc
2fa6357
8db7e06
f0be3f7
0560ad0
90116d8
33b01af
1a55eae
62cbe2b
1f592c3
009f923
107accb
5e855a5
d281bbe
e9062ba
2da88f7
a375801
a43dd00
6e70661
9d8ed4b
7101b32
c4db3ad
e3bffa7
b17d36a
013008e
c3f1a40
f7813de
f52da8f
7b84f89
12411af
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,3 +45,8 @@ | |
.label-operation .label { | ||
height: fit-content; | ||
} | ||
|
||
.archived-label-hint { | ||
float: right; | ||
margin: -12px; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -680,3 +680,16 @@ export function initIssueTemplateCommentEditors($commentForm) { | |
initCombo($(el)); | ||
} | ||
} | ||
|
||
// This function used to show and hide archived label on issue/pr | ||
// page in the sidebar where we select the labels | ||
// If we have any archived label tagged to issue and pr. We will show that | ||
// archived label with checked classed otherwise we will hide it | ||
// with the help of this function. | ||
// This function runs globally. | ||
export function initArchivedLabelHandler() { | ||
if (!document.querySelector('.archived-label-hint')) return; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are we selecting for this hint? Seems brittle. Can the below loop stand on its own without this? If not, at least add a comment explaining the reason for this selector. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will refactor this naming a little bit. |
||
for (const label of document.querySelectorAll('[data-is-archived]')) { | ||
toggleElem(label, label.classList.contains('checked')); | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.