Label grouping
Labels are being passed to front-end dropdown as single list, meaning there was no intention to "group" or divide labels by org defined and repo defined.
In the UX it's looking weird why labels with same prefix are not grouped. This issue fixes that.
Screenshots
before
after
I just want to make one point. after this change, if organization has same label with repo, i will not be able to know which label is repo's label. currect order is repo labels then org labels, so i can know.
i am not sure if this is a problem or not.
⚠️ The real problem is: This is gonna break exclusive labels
Edit:
Issue List still old order:
This is what i mean:
I just want to make one point. after this change, if organization has same label with repo, i will not be able to know which label is repo's label. currect order is repo labels then org labels, so i can know.
Yes! There's already an issue: #31898
if organization has same label with repo, i will not be able to know which label is repo's label. currect order is repo labels then org labels, so i can know.
Does it matter to user which labels are org and repo? Also, how duplicate labels are practically used?
After reconsidered about this issue, I think we need to avoid creating duplicate labels, as this doesn't make sense. I guess the implementation of org labels was just copy-paste, didn't consider about the duplicate labels.
After reconsidered about this issue, I think we need to avoid creating duplicate labels, as this doesn't make sense. I guess the implementation of org labels was just copy-paste, didn't consider about the duplicate labels.
As I said, this should be human's job. Gitea only needs to display labels and it's groups right
I just want to make one point. after this change, if organization has same label with repo, i will not be able to know which label is repo's label. currect order is repo labels then org labels, so i can know.
maybe we can add a apecial prefix to make the org label be different on ui
I just want to make one point. after this change, if organization has same label with repo, i will not be able to know which label is repo's label. currect order is repo labels then org labels, so i can know.
maybe we can add a apecial prefix to make the org label be different on ui
I like this idea! We don't need to change much for this to work
As original author I got pinged in https://github.com/go-gitea/gitea/pull/10814#issuecomment-2526553126 for opinion. The claims of:
there was no intention to "group" or divide labels by org defined and repo defined.
I guess the implementation of org labels was just copy-paste, didn't consider about the duplicate labels.
Really aren't true at all. The fact that they are separated is intentional and is what considers the issue of duplicate labels. The fact that this PR would re-introduces those issues suggests that maybe they weren't fully considered or understood here.
As for the question of how "duplicate" labels are used, the main case was existing labels.
Imagine you had 100 repos in an org that each had their own kind/bug label and you can't even create a new org wide kind/bug label until you go through and change all of those to some other text.
And then again, you'd need to change them a second time to the org label if you wanted to start using that. The current design allowed people to start using org labels without changing anything that was already there. People could optionally move to org labels if they wanted to at whatever pace. There is some merit to not allowing duplicate labels, but the opinion was it didn't outweigh the flexibility of allowing them for a brand new feature. Of course org label support was also added to the Gitea API at the time so any advanced user could automate most of that and wasn't stuck actually changing 100 labels by hand if they wanted to switch to a new org wide label.
Smaller reasons included that some people want to have their repos bugs show up in a org wide kind/bug search and others don't. Some people want to have different colors and don't care about using the org wide repos.
So not saying the current design is perfect, but it was all intentional and considered.
