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

Change default sort order #2647

Merged
merged 9 commits into from
Oct 5, 2017
Merged

Change default sort order #2647

merged 9 commits into from
Oct 5, 2017

Conversation

kaz
Copy link
Contributor

@kaz kaz commented Oct 4, 2017

Change default sort key to updated_unix from created_unix
(repositories order on explore page)

it was suggested on (#2442)

Closes #2442

@codecov-io
Copy link

codecov-io commented Oct 4, 2017

Codecov Report

Merging #2647 into master will increase coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2647      +/-   ##
==========================================
+ Coverage   27.12%   27.13%   +<.01%     
==========================================
  Files          86       86              
  Lines       17064    17061       -3     
==========================================
  Hits         4629     4629              
+ Misses      11757    11754       -3     
  Partials      678      678
Impacted Files Coverage Δ
routers/user/profile.go 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa962de...68af474. Read the comment docs.

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 4, 2017
@lafriks
Copy link
Member

lafriks commented Oct 4, 2017

LGTM

@tboerger tboerger 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 Oct 4, 2017
@daviian
Copy link
Member

daviian commented Oct 4, 2017

You have changed sorting of users instead of repositories..

@kaz
Copy link
Contributor Author

kaz commented Oct 4, 2017

oops, fixed it

@daviian
Copy link
Member

daviian commented Oct 4, 2017

LGTM

@tboerger tboerger 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 Oct 4, 2017
@Morlinest
Copy link
Member

Give me some time to test it, I think there is little problem.

@Morlinest
Copy link
Member

@lafriks @daviian This PR can't be merged, there is reason for current default. It's used in conjunction with UI, where default option for sorting is newest.

image

@kaz You have to change UI (html templates) too. It's not so simple like changing 1 value :).

@lafriks
Copy link
Member

lafriks commented Oct 4, 2017

When testing list looked correct for me, did not check sort menu, good catch

Copy link
Member

@lafriks lafriks left a comment

Choose a reason for hiding this comment

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

Need to fix also UI as @Morlinest pointed out

@kaz
Copy link
Contributor Author

kaz commented Oct 4, 2017

I fixed that UI problem.
Sorry for my insufficient testing 🙇

@Morlinest
Copy link
Member

@kaz NP. You are not done yet :D. You have to add case "newest": to models.RenderRepoSearch().

@Morlinest
Copy link
Member

@kaz Please check every place, where your changes are used. If I search explore/search, it's used in 4 other templates. First that mean that you are changing more than 1 search page (@lafriks @daviian do you want to change it too?), second, I think you have to add case "newest" also to models.RenderUserSearch()

@daviian
Copy link
Member

daviian commented Oct 4, 2017

@Morlinest you are right @kaz has to add newest to models.RenderUserSearch() as well. Regarding the impact on the other search pages: it is fine more me, since sorting org and users by newest isn't that useful anyway, so doesn't hurt. But I have to add that we should change org and user searching to be alphabetically by default (will create separate issue for that).

@kaz kaz changed the title sort repositories by updated_unix in Explore (#2442) Change default sort order Oct 4, 2017
@kaz
Copy link
Contributor Author

kaz commented Oct 4, 2017

I made some changes.

This changes affects pages below:

page order(old) order(new)
/explore/repos newest recentupdate
/explore/users newest alphabetically
/explore/organizations newest alphabetically
/{user_name} (repositories tab) newest recentupdate
/{user_name} (stars tab) newest recentupdate

@lafriks lafriks added the type/enhancement An improvement of existing functionality label Oct 4, 2017
@lafriks lafriks added this to the 1.3.0 milestone Oct 4, 2017
Copy link
Member

@daviian daviian left a comment

Choose a reason for hiding this comment

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

Tested and approved again after new changes 👍

@lafriks
Copy link
Member

lafriks commented Oct 5, 2017

Make LG-TM work again

@lafriks lafriks merged commit 4325320 into go-gitea:master Oct 5, 2017
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
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. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default Sort in Explore Page
6 participants