mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-17 06:32:41 -05:00
Archive labels #11018
Closed
opened 2025-11-02 09:25:14 -06:00 by GiteaMirror
·
25 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
v1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
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#11018
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 @delvh on GitHub (Jun 13, 2023).
Originally assigned to: @puni9869 on GitHub.
Feature Description
Sometimes, old labels should not be used anymore.
For Gitea, for example, those are the
backport/v*labels.Currently, the only way to stop them from polluting the search results when trying to assign labels to an issue or PR is to delete them completely.
However, this has the drawback that any old issue/PR that had that label loses it, thus losing information.
Instead, it would probably be better to filter out archived labels from the search results and keep them for anything that already has these labels.
So, in a sense, what I propose is a sort of soft deletion for labels (except instead of a boolean we store a timestamp that means unarchived when
0and displays when this label was archived).This also aligns with milestones and projects as you can close both already, which is their equivalent of archiving.
Labels are currently an outlier in their behavior among the "three scrum tools".
Proposed Approach
archive(d)on theedit labelscreen (and to thePATCHAPI route/repos/{owner}/{repo}/labels/{id})ArchivedUnix timestamp(now)inside the db0include archived labelsinside the suggestion box that is de-selected by default, and re-triggers the search when changed. Needs a lot of UI changes@acruzedeveloper commented on GitHub (Jun 20, 2023):
I want to give a try to this issue/feature. Please assign this to me. want to enhance the web skills.
@delvh commented on GitHub (Jun 20, 2023):
Yes, of course.
However, I'd like to know your opinion regarding the
paragraph before you start implementing it.
@delvh commented on GitHub (Jun 20, 2023):
By the way, what do you mean with
web skills?The feature as I've described it is rather a backend feature than a frontend feature.
@acruzedeveloper commented on GitHub (Jun 20, 2023):
I work on majorly golang and js. Just got started in open source contribution. 💯
@acruzedeveloper commented on GitHub (Jun 21, 2023):
Due to time shortage, I will share my initial finding soon, tomorrrow!.
@acruzedeveloper commented on GitHub (Jun 22, 2023):
Understanding the requirements→
Understanding of ISSUES/LABELS/PROJECTS/MILESTONES
a. If any milestone is closed explicitly it does not mean the attached issues are closed automatically.
b. If all the issues and pr are completed or closed then the mile stone will automatically or implicitly completed.
That means from point a and b if mile stone is closed, then we need to archive the labels. No matter is issues are completed or closed state.
a. If any project is closed explicitly it does not mean the attached issues are closed automatically.
That means from point a is closed, then we need to archive the labels.
Solution Proposed →
archive(d)on theedit labelscreen (and to thePATCHAPI route/repos/{owner}/{repo}/labels/{id})ArchivedUnix timestamp(now)inside the db02 Frontend side →
Issues Listing on the UI →
Yes, by default all the issues should be populated in the list including archived labels tagged issues too.
Motivation → we are on the landing page of issues and we should show all the issues including archived labeled.
Yes, by default we should only suggest the unarchived label. We should provide an option “Exclude Archive Label” enabled by default. If the “Exclude Archive Label” is set unchecked we should display the archived labels as well.
Special use case to keep “Exclude Archive Label” in the search list of label as below. As we have currently 3 version of Gitea to maintain 1.19, 1.20 and 1.21rc, there will be bug fixes in we need to release the minor version . So taking the “backport/*” labels, if any new maintainer comes and he/she doesn’t have understanding of labels , which label should be tagged to the issue or pr. Obviously we have archived the labels of old versions. So if we select couple of issues in the issue-action menu we should give this option to user to see the unarchived labels as well.
In this case lets go with option 2. Yes UI changes will be less and but we give the user an option to “Exclude Archive Label” in the search list as well as in issue-action menu to ease the work. Motivation is the same as #2.
No, we don’t need count number of unarchived labels or total labels. But if we want we can put a filter in label screen to filter this number. But I am highly encourage not to put in ISSUE/Milestone/PR/Project screen. It will be overkill. And we count the number of issues/pr tagged a particular label. Not the label itself.
PS:
I have two more scenario.
I am open for all suggestions and feedback. will be grateful.
cc / @delvh
@delvh commented on GitHub (Jun 22, 2023):
Okay, I think I got the gist of what you're trying to say.
As I understand your message, you basically reference two different states at the same time, namely the optimal behavior you expect projects, milestones, and labels to have, and the solution you want implemented.
Here are my thoughts about that:
1.
I meant this counter:


But apparently, I was too used to GitHubs appearance when writing the original message as I thought of this label counter that Gitea doesn't have (yet?):
That has also shown me an edge case I haven't considered yet:
We should show archived labels on the labels page in a subsection that is hidden by default (i.e. a
<details><summary>Archived labels</summary>…</details>) as you rarely want to edit them once they are archived.I think something got "lost in translation" there:
I meant that as "we have 2 cases to consider with the same 2 available solutions each time".
I don't quite understand why you are suggesting both UIs for different situations (I think? I have huge problems understanding these paragraphs)
You won't implement the auto-archival in the initial PR, correct?
After all, the smaller a PR, the more likely it is to get merged.
Additionally, reviewers will likely oppose your proposed automation (which in the worst case blocks a PR from being merged forever) and requires a lot of further discussion before being implemented.
So, it's better to extract it into a follow-up PR, if at all.
I haven't quite understood how exactly you define which labels should be archived once a milestone is closed.
You of course don't want to close all labels that appear in any issue of the milestone.
So, you would probably need to store a list of milestone-specific labels to close once the milestone is closed., or what do you suggest there?
Phew, I think I got everything.
@acruzedeveloper commented on GitHub (Jun 25, 2023):
I appreciate your feedback, and I agree with points 1, 3, and 4 as you mentioned. Regarding point 2, I should have attach the screenshots earlier. It would have been helpful to provide visual evidence from my side.
I have carefully considered your feedback and taken into account your points, along with my own thoughts. Together, we have reached the following discussion till now.
Github ui:
If you see the milestone only open milestone count are there.

Github does not have archival label feature yet for labels.
For Gitea UI :
Total number of labels will be good to show. Issue/Pr screen.
Current screen of gitea:

After added count:

The count is total number of labels including archived.
In the current label screen in gitea →

Github UI:

There is no count on label button, and total count is down.
After archival labels features in gitea →

Label title will remain same.
We will categories the label count into non archived label and archived label.
<count> label, where is count is the number of non archived labels and "label" as the text for count.<count> archived, where is count is the number of archived labels and "archived" as the text.For example
Will be anchor tag grey in color. “2 archived” will be a separate tab in Label window in gitea as below screen shot
Current label drop down in gitea when not selecting any issue/pr →

When adding archive functionality when not selecting any issue →
When clicking on issue and then inside “Label” menu we will list the archived labels at the end.

Implementation Proposed →
archive(d)on theedit labelscreen (and to thePATCHAPI route/repos/{owner}/{repo}/labels/{id})ArchivedUnix timestamp(now)inside the db02 Frontend side →
New Label→

Edit Label→

I am open for further discussion.
cc// @delvh
@6543 commented on GitHub (Jun 25, 2023):
I dont think we need a filter for issues based on archived labels ... rather just use as is but sort them with lower prio ...
@6543 commented on GitHub (Jun 25, 2023):
Also i would not add a lable counter as this has no helpfull information but will take space in ui. we dont have to port bad stuff from gh over to us
@acruzedeveloper commented on GitHub (Jun 25, 2023):
It was suggested by delvh. Whatever suits the best on the issue screen as UI point of view. Happy to implement. 😄
Feedback Noted. 💯
@acruzedeveloper commented on GitHub (Jun 25, 2023):
Which screen shot you are referring, is it this screen

or something else in my feedback
@6543
@6543 commented on GitHub (Jun 25, 2023):
Uh yes if this is a button to filter the displayed lables to select, then its an awesome feature but should be visible distinguish from the other "issue pre filters"
@acruzedeveloper commented on GitHub (Jun 26, 2023):
Your understanding is correct. Let me rephrase this with more intuitive way. I am gonna make minor some changes in UI.
We are providing a filter
[]Include archive labels in searchWhen the filter is enabled. Archived labels will be included in label list, as per below screenshot.

When you search the label, that can be an archived or non archived, as per below screenshot.

All functionalities will remain the same.
@delvh cc// @6543
@6543 commented on GitHub (Jun 27, 2023):
awesome ui mockup!!! - ACK :)
@delvh commented on GitHub (Jun 27, 2023):
I haven't quite understood yet why we should display it on the
new labelscreen.Who wants to create a label and immediately archive it?
That sounds too rare to me to clutter up the UI here.
This is one of the rare instances where I think that omitting (this) functionality is better than including it.
@acruzedeveloper commented on GitHub (Jun 27, 2023):
Feedback Noted. I thought we are sharing the same modal for editing and new label stuff.
Motivation was the same, If any one wants creates an archived label. He/she can edit that label to archive it.
Will remove it from New Label. 💯
@puni9869 commented on GitHub (Aug 14, 2023):
Updates in designs:
Addding a info button on edit label model.

@lunny commented on GitHub (Aug 14, 2023):
resolved by #26478
@delvh commented on GitHub (Aug 14, 2023):
Erm, no.
Only the backend structure exists yet, they are not yet handled specially.
@puni9869 commented on GitHub (Aug 23, 2023):
We will give the entire list of labels with a hint
Archivedadjacent to label name.On hovering over the

ArchivedI will show the tooltip.and in upcoming PR I will research and try to find the perfect UI for label screen where we can put this on screen.
These are the option I have implemented or came so far.
Open for suggestions.
@stuzer05 commented on GitHub (Sep 18, 2023):
Do labels actually hide currently on latest dev commit? Or just label status=archives is implemented as a flag? Because we have org-level labels, which are marked as archived, but I can see them everywhere still (on the issue list filter, at issue page in labels select).
@delvh commented on GitHub (Sep 18, 2023):
Both:
The flag is implemented, but the labels are not really hidden yet.
The commit above your message brought the first step of "hiding" them with the rest yet to follow.
@stuzer05 commented on GitHub (Sep 18, 2023):
Alright, thank you
@puni9869 commented on GitHub (Sep 18, 2023):
Currently this is WIP, will be out in stable release 1.21. Less work is left to support this feature. 😄