Skip to content

Render scoped labels #17189

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

Closed
anbraten opened this issue Sep 30, 2021 · 10 comments
Closed

Render scoped labels #17189

anbraten opened this issue Sep 30, 2021 · 10 comments
Labels
topic/ui Change the appearance of the Gitea UI type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@anbraten
Copy link
Contributor

Feature Description

Show scoped labels by using some kind of separator like: / or :: and show them as the following example of Gitlab:

Screenshots

Gitea uses some kind of scoped labels on Github:
Screenshot from 2021-09-30 08-12-20

Gitlab supports scoped labels by writing: scope::label name:
Screenshot from 2021-09-30 08-14-15

@delvh
Copy link
Member

delvh commented Sep 30, 2021

While I can absolutely understand this request, I don't know how well that would integrate into the existing theme mechanism…
I mean: Should themes be able to customize the appearance of such a scoped label?
If it should: How are themes supposed to know which color to convert to automatically?
If it shouldn't: Well, some labels might then be almost invisible in in some themes…

@anbraten
Copy link
Contributor Author

I suggest the yellow color in this example could be the current label color and the body bg-color (white) and text-color (black) could be defined by the theme. Having some sort of support for dark-mode colors for labels seems to be a different issue to me: #16728

@noerw noerw added type/proposal The new feature has not been accepted yet but needs to be discussed first. topic/ui Change the appearance of the Gitea UI labels Sep 30, 2021
@techknowlogick
Copy link
Member

on github our labels are literally something/something which can be used already in gitea.

@anbraten
Copy link
Contributor Author

anbraten commented Oct 2, 2021

@techknowlogick Doesn't seem to work for me on 1.15.3. Could you link a PR?

Screenshot from 2021-10-02 08-02-20

@lafriks lafriks reopened this Oct 2, 2021
@delvh
Copy link
Member

delvh commented Oct 2, 2021

@techknowlogick if I see that correctly, there is a misunderstanding between you two:
@techknowlogick, I think you mean that Gitea does not disallow a / inside labels, which is indeed correct.
A label test/label can be used in Gitea.
@anbraten, however, most likely wants a visual difference for the main part, so that test and label will be displayed with a separate UI styling, Gitlab-like.

@sebastian-sauer
Copy link
Contributor

Here's a link to gitlabs docs:

https://docs.gitlab.com/ee/user/project/labels.html#scoped-labels

@delvh
Copy link
Member

delvh commented Oct 3, 2021

There are three things I would like to clarify after reading the GitLab docs:
If I see that correctly, you only want to display those labels differently, right?
a) That means you (for now) don't want a check to ensure that at most one scoped label with the same scope is present for one issue, right?
b) How are multi-scope labels rendered? The GitLab documentation mentions them but does not show them. And (how) should Gitea support multi-scope labels?
c) Which separator? :: to conform with Gitlab, or the style used inside this project (/)?

@anbraten
Copy link
Contributor Author

anbraten commented Oct 3, 2021

a) for now I am only interested in the UI enhancement. Any additional logic could be nice but would need some additional proposal
b) I would ignore them for now. So the first separator would be used to split the label name and all following ones would be ignored. Just tired Gitlab and it seems they only use the last separator and ignore previous ones.
c) I first thought it would be nice to just use / as Gitea does it already, but I think a single char like / should not be used as it is not very special and could potentially cause bad UX. There are probably users using / with its or meaning and // could be part of a url, so I think :: would fit best.

@bryanpedini
Copy link

Thank you @wxiaoguang for pointing out this to me.

I would like to reply to @delvh c) point too: I would prefer :: since it's the same as GitLab and already existing bots and scripts would be able to switch easily between the two platforms.

@lunny
Copy link
Member

lunny commented Jan 8, 2022

duplicated with #13117.

@lunny lunny closed this as completed Jan 8, 2022
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/ui Change the appearance of the Gitea UI type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

8 participants