From de0529c65232eca9efbce17120d94c36e2eee79f Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 15 Feb 2023 21:17:26 +0100 Subject: [PATCH 1/2] Sort issues and pulls by recently updated in user and organization home The main purpose of these home pages should be getting an overview of what's going on or needs attention. Recently updated is a better default than newest for that purpose, to avoid missing active issues and pulls that were not created recently. The default sorting order in repository issues and pulls remains newest. --- routers/web/user/home.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/routers/web/user/home.go b/routers/web/user/home.go index 36d9d4f019f7..4f45c1d5c314 100644 --- a/routers/web/user/home.go +++ b/routers/web/user/home.go @@ -338,6 +338,11 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) { filterMode int ) + // Default to recently updated, unlike repository issues list + if sortType == "" { + sortType = "recentupdate" + } + // -------------------------------------------------------------------------------- // Distinguish User from Organization. // Org: From 37e1d9cc6974bb97af3692f1bc83d74e793e4a78 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 16 Feb 2023 10:08:14 +0100 Subject: [PATCH 2/2] Move default to the top in sort menu --- templates/user/dashboard/issues.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/user/dashboard/issues.tmpl b/templates/user/dashboard/issues.tmpl index 5ecae3a7b9f3..049b6a168145 100644 --- a/templates/user/dashboard/issues.tmpl +++ b/templates/user/dashboard/issues.tmpl @@ -89,10 +89,10 @@ {{svg "octicon-triangle-down" 14 "dropdown icon"}}