* [PATCH] gitweb: Slight visual improvements to commitdiff view
@ 2006-10-26 16:13 Jakub Narebski
2006-10-26 16:43 ` [PATCH (amend)] " Jakub Narebski
0 siblings, 1 reply; 7+ messages in thread
From: Jakub Narebski @ 2006-10-26 16:13 UTC (permalink / raw)
To: git
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
gitweb/gitweb.css | 14 +++++++++++++-
gitweb/gitweb.perl | 15 +++++++++------
2 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css
index 0eda982..cb2c627 100644
--- a/gitweb/gitweb.css
+++ b/gitweb/gitweb.css
@@ -114,7 +114,7 @@ div.log_link {
width: 136px;
}
-div.list_head {
+div.diff_tree_head {
padding: 6px 8px 4px;
border: solid #d9d8d1;
border-width: 1px 0px 0px;
@@ -128,6 +128,18 @@ div.author_date {
font-style: italic;
}
+div.commitdiff_log {
+ padding: 8px;
+ border: solid #d9d8d1;
+ border-width: 0px 0px 1px 0px;
+}
+
+div.patchset {
+ padding-top: 8px;
+ border: solid #d9d8d1;
+ border-width: 1px 0px 0px 0px;
+}
+
a.list {
text-decoration: none;
color: #000000;
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 0d2ea72..a33cae1 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1844,11 +1844,11 @@ sub git_print_tree_entry {
sub git_difftree_body {
my ($difftree, $hash, $parent) = @_;
- print "<div class=\"list_head\">\n";
if ($#{$difftree} > 10) {
+ print "<div class=\"list_head\">\n";
print(($#{$difftree} + 1) . " files changed:\n");
+ print "</div>\n";
}
- print "</div>\n";
print "<table class=\"diff_tree\">\n";
my $alternate = 1;
@@ -2055,7 +2055,8 @@ sub git_patchset_body {
# for now, no extended header, hence we skip empty patches
# companion to next LINE if $in_header;
- if ($diffinfo->{'from_id'} eq $diffinfo->{'to_id'}) { # no change
+ if ($diffinfo->{'from_id'} eq $diffinfo->{'to_id'}) {
+ # no change, empty patch
$in_header = 1;
next LINE;
}
@@ -3486,13 +3487,15 @@ sub git_commitdiff {
git_print_page_nav('commitdiff','', $hash,$co{'tree'},$hash,
$formats_nav);
git_print_header_div('commit', esc_html($co{'title'}) . $ref, $hash);
git_print_authorship(\%co);
- print "<div class=\"page_body\">\n";
+
if (@{$co{'comment'}} > 1) {
- print "<div class=\"log\">\n";
+ print "<div class=\"commitdiff_log\">\n";
git_print_log($co{'comment'}, -final_empty_line=> 1, -remove_title
=> 1);
- print "</div>\n"; # class="log"
+ print "</div>\n"; # class="commitdiff_log"
}
+ print "<div class=\"page_body\">\n";
+
} elsif ($format eq 'plain') {
my $refs = git_get_references("tags");
my $tagname = git_get_rev_name_tags($hash);
--
1.4.3.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH (amend)] gitweb: Slight visual improvements to commitdiff view
2006-10-26 16:13 [PATCH] gitweb: Slight visual improvements to commitdiff view Jakub Narebski
@ 2006-10-26 16:43 ` Jakub Narebski
2006-10-26 23:34 ` Luben Tuikov
0 siblings, 1 reply; 7+ messages in thread
From: Jakub Narebski @ 2006-10-26 16:43 UTC (permalink / raw)
To: git
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
This amend fixes regression which caused signoff lines
to be not highlighted as such.
gitweb/gitweb.css | 16 ++++++++++++++--
gitweb/gitweb.perl | 18 ++++++++++--------
2 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css
index 0eda982..83d900d 100644
--- a/gitweb/gitweb.css
+++ b/gitweb/gitweb.css
@@ -100,7 +100,7 @@ span.age {
font-style: italic;
}
-div.page_body span.signoff {
+span.signoff {
color: #888888;
}
@@ -114,7 +114,7 @@ div.log_link {
width: 136px;
}
-div.list_head {
+div.diff_tree_head {
padding: 6px 8px 4px;
border: solid #d9d8d1;
border-width: 1px 0px 0px;
@@ -128,6 +128,18 @@ div.author_date {
font-style: italic;
}
+div.commitdiff_log {
+ padding: 8px;
+ border: solid #d9d8d1;
+ border-width: 0px 0px 1px 0px;
+}
+
+div.patchset {
+ padding-top: 8px;
+ border: solid #d9d8d1;
+ border-width: 1px 0px 0px 0px;
+}
+
a.list {
text-decoration: none;
color: #000000;
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 0d2ea72..044a47d 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1844,11 +1844,11 @@ sub git_print_tree_entry {
sub git_difftree_body {
my ($difftree, $hash, $parent) = @_;
- print "<div class=\"list_head\">\n";
if ($#{$difftree} > 10) {
+ print "<div class=\"list_head\">\n";
print(($#{$difftree} + 1) . " files changed:\n");
+ print "</div>\n";
}
- print "</div>\n";
print "<table class=\"diff_tree\">\n";
my $alternate = 1;
@@ -2053,9 +2053,9 @@ sub git_patchset_body {
}
$patch_idx++;
- # for now, no extended header, hence we skip empty patches
- # companion to next LINE if $in_header;
- if ($diffinfo->{'from_id'} eq $diffinfo->{'to_id'}) { # no change
+ # for now we skip empty patches
+ if ($diffinfo->{'from_id'} eq $diffinfo->{'to_id'}) {
+ # no change, empty patch
$in_header = 1;
next LINE;
}
@@ -3486,13 +3486,15 @@ sub git_commitdiff {
git_print_page_nav('commitdiff','', $hash,$co{'tree'},$hash, $formats_nav);
git_print_header_div('commit', esc_html($co{'title'}) . $ref, $hash);
git_print_authorship(\%co);
- print "<div class=\"page_body\">\n";
+
if (@{$co{'comment'}} > 1) {
- print "<div class=\"log\">\n";
+ print "<div class=\"commitdiff_log\">\n";
git_print_log($co{'comment'}, -final_empty_line=> 1, -remove_title => 1);
- print "</div>\n"; # class="log"
+ print "</div>\n"; # class="commitdiff_log"
}
+ print "<div class=\"page_body\">\n";
+
} elsif ($format eq 'plain') {
my $refs = git_get_references("tags");
my $tagname = git_get_rev_name_tags($hash);
--
1.4.3.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH (amend)] gitweb: Slight visual improvements to commitdiff view
2006-10-26 16:43 ` [PATCH (amend)] " Jakub Narebski
@ 2006-10-26 23:34 ` Luben Tuikov
2006-10-26 23:50 ` Jakub Narebski
0 siblings, 1 reply; 7+ messages in thread
From: Luben Tuikov @ 2006-10-26 23:34 UTC (permalink / raw)
To: Jakub Narebski, git
Can you please explain what both patches actually do?
"slight visual improvements to commitdiff view" leaves
much, _much_ to be desired and is hardly a commit message
suitable to live in git.git.
Please describe what you found objectionable, why, how
you decided to fix it and why you decided to fix it that way.
Thanks,
Luben
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH (amend)] gitweb: Slight visual improvements to commitdiff view
2006-10-26 23:34 ` Luben Tuikov
@ 2006-10-26 23:50 ` Jakub Narebski
2006-10-27 0:39 ` Luben Tuikov
0 siblings, 1 reply; 7+ messages in thread
From: Jakub Narebski @ 2006-10-26 23:50 UTC (permalink / raw)
To: Luben Tuikov; +Cc: git
Luben Tuikov wrote:
> Can you please explain what both patches actually do?
>
> "slight visual improvements to commitdiff view" leaves
> much, _much_ to be desired and is hardly a commit message
> suitable to live in git.git.
>
> Please describe what you found objectionable, why, how
> you decided to fix it and why you decided to fix it that way.
Adding difftree/whatchanged output to commitdiff view was somewhat
hasty, without taking care of details like separator between message
body and difftree, and separator between difftree and patchset.
First, I have removed creating empty divs. The div with number of
changed files in git_difftree_body is added only if the message about
number of changed files is displayed (above 10).
Second, I have moved commit message body in commitdiff outside
"page_body" div, to be together with "author_date" div with authorship
info. The name of class was changed from "log" to more informative
"commitdiff_log". This required some changes and additions to CSS. Now
"commitdiff_log" div is responsible for displaying line separatring it
from "page_body".
I have added not full line above "patchset" div (between patchet and
difftree). It is added by "patchset" div and separated by 8px padding.
Those changes might wait for proper refactoring of gitweb CSS (having
for example 8px padding in one place only).
--
Jakub Narebski
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH (amend)] gitweb: Slight visual improvements to commitdiff view
2006-10-26 23:50 ` Jakub Narebski
@ 2006-10-27 0:39 ` Luben Tuikov
2006-10-27 1:42 ` Junio C Hamano
0 siblings, 1 reply; 7+ messages in thread
From: Luben Tuikov @ 2006-10-27 0:39 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
--- Jakub Narebski <jnareb@gmail.com> wrote:
> First, I have removed creating empty divs. The div with number of
> changed files in git_difftree_body is added only if the message about
> number of changed files is displayed (above 10).
>
> Second, I have moved commit message body in commitdiff outside
> "page_body" div, to be together with "author_date" div with authorship
> info. The name of class was changed from "log" to more informative
> "commitdiff_log". This required some changes and additions to CSS. Now
> "commitdiff_log" div is responsible for displaying line separatring it
> from "page_body".
>
> I have added not full line above "patchset" div (between patchet and
> difftree). It is added by "patchset" div and separated by 8px padding.
>
>
> Those changes might wait for proper refactoring of gitweb CSS (having
> for example 8px padding in one place only).
Excellent! I'd like this explanation to be part of the
commit message if that patchset is committed to git.git.
Luben
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH (amend)] gitweb: Slight visual improvements to commitdiff view
2006-10-27 0:39 ` Luben Tuikov
@ 2006-10-27 1:42 ` Junio C Hamano
2006-10-27 1:47 ` Petr Baudis
0 siblings, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2006-10-27 1:42 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git, ltuikov
Luben Tuikov <ltuikov@yahoo.com> writes:
> --- Jakub Narebski <jnareb@gmail.com> wrote:
> ...
>> Those changes might wait for proper refactoring of gitweb CSS (having
>> for example 8px padding in one place only).
>
> Excellent! I'd like this explanation to be part of the
> commit message if that patchset is committed to git.git.
I'd like that kind of explanation with the patch in a single
message when it is ready to be applied, too.
I'll leave it up to you guys to decide if CSS refactoring should
go in first (I personally feel it probably is the case, in which
case this patch would need to be rebased I suspect).
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH (amend)] gitweb: Slight visual improvements to commitdiff view
2006-10-27 1:42 ` Junio C Hamano
@ 2006-10-27 1:47 ` Petr Baudis
0 siblings, 0 replies; 7+ messages in thread
From: Petr Baudis @ 2006-10-27 1:47 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jakub Narebski, git, ltuikov
Dear diary, on Fri, Oct 27, 2006 at 03:42:06AM CEST, I got a letter
where Junio C Hamano <junkio@cox.net> said that...
> Luben Tuikov <ltuikov@yahoo.com> writes:
>
> > --- Jakub Narebski <jnareb@gmail.com> wrote:
> > ...
> >> Those changes might wait for proper refactoring of gitweb CSS (having
> >> for example 8px padding in one place only).
> >
> > Excellent! I'd like this explanation to be part of the
> > commit message if that patchset is committed to git.git.
>
> I'd like that kind of explanation with the patch in a single
> message when it is ready to be applied, too.
>
> I'll leave it up to you guys to decide if CSS refactoring should
> go in first (I personally feel it probably is the case, in which
> case this patch would need to be rebased I suspect).
We don't have any such patch, do we? So let anyone doing that patch take
this one into account and merge in whatever we have, I'd say.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-10-27 1:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-26 16:13 [PATCH] gitweb: Slight visual improvements to commitdiff view Jakub Narebski
2006-10-26 16:43 ` [PATCH (amend)] " Jakub Narebski
2006-10-26 23:34 ` Luben Tuikov
2006-10-26 23:50 ` Jakub Narebski
2006-10-27 0:39 ` Luben Tuikov
2006-10-27 1:42 ` Junio C Hamano
2006-10-27 1:47 ` Petr Baudis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).