# [PATCH] gitweb: Ensure OPML text fits inside its box.

12 messages from 2013-07-02 to 2013-08-05. Participants: Tony Finch, Jonathan Nieder, Jakub Narębski.
Thread: https://gitlist.dev/t/34392

## Tony Finch, 2013-07-02 16:24

Subject: [PATCH 3/4] gitweb: omit the repository owner when it is unset
Message-ID: <E1UyevA-0003df-Jo@hermes-2.csi.cam.ac.uk>
URL: https://gitlist.dev/e/E1UyevA-0003df-Jo%40hermes-2.csi.cam.ac.uk
In-Reply-To: <20130714234915.GB19057@google.com>

```
On the repository summary page, leave the whole owner line out if
the repo does not have an owner, rather than displaying a labelled
empty field..

Signed-off-by: Tony Finch <dot@dotat.at>
---
 gitweb/gitweb.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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, 2013-07-09 16:43

Subject: [PATCH] gitweb: Ensure OPML text fits inside its box.
Message-ID: <E1Uwb6x-0002XI-Ah@hermes-2.csi.cam.ac.uk>
URL: https://gitlist.dev/e/E1Uwb6x-0002XI-Ah%40hermes-2.csi.cam.ac.uk

```
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.
---

For before/after examples, see http://dotat.at/cgi/git (overflow)
and https://git.csx.cam.ac.uk/x/ucs/ (padded).

 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;
-- 
1.8.3.1.605.g85318f5

```

## Tony Finch, 2013-07-09 16:43

Subject: [PATCH 1/4] gitweb: Ensure OPML text fits inside its box.
Message-ID: <E1Uyev6-0003d1-Mg@hermes-2.csi.cam.ac.uk>
URL: https://gitlist.dev/e/E1Uyev6-0003d1-Mg%40hermes-2.csi.cam.ac.uk
In-Reply-To: <20130714234915.GB19057@google.com>

```
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(-)

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

```

## Tony Finch, 2013-07-09 17:08

Subject: [PATCH] gitweb: vertically centre contents of page footer
Message-ID: <E1UwbQw-0004dI-OK@hermes-2.csi.cam.ac.uk>
URL: https://gitlist.dev/e/E1UwbQw-0004dI-OK%40hermes-2.csi.cam.ac.uk
In-Reply-To: <E1Uwb6x-0002XI-Ah@hermes-2.csi.cam.ac.uk>

```
---
 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;
-- 
1.8.3.1.605.g85318f5

```

## Tony Finch, 2013-07-09 17:08

Subject: [PATCH 2/4] gitweb: vertically centre contents of page footer
Message-ID: <E1Uyev8-0003dE-LM@hermes-2.csi.cam.ac.uk>
URL: https://gitlist.dev/e/E1Uyev8-0003dE-LM%40hermes-2.csi.cam.ac.uk
In-Reply-To: <20130714234915.GB19057@google.com>

```
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;
-- 
1.8.3.1.605.g85318f5

```

## Tony Finch, 2013-07-09 17:15

Subject: [PATCH 4/4] gitweb: make search help link less ugly
Message-ID: <E1UyevC-0003du-K4@hermes-2.csi.cam.ac.uk>
URL: https://gitlist.dev/e/E1UyevC-0003du-K4%40hermes-2.csi.cam.ac.uk
In-Reply-To: <20130714234915.GB19057@google.com>

```
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 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index c029b98..874c948 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -4029,9 +4029,9 @@ sub print_search_form {
 	      $cgi->input({-name=>"a", -value=>"search", -type=>"hidden"}) . "\n" .
 	      $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",
+			       -values => ['commit', 'grep', 'author', 'committer', 'pickaxe']) .
+	      " " . $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

```

## Jonathan Nieder, 2013-07-14 23:49

Subject: Re: [PATCH] gitweb: Ensure OPML text fits inside its box.
Message-ID: <20130714234915.GB19057@google.com>
URL: https://gitlist.dev/e/20130714234915.GB19057%40google.com
In-Reply-To: <E1Uwb6x-0002XI-Ah@hermes-2.csi.cam.ac.uk>

```
Tony Finch wrote:

> 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.

Sounds sensible.  Can we have your sign-off?  (Likewise for the next
patch.)

Thanks,
Jonathan

```

## Tony Finch, 2013-07-15 09:15

Subject: Re: [PATCH] gitweb: Ensure OPML text fits inside its box.
Message-ID: <alpine.LSU.2.00.1307151013460.24554@hermes-2.csi.cam.ac.uk>
URL: https://gitlist.dev/e/alpine.LSU.2.00.1307151013460.24554%40hermes-2.csi.cam.ac.uk
In-Reply-To: <20130714234915.GB19057@google.com>

```
Jonathan Nieder <jrnieder@gmail.com> wrote:
>
> Sounds sensible.  Can we have your sign-off?  (Likewise for the next
> patch.)

Doh! Thanks for looking at the patches. I'll post revised versions, plus a
couple more tweaks.

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.

```

## Jakub Narębski, 2013-08-03 21:37

Subject: Re: [PATCH 4/4] gitweb: make search help link less ugly
Message-ID: <CANQwDwdcCUNBZH=YbSjwTZx6vau_cs89EH9FV8OUQcdNzDE5DQ@mail.gmail.com>
URL: https://gitlist.dev/e/CANQwDwdcCUNBZH%3DYbSjwTZx6vau_cs89EH9FV8OUQcdNzDE5DQ%40mail.gmail.com
In-Reply-To: <E1Uyeth-0003TF-Kx@hermes-2.csi.cam.ac.uk>

```
On Tue, Jul 9, 2013 at 7:15 PM, Tony Finch <dot@dotat.at> wrote:

> The search help link was a superscript question mark right next to
> a drop-down menu, which looks misaligned

I think the idea was to simulate footnote explaining search terms
(I think, I am not the author of this feature)...

>                                                                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.

... but I agree that it makes for poor UI.

>
> Signed-off-by: Tony Finch <dot@dotat.at>
> ---
>  gitweb/gitweb.perl | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index c029b98..874c948 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -4029,9 +4029,9 @@ sub print_search_form {
>               $cgi->input({-name=>"a", -value=>"search", -type=>"hidden"}) . "\n" .
>               $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",
> +                              -values => ['commit', 'grep', 'author', 'committer', 'pickaxe']) .

Nb. what changed here (in line above)?

> +             " " . $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

```

## Jakub Narębski, 2013-08-03 21:40

Subject: Re: [PATCH 3/4] gitweb: omit the repository owner when it is unset
Message-ID: <CANQwDwdA5VnywJmoNpCX7s=hH7tmUDUmRuak12W7BXOQtqRoQw@mail.gmail.com>
URL: https://gitlist.dev/e/CANQwDwdA5VnywJmoNpCX7s%3DhH7tmUDUmRuak12W7BXOQtqRoQw%40mail.gmail.com
In-Reply-To: <E1Uyete-0003Sv-OI@hermes-2.csi.cam.ac.uk>

```
On Tue, Jul 2, 2013 at 6:24 PM, Tony Finch <dot@dotat.at> wrote:

> On the repository summary page, leave the whole owner line out if
> the repo does not have an owner, rather than displaying a labelled
> empty field..

Note that if $omit_owner is true, whole _column_ is skipped.

Is removing cell (instead of leaving it empty) and relying on browser
treating nonexistent cell correctly a good idea, that I do not know.
Does it looks better?  Does it looks better in all web browsers?

> Signed-off-by: Tony Finch <dot@dotat.at>
> ---
>  gitweb/gitweb.perl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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
>



-- 
Jakub Narebski

```

## Tony Finch, 2013-08-05 11:19

Subject: Re: [PATCH 4/4] gitweb: make search help link less ugly
Message-ID: <alpine.LSU.2.00.1308051219110.6019@hermes-2.csi.cam.ac.uk>
URL: https://gitlist.dev/e/alpine.LSU.2.00.1308051219110.6019%40hermes-2.csi.cam.ac.uk
In-Reply-To: <CANQwDwdcCUNBZH=YbSjwTZx6vau_cs89EH9FV8OUQcdNzDE5DQ@mail.gmail.com>

```
Jakub Narębski <jnareb@gmail.com> wrote:

> > -                              -values => ['commit', 'grep', 'author', 'committer', 'pickaxe']) .
> > +                              -values => ['commit', 'grep', 'author', 'committer', 'pickaxe']) .
>
> Nb. what changed here (in line above)?

Whoops, tab damage. I will re-roll. Thanks for the review.

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, 2013-08-05 11:36

Subject: Re: [PATCH 3/4] gitweb: omit the repository owner when it is unset
Message-ID: <alpine.LSU.2.00.1308051220170.6019@hermes-2.csi.cam.ac.uk>
URL: https://gitlist.dev/e/alpine.LSU.2.00.1308051220170.6019%40hermes-2.csi.cam.ac.uk
In-Reply-To: <CANQwDwdA5VnywJmoNpCX7s=hH7tmUDUmRuak12W7BXOQtqRoQw@mail.gmail.com>

```
Jakub Narębski <jnareb@gmail.com> wrote:
> On Tue, Jul 2, 2013 at 6:24 PM, Tony Finch <dot@dotat.at> wrote:
>
> > On the repository summary page, leave the whole owner line out if
> > the repo does not have an owner, rather than displaying a labelled
> > empty field..
>
> Note that if $omit_owner is true, whole _column_ is skipped.

There are two places where the owner is displayed: on the list of
projects, and on each project's summary page. This change affects the
summary page (where it removes a row, not a column) and it leaves the
projects list alone. I'll make that clearer in the commit message (and fix
the extraneous dot).

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.
```
