threads / patch / 34734

v4, 4 partsgitweb: omit the repository owner when it is unset

Subject: [PATCH v4 3/4] gitweb: omit the repository owner when it is unset

## tl;dr

8 messages between Aug 20, 2013 and Aug 21, 2013. Diffs are folded; open one to read it.

replies: 7people: 2as markdown or json

Tony Finch· Aug 20, 2013, 17:22 UTC · lore

[PATCH v4 0/4] Four small gitweb tweaks

This is mostly just a repost to un-stall this topic.

I have fixed the tab damage problem spotted by Jakub in the search help link patch, and I have improved the commit message for the repository owner patch. No other changes.

Tony Finch (4):
  gitweb: Ensure OPML text fits inside its box.
  gitweb: vertically centre contents of page footer
  gitweb: omit the repository owner when it is unset
  gitweb: make search help link less ugly
 gitweb/gitweb.perl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-- 
1.8.3.1.605.g85318f5
Tony Finch· Aug 20, 2013, 16:59 UTC · re: Tony Finch · lore

[PATCH v4 1/4] gitweb: Ensure OPML text fits inside its box.

The rss_logo CSS style has a fixed width which is too narrow for the string "OPML". Replace the fixed width with horizontal padding so the text fits with nice margins.

Signed-off-by: Tony Finch <dot@dotat.at>
---
 gitweb/static/gitweb.css | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Show changes to gitweb/static/gitweb.css +1 −2
diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css
index cb86d2d..a869be1 100644
--- a/gitweb/static/gitweb.css
+++ b/gitweb/static/gitweb.css
@@ -548,8 +548,7 @@ a.linenr {
 
 a.rss_logo {
 	float: right;
-	padding: 3px 0px;
-	width: 35px;
+	padding: 3px 5px;
 	line-height: 10px;
 	border: 1px solid;
 	border-color: #fcc7a5 #7d3302 #3e1a01 #ff954e;
-- 
1.8.3.1.605.g85318f5
Junio C Hamano· Aug 20, 2013, 19:52 UTC · re: Tony Finch · lore

Re: [PATCH v4 1/4] gitweb: Ensure OPML text fits inside its box.

Tony Finch <dot@dotat.at> writes:
> The rss_logo CSS style has a fixed width which is too narrow for
> the string "OPML". Replace the fixed width with horizontal padding
> so the text fits with nice margins.
Makes sense to me (although I do not do css).
Show 20 quoted lines
>
> Signed-off-by: Tony Finch <dot@dotat.at>
> ---
>  gitweb/static/gitweb.css | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css
> index cb86d2d..a869be1 100644
> --- a/gitweb/static/gitweb.css
> +++ b/gitweb/static/gitweb.css
> @@ -548,8 +548,7 @@ a.linenr {
>  
>  a.rss_logo {
>  	float: right;
> -	padding: 3px 0px;
> -	width: 35px;
> +	padding: 3px 5px;
>  	line-height: 10px;
>  	border: 1px solid;
>  	border-color: #fcc7a5 #7d3302 #3e1a01 #ff954e;
Tony Finch· Aug 20, 2013, 16:59 UTC · re: Tony Finch · lore

[PATCH v4 2/4] gitweb: vertically centre contents of page footer

Signed-off-by: Tony Finch <dot@dotat.at>
---
 gitweb/static/gitweb.css | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Show changes to gitweb/static/gitweb.css +2 −1
diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css
index a869be1..3b4d833 100644
--- a/gitweb/static/gitweb.css
+++ b/gitweb/static/gitweb.css
@@ -68,12 +68,13 @@ div.page_path {
 }
 
 div.page_footer {
-	height: 17px;
+	height: 22px;
 	padding: 4px 8px;
 	background-color: #d9d8d1;
 }
 
 div.page_footer_text {
+	line-height: 22px;
 	float: left;
 	color: #555555;
 	font-style: italic;
-- 
1.8.3.1.605.g85318f5
Junio C Hamano· Aug 20, 2013, 19:53 UTC · re: Tony Finch · lore

Re: [PATCH v4 2/4] gitweb: vertically centre contents of page footer

Tony Finch <dot@dotat.at> writes:
Show 24 quoted lines
> Signed-off-by: Tony Finch <dot@dotat.at>
> ---
>  gitweb/static/gitweb.css | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css
> index a869be1..3b4d833 100644
> --- a/gitweb/static/gitweb.css
> +++ b/gitweb/static/gitweb.css
> @@ -68,12 +68,13 @@ div.page_path {
>  }
>  
>  div.page_footer {
> -	height: 17px;
> +	height: 22px;
>  	padding: 4px 8px;
>  	background-color: #d9d8d1;
>  }
>  
>  div.page_footer_text {
> +	line-height: 22px;
>  	float: left;
>  	color: #555555;
>  	font-style: italic;

Hmmm, is it a good idea to do "px" here, or are they ways to do relative to x-height or something to make sure the text fits?

Tony Finch· Aug 21, 2013, 09:06 UTC · re: Junio C Hamano · lore

Re: [PATCH v4 2/4] gitweb: vertically centre contents of page footer

Junio C Hamano <gitster@pobox.com> wrote:
Show 17 quoted lines
> Tony Finch <dot@dotat.at> writes:
>
> >  div.page_footer {
> > -	height: 17px;
> > +	height: 22px;
> >  	padding: 4px 8px;
> >  	background-color: #d9d8d1;
> >  }
> >
> >  div.page_footer_text {
> > +	line-height: 22px;
> >  	float: left;
> >  	color: #555555;
> >  	font-style: italic;
>
> Hmmm, is it a good idea to do "px" here, or are they ways to do
> relative to x-height or something to make sure the text fits?

Good question. I also don't know much about css. I basically followed the style that was already there, and found out about vertical centering using line-height by searching the web.

I think font-size relative scaling would require a bigger overhaul.
Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Forties, Cromarty: East, veering southeast, 4 or 5, occasionally 6 at first.
Rough, becoming slight or moderate. Showers, rain at first. Moderate or good,
occasionally poor at first.
Tony Finch· Aug 20, 2013, 16:59 UTC · re: Tony Finch · lore

On the repository summary page, leave the owner line out if the repo does not have an owner, rather than displaying a labelled empty field. This does not affect the owner column in the projects list page, which is present unless $omit_owner is true.

Signed-off-by: Tony Finch <dot@dotat.at>
---
 gitweb/gitweb.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to gitweb/gitweb.perl +1 −1
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 8d69ada..c029b98 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -6463,7 +6463,7 @@ sub git_summary {
 	print "<div class=\"title\">&nbsp;</div>\n";
 	print "<table class=\"projects_list\">\n" .
 	      "<tr id=\"metadata_desc\"><td>description</td><td>" . esc_html($descr) . "</td></tr>\n";
-        unless ($omit_owner) {
+        if ($owner and not $omit_owner) {
 	        print  "<tr id=\"metadata_owner\"><td>owner</td><td>" . esc_html($owner) . "</td></tr>\n";
         }
 	if (defined $cd{'rfc2822'}) {
-- 
1.8.3.1.605.g85318f5
Tony Finch· Aug 20, 2013, 16:59 UTC · re: Tony Finch · lore

[PATCH v4 4/4] gitweb: make search help link less ugly

The search help link was a superscript question mark right next to a drop-down menu, which looks misaligned and is a cramped and awkward click target. Remove the superscript tags and add some spacing to fix these nits. Add a title attribute to provide an explanatory mouseover.

Signed-off-by: Tony Finch <dot@dotat.at>
---
 gitweb/gitweb.perl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to gitweb/gitweb.perl +2 −2
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 8d69ada..59af7de 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -4030,8 +4030,8 @@ sub print_search_form {
 	      $cgi->input({-name=>"h", -value=>$search_hash, -type=>"hidden"}) . "\n" .
 	      $cgi->popup_menu(-name => 'st', -default => 'commit',
 	                       -values => ['commit', 'grep', 'author', 'committer', 'pickaxe']) .
-	      $cgi->sup($cgi->a({-href => href(action=>"search_help")}, "?")) .
-	      " search:\n",
+	      " " . $cgi->a({-href => href(action=>"search_help"),
+			     -title => "search help" }, "?") . " search:\n",
 	      $cgi->textfield(-name => "s", -value => $searchtext, -override => 1) . "\n" .
 	      "<span title=\"Extended regular expression\">" .
 	      $cgi->checkbox(-name => 'sr', -value => 1, -label => 're',
-- 
1.8.3.1.605.g85318f5

← back to recent threads