Skip to content
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

Allow to archive labels #26478

Merged
merged 25 commits into from Aug 14, 2023
Merged

Allow to archive labels #26478

merged 25 commits into from Aug 14, 2023

Conversation

puni9869
Copy link
Member

@puni9869 puni9869 commented Aug 13, 2023

Archived labels

This PR adds the structure to allow for archived labels.
Archived labels are, just like closed milestones or projects, a medium to hide information without deleting it.
It is especially useful if there are outdated labels that should no longer be used without deleting the label entirely.

Changes in this PR

  1. UI and API have been equipped with the support to mark a label as archived
  2. The time when a label has been archived will be stored in the DB

Outsourced to future PRs

There's no special handling for archived labels at the moment.
This will be done once this PR has been merged.

Screenshots

image

image


Part of #25237

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 13, 2023
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 13, 2023
@delvh delvh added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Aug 13, 2023
models/issues/label.go Outdated Show resolved Hide resolved
models/migrations/v1_21/v271.go Show resolved Hide resolved
models/issues/label.go Outdated Show resolved Hide resolved
models/migrations/migrations.go Outdated Show resolved Hide resolved
modules/structs/issue_label.go Show resolved Hide resolved
templates/repo/issue/labels/label_list.tmpl Outdated Show resolved Hide resolved
templates/repo/issue/labels/edit_delete_label.tmpl Outdated Show resolved Hide resolved
web_src/js/features/comp/LabelEdit.js Outdated Show resolved Hide resolved
templates/swagger/v1_json.tmpl Show resolved Hide resolved
modules/structs/issue_label.go Show resolved Hide resolved
@delvh delvh changed the title Archive labels functionality Allow to archive labels Aug 13, 2023
@delvh
Copy link
Member

delvh commented Aug 13, 2023

By the way, what's missing that makes this PR WIP?

@puni9869 puni9869 marked this pull request as ready for review August 13, 2023 18:19
@puni9869
Copy link
Member Author

By the way, what's missing that makes this PR WIP?

I good description of PR, which you have already drafted, --> removing WIP. :)

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Aug 13, 2023
Copy link
Contributor

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, some nits, approve ahead.

templates/repo/issue/labels/edit_delete_label.tmpl Outdated Show resolved Hide resolved
templates/repo/issue/labels/edit_delete_label.tmpl Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Aug 14, 2023
@puni9869
Copy link
Member Author

Thanks @wxiaoguang for taking a look into.

@lunny lunny added this to the 1.21.0 milestone Aug 14, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Aug 14, 2023
@delvh delvh merged commit cafce3b into go-gitea:main Aug 14, 2023
24 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Aug 14, 2023
@delvh
Copy link
Member

delvh commented Aug 14, 2023

I think this is the fastest we have ever merged a new feature.
I don't think we've ever managed to merge a feature in 17 hours.

@lunny lunny mentioned this pull request Aug 14, 2023
@puni9869 puni9869 deleted the punit/Archive-labels branch August 14, 2023 14:30
@puni9869
Copy link
Member Author

puni9869 commented Aug 14, 2023

I think this is the fastest we have ever merged a new feature.
I don't think we've ever managed to merge a feature in 17 hours.

more followup functionality pr coming on the way

@puni9869 puni9869 mentioned this pull request Aug 14, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Aug 15, 2023
* upstream/main:
  Use `object-fit: contain` for oauth2 custom icons (go-gitea#26493)
  add disable workflow feature (go-gitea#26413)
  Move dropzone progress bar to bottom to show filename when uploading (go-gitea#26492)
  Handle base64 decoding correctly to avoid panic (go-gitea#26483)
  Allow to archive labels (go-gitea#26478)
silverwind added a commit that referenced this pull request Aug 27, 2023
Followup  #26478
## Archived labels UI

Changed:
* Enhanced the Filtered UI page to seamlessly incorporate a list of
archived labels.

Outsourced:
* Defer the implementation of specialized handling for archived labels
to upcoming pull requests. This step will be undertaken subsequent to
the successful merge of this pull request.

Screenshots

![image](https://github.com/go-gitea/gitea/assets/80308335/1f33cfb2-2bac-46f0-9103-9e62d235b1d2)

![image](https://github.com/go-gitea/gitea/assets/80308335/3609acd0-b1ba-4ee9-8c4e-1a34dbc37dd7)

![image](https://github.com/go-gitea/gitea/assets/80308335/9860196d-2391-409b-a9a0-1205ab4b412b)

---

Part of #25237

---------

Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: silverwind <me@silverwind.io>
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Nov 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants