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

TAGs order is not at best #23432

Closed
cclecle opened this issue Mar 12, 2023 · 1 comment
Closed

TAGs order is not at best #23432

cclecle opened this issue Mar 12, 2023 · 1 comment
Assignees
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

@cclecle
Copy link

cclecle commented Mar 12, 2023

Description

When listing repository tags using Web UI, they are listed in alphanumeric order, wich is not the best.
I thought a sementic version ordering would be nice but it can fail for people not using sementic...
So is it possible to order them by TAG creation date ?

Screenshots

image

Gitea Version

1.18.3

Can you reproduce the bug on the Gitea demo site?

Yes

Operating System

Linux

Browser Version

Firefox 110

@cclecle cclecle added type/bug topic/ui Change the appearance of the Gitea UI labels Mar 12, 2023
@sillyguodong sillyguodong added type/proposal The new feature has not been accepted yet but needs to be discussed first. and removed type/bug labels Mar 13, 2023
@HesterG HesterG self-assigned this Mar 14, 2023
@yardenshoham
Copy link
Member

#23491 Fixes this

jolheiser pushed a commit that referenced this issue Mar 16, 2023
…23491)

This PR fixes the tags sort issue mentioned in #23432
The tags on dropdown shoud be sorted in descending order of time but are
not. Because when getting tags, it execeutes `git tag sort
--sort=-taggerdate`. Git supports two types of tags: lightweight and
annotated, and `git tag sort --sort=-taggerdate` dosen't work with
lightweight tags, which will not give correct result. This PR add
`GetTagNamesByRepoID ` to get tags from the database so the tags are
sorted.

Also adapt this change to the droplist when comparing branches. 

Dropdown places:

<img width="369" alt="截屏2023-03-15 14 25 39"
src="https://user-images.githubusercontent.com/17645053/225224506-65a72e50-4c11-41d7-8187-a7e9c7dab2cb.png">

<img width="675" alt="截屏2023-03-15 14 25 27"
src="https://user-images.githubusercontent.com/17645053/225224526-65ce8008-340c-43f6-aa65-b6bd9e1a1bf1.png">
@lunny lunny closed this as completed Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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

5 participants