From 22cb5b0c17d578bc995a7c99ca96711886a1fd5d Mon Sep 17 00:00:00 2001 From: "Panagiotis \"Ivory\" Vasilopoulos" Date: Wed, 6 Dec 2023 20:29:26 +0000 Subject: [PATCH] Improve RSS feed icons (#28368) - The RSS Feed icons were placed in a proper button, so that it does not look "inconsistent". This also makes the problem of the button being improperly aligned go away. - The icon that shows on user profiles has not been modified because of a lack of better implementation ideas. - Where applicable, the RSS Feed icon was put directly next to the Follow button (right menu), as both functionalities effectively share the same purpose. - Despite the attempt at achieving less inconsistency, a conscious decision to not add any text to those buttons was made, opting for tooltips instead. "Make it present, but not too annoying." - A special exception was made for the Releases pages (which contains text, not a tooltip), where an RSS feed would be particularly beneficial to users. The fact that the RSS functionality is explicitly optional was taken into account, and these improvements were made with public-facing instances (where the feature works best) in mind. --- templates/org/home.tmpl | 8 +++++--- templates/repo/header.tmpl | 9 ++++++--- templates/repo/release_tag_header.tmpl | 8 +++++--- templates/repo/view_file.tmpl | 4 +++- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl index 2bebcc0f87..a84e3efc89 100644 --- a/templates/org/home.tmpl +++ b/templates/org/home.tmpl @@ -9,9 +9,6 @@ {{if .Org.Visibility.IsLimited}}{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}{{end}} {{if .Org.Visibility.IsPrivate}}{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}{{end}} - {{if .EnableFeed}} - {{svg "octicon-rss" 24}} - {{end}} {{if $.RenderedDescription}}
{{$.RenderedDescription|Str2html}}
{{end}}
@@ -23,6 +20,11 @@
- {{if $.EnableFeed}} - {{svg "octicon-rss" 18}} - {{end}} {{if $.PullMirror}}
{{ctx.Locale.Tr "repo.mirror_from"}} {{$.PullMirror.RemoteAddress}}
@@ -55,6 +52,12 @@ {{end}} + {{if $.EnableFeed}} + {{/* An extra div-element is not necessary here, as this button does not secretly contain two buttons. */}} + + {{end}}
{{$.CsrfTokenHtml}}
diff --git a/templates/repo/release_tag_header.tmpl b/templates/repo/release_tag_header.tmpl index 4fe6a1251c..f474fb89ea 100644 --- a/templates/repo/release_tag_header.tmpl +++ b/templates/repo/release_tag_header.tmpl @@ -10,10 +10,12 @@ {{ctx.Locale.PrettyNumber .NumTags}} {{ctx.Locale.TrN .NumTags "repo.tag" "repo.tags"}} {{end}} - {{if .EnableFeed}} - {{svg "octicon-rss" 18}} - {{end}}
+ {{if .EnableFeed}} + + {{svg "octicon-rss" 18}} {{ctx.Locale.Tr "rss_feed"}} + + {{end}} {{if and (not .PageIsTagList) .CanCreateRelease}} {{ctx.Locale.Tr "repo.release.new_release"}} diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index 983491f97d..4129a133b7 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -43,7 +43,9 @@ {{svg "octicon-download"}} {{svg "octicon-copy" 14}} {{if .EnableFeed}} - {{svg "octicon-rss" 14}} + + {{svg "octicon-rss" 14}} + {{end}} {{if .Repository.CanEnableEditor}} {{if .CanEditFile}}