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

Archive labels UI enhancement #26511

Closed

Conversation

puni9869
Copy link
Member

Followup #26478

Archived labels UI

Added:

  • Implemented the structural framework for the user interface to accommodate archived labels.
  • Introduced archived labels functionality to the UI, akin to the approach taken for closed milestones or projects. This functionality allows concealing information while retaining it, without resorting to deletion.
  • Particularly advantageous for managing outdated labels that are no longer in use, offering a means to preserve them without cluttering the active label set.

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 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 15, 2023
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 15, 2023
@puni9869 puni9869 added this to the 1.21.0 milestone Aug 15, 2023
@puni9869 puni9869 added the topic/ui Change the appearance of the Gitea UI label Aug 15, 2023
Adding show archived labels checkbox in ui
Added style to archived labels
@puni9869 puni9869 force-pushed the punit/Archive-labels-ui-enhancement branch from 9a26752 to 28e59d8 Compare August 15, 2023 07:24
Copy link
Member

@KN4CK3R KN4CK3R left a comment

Choose a reason for hiding this comment

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

What's the benefit of toggling the hightlight?

templates/repo/issue/labels/label_list.tmpl Outdated Show resolved Hide resolved
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
@puni9869
Copy link
Member Author

What's the benefit of toggling the hightlight?

Here is discussion
#26502 (comment)

@KN4CK3R
Copy link
Member

KN4CK3R commented Aug 15, 2023

Ok, but I still think a static archived highlight is all what's needed.

@delvh
Copy link
Member

delvh commented Aug 15, 2023

Well, my interpretation was a bit different:
I meant hide archived labels by default, and show them only when the checkbox is toggled.
However, they should always be separated visually to identify them easily.
Not show all labels, and highlight archived ones on checkbox click.

@pull-request-size pull-request-size bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 15, 2023
@puni9869
Copy link
Member Author

puni9869 commented Aug 15, 2023

I meant hide archived labels by default, and show them only when the checkbox is toggled.

I am going to change again on the above basis. 💯

@puni9869
Copy link
Member Author

image

I want to add highlight for initial release of this feature.
image

@KN4CK3R
Copy link
Member

KN4CK3R commented Aug 15, 2023

Why not just sort them to the bottom and add the highlight? Then you don't need extra logic to show them and they don't block the view.

@delvh
Copy link
Member

delvh commented Aug 15, 2023

Works too.
Except then we need the extra logic to sort them.

@puni9869
Copy link
Member Author

Why not just sort them to the bottom and add the highlight? Then you don't need extra logic to show them and they don't block the view.

I can managed that with js

@KN4CK3R
Copy link
Member

KN4CK3R commented Aug 15, 2023

Works too. Except then we need the extra logic to sort them.

The extra logic is "sort by archived date"

@delvh
Copy link
Member

delvh commented Aug 15, 2023

Sort primarily by archive date and then by name.
True, that works.

@KN4CK3R
Copy link
Member

KN4CK3R commented Aug 15, 2023

To keep the archived labels sorted by name too you could do the sorting in Go or sort by if archived date > 0 ? 1 : 0 in sql.

@puni9869
Copy link
Member Author

puni9869 commented Aug 15, 2023

image image

select id ,name , archived_unix, repo_id from label order by archived_unix, name;

@KN4CK3R
Copy link
Member

KN4CK3R commented Aug 15, 2023

Keep in mind that the archived labels are only sorted by name because the timestamps are in the correct order.

@puni9869 puni9869 force-pushed the punit/Archive-labels-ui-enhancement branch from 1833b22 to aa8fc8e Compare August 15, 2023 09:34
@pull-request-size pull-request-size bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 15, 2023
@puni9869
Copy link
Member Author

puni9869 commented Aug 15, 2023

Let's scope this PR for Ui changes only. I am sending a back to back Pr for Sorting and Db migration changes [We need to index the archived_unix] column and a separate method I am introducing because the older method is used several places.
Just to avoid the conflicts in result set.

Need approvals/reviews regarding UI changes only.
@delvh
cc/ @KN4CK3R

@denyskon denyskon added the pr/wip This PR is not ready for review label Aug 15, 2023
@delvh
Copy link
Member

delvh commented Aug 15, 2023

If we sort them in the next PR, why is the toggle code still there?

It's now a different kind of toggle.

@silverwind
Copy link
Member

This yellow highlight bar looks very odd, is it removed in latest versions?

@puni9869
Copy link
Member Author

puni9869 commented Aug 15, 2023

This yellow highlight bar looks very odd, is it removed in latest versions?

We can change the color. I took it from base.css
Looking for suggestions.

@silverwind
Copy link
Member

What does it highlight? Archived state? I guess a small "Archived" label would be equally well suited, and less confusing. Maybe in its own column.

@puni9869 puni9869 mentioned this pull request Aug 23, 2023
@puni9869
Copy link
Member Author

Follup to #26741

@puni9869
Copy link
Member Author

Closing as of now.

@puni9869 puni9869 closed this Aug 26, 2023
@GiteaBot GiteaBot removed this from the 1.21.0 milestone Aug 26, 2023
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Nov 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 1 This PR needs approval from one additional maintainer to be merged. pr/wip This PR is not ready for review size/M Denotes a PR that changes 30-99 lines, ignoring generated files. topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants