mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-10 16:44:50 -05:00
Scoped label improvements #10296
Open
opened 2025-11-02 09:03:26 -06:00 by GiteaMirror
·
20 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1.16.1
v1.16.0
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.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#10296
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @brechtvl on GitHub (Feb 18, 2023).
Feature Description
Now that there is an initial implementation of scoped labels (#22585), there are some things to improve. Aimed at v1.19:
/was removed from the label name, however there is no communication for blind users that the exclusive checkbox is grayed out. (#23306)Important (for v1.20?):
Nice to haves:
/in the text.@lafriks commented on GitHub (Feb 18, 2023):
Created PR #22976 to allow creating labels from yaml template files that allows exclusive scope option set
@lafriks commented on GitHub (Feb 18, 2023):
One thing I noticed (could be bug?) - non-exclusive scoped labels should also be rendered same as exclusive
@brechtvl commented on GitHub (Feb 18, 2023):
Communicating which labels are exclusive seems important. So even if we render non-exclusive ones in a similar style, there should probably be some visual difference still? I don't immediately have a good idea for what that would look like.
@lafriks commented on GitHub (Feb 18, 2023):
I don't think it's important to see it's exclusive or not when displaying issue or in issue list. It's only important when displaying label selection menu where it's already understandable which are exclusive and which are not
@BLumia commented on GitHub (Mar 8, 2023):
Quoted from the release note:
This should probably mark as breaking since existing labels may already contain
/, e.g.triage | confirmed / verified(we used to use|as delimiter).Also, could we re-consider making the scope delimiter configurable? A per-instance option could be enough IMO. Some reason:
/can means "or". Using/as scope delimiter makes people not able to use/to express "or" for short.|or::) could help avoid public services like Codeberg break labels in existing projects https://github.com/go-gitea/gitea/pull/22585#issuecomment-1408550024::make perfect sense since it stands for namespace in some programming language and also could avoid such conflict. Also, GitLab already uses that so people don't need to learn it again if they are familiar with GitLab. It might seem ugly if we see that as pain text but we don't need to render it that way...@lafriks commented on GitHub (Mar 8, 2023):
As I already mentioned in PR configurable delimiters will make it problematic especially in following cases:
@lafriks commented on GitHub (Mar 8, 2023):
NB, if you do not explicitly set that this scoped label is explicit only display will be affected not functionality so nothing will break for existing instances
@BLumia commented on GitHub (Mar 9, 2023):
IMHO it's the instance maintainer's responsibility to keep the label not breaking.
For the current configuration, migrating issues from GitLab to Gitea might break the scoped labels since the delimiter is different and we cannot change it to the same one if intended to keep labels not breaking.
Honestly, if we insist to keep this unconfigurable, I'll +1 for using
::instead of/which will cause much less issues, but since/already been merged, so I think making it configurable could still help for some small team to avoid breaking scoped labels.Existing labels that contain
/will display in a confusing way if the user doesn't realize there is a new feature related to label. That's also considered breaking.@lunny commented on GitHub (Mar 9, 2023):
I don't think it's a break current implementation? There is a new column
exclusive. The labels contains/will be considered scoped onlyexclusiveis true.@BLumia commented on GitHub (Mar 9, 2023):
Sorry for not actually trying the feature, this feature looks like this:
If user mark it as
exclusivethen/will be used as scope delimiter. For existing labels,exclusivewill not be marked so it won't break anything. So I guess we don't need to mark it as breaking :)btw, a use-case, do we support escaping the delimiter? For example, the label I mentioned above:
triage | confirmed / verified. How can I write this in the current implementation? Istriage/confirmed \/ verifiedcorrect?(p.s. the reason I think
::is good for use as delimiter is, we can safely say escaping is not needed at all since it semantically means namespace and user won't use it for anything other than scoping)@lafriks commented on GitHub (Mar 9, 2023):
As we know that GitLab will always have
::as delimiter we should convert them to Gitea delimiter when migrating labels.@BLumia commented on GitHub (Mar 10, 2023):
For example, how it will be if the original label in GitLab is
triage::confirmed / verified?@BLumia commented on GitHub (Mar 10, 2023):
Another idea:
/by default since people may think::is ugly.::in database ifExclusiveis checked. Which means we always use::as delimiter in database.::back to the delimiter that user configured.If we do this, then:
/as non-delimiter without escaping, sotriage::confirmed / verifiedis possible without doing escaping./(or whatever they like) as delimiter in the web interface so user won't think it's ugly.@brechtvl commented on GitHub (Mar 12, 2023):
Personally my preference was to use
::but I also think the/we ended up with is fine. For either I think it's best for this to not be configurable. I made arguments for this in the original code review and my opinion on this is still the same.I don't think changing
::just in the database works well, there also the API and any automation like bots built on that to consider. We can't cleanly hide the details of that, to me it seems like that risks further confusion. Having a single simple convention is easier in that sense.Personally I think it's reasonable that in the (rare) case a label contains
/with a different purpose it can be changed to e.g.or,|or something else.@BLumia commented on GitHub (Mar 12, 2023):
Just ensure all API will always get
::and document this behavior. Make the configurable delimiter only works on the frontend instead of backend (consider those APIs are for backend, so always use the raw string that uses::as delimiter in the API. I guess that will work.I honestly don't think the usage of
/for 'or' will be rare.@dboreham commented on GitHub (Jun 1, 2023):
Hopefully this is a good place to mention: has any work been done on sorting by scoped label value in the issues list? The specific use case I have is to sort on
Priority/xxx. This would need some way to assign an order key to each label in the set. I'm interested in implementing this if nobody is working on it.@brechtvl commented on GitHub (Jun 1, 2023):
To my knowledge, no work has been done on such sorting.
@lafriks commented on GitHub (Jun 1, 2023):
Yes, I'm slowly working on this for 3y now 😅 #11669
@lunny commented on GitHub (Apr 10, 2025):
#33206 merged.
@tlf30 commented on GitHub (Sep 21, 2025):
Is there any hope to get non-exclusive scoped labels to render the same way as exclusive?
Honestly, this would be very nice to have. I think just even drop down for: [Exclusive, Non-Exclusive, Not Scoped] would be perfect, and default all existing labels to Not Scoped if the current Exclusive checkbox is not checked. This would prevent breaking backwards comparability and give us the option to render scoped labels the same way as the exclusive scoped labels.
Just my two cents,
Trevor