From 88a4a4ecff327dcdb1a8536e31f4343bf082fadb Mon Sep 17 00:00:00 2001 From: Gusted Date: Tue, 5 Jul 2022 04:48:20 +0200 Subject: [PATCH 1/3] Fix dashboard switching on Mobile (#20238) - Backport #20238 - This is a regression of improving mobile experience on Gitea, currently organization dashboard aren't readable and the popup won't show up when you want to switch between users/organization(as we saw in #19978). - This patch fixes that, by allowing the popup to allocate the required pixels(for some absurd reason, z-index doesn't work on the popup, so it's not able to render over the existing elements, we can investigate later of why this is). And also remove the additional dropdown menu for the pages link, so it's one unified list which then can be displayed as rows. - See original PR for screenshots. --- templates/user/dashboard/navbar.tmpl | 44 +++++++++++++--------------- web_src/less/_base.less | 2 +- web_src/less/_dashboard.less | 6 ++++ 3 files changed, 28 insertions(+), 24 deletions(-) diff --git a/templates/user/dashboard/navbar.tmpl b/templates/user/dashboard/navbar.tmpl index 75abe859ec870..a98c2ea75cf65 100644 --- a/templates/user/dashboard/navbar.tmpl +++ b/templates/user/dashboard/navbar.tmpl @@ -75,32 +75,30 @@ {{end}} {{if .ContextUser.IsOrganization}} -
diff --git a/web_src/less/_base.less b/web_src/less/_base.less index 78f32956efce1..6c6f6ac2f0519 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -2194,7 +2194,7 @@ table th[data-sortt-desc] { .ui.stackable.menu:not(.no-vertical-tabs) { overflow-y: hidden; overflow-x: auto; - flex-direction: row; + flex-direction: row !important; flex-wrap: nowrap !important; .item { diff --git a/web_src/less/_dashboard.less b/web_src/less/_dashboard.less index 54cb74b6ee105..1a50f7e9dbc79 100644 --- a/web_src/less/_dashboard.less +++ b/web_src/less/_dashboard.less @@ -81,6 +81,12 @@ .ui.dropdown { max-width: 100%; + + @media @mediaSm { + > .menu:not(.hidden) { + position: inherit; + } + } } } } From 8908276e14ecf7be251d978c5a872845b00ac56a Mon Sep 17 00:00:00 2001 From: Gusted Date: Thu, 28 Jul 2022 12:54:30 +0200 Subject: [PATCH 2/3] Backport changes --- templates/user/dashboard/navbar.tmpl | 44 +++++++++++++++------------- web_src/less/_base.less | 6 +++- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/templates/user/dashboard/navbar.tmpl b/templates/user/dashboard/navbar.tmpl index a98c2ea75cf65..75abe859ec870 100644 --- a/templates/user/dashboard/navbar.tmpl +++ b/templates/user/dashboard/navbar.tmpl @@ -75,30 +75,32 @@ {{end}} {{if .ContextUser.IsOrganization}} - - {{svg "octicon-rss"}} {{.i18n.Tr "activities"}} - - {{if not .UnitIssuesGlobalDisabled}} - - {{svg "octicon-issue-opened"}} {{.i18n.Tr "issues"}} - - {{end}} +
diff --git a/web_src/less/_base.less b/web_src/less/_base.less index e468c2c2f1d6b..cfaa2e3c4d881 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -2194,7 +2194,7 @@ table th[data-sortt-desc] { .ui.stackable.menu:not(.no-vertical-tabs) { overflow-y: hidden; overflow-x: auto; - flex-direction: row !important; + flex-direction: row; flex-wrap: nowrap !important; .item { @@ -2204,5 +2204,9 @@ table th[data-sortt-desc] { > .dropdown.item { position: initial; } + + .menu { + flex-direction: row; + } } } From 47923d86789efc1240db10120247f6a277e69ce8 Mon Sep 17 00:00:00 2001 From: Gusted Date: Thu, 28 Jul 2022 14:40:49 +0200 Subject: [PATCH 3/3] backport changes --- web_src/less/_dashboard.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web_src/less/_dashboard.less b/web_src/less/_dashboard.less index 1a50f7e9dbc79..d87f6b4ac8971 100644 --- a/web_src/less/_dashboard.less +++ b/web_src/less/_dashboard.less @@ -83,8 +83,8 @@ max-width: 100%; @media @mediaSm { - > .menu:not(.hidden) { - position: inherit; + > .menu { + position: static; } } }