Skip to contentSkip to conversation

gitweb: bugfix: list regression

PATCH In review Luben Tuikov 4 participants 10 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gitweb: bugfix: list regression

Fix regression introduced by
commit 17d07443188909ef5f8b8c24043cb6d9fef51bca.

1. Commit 17d07443188909ef5f8b8c24043cb6d9fef51bca defines "a.list" twice in gitweb.css, once with bold and once with normal font-weight.

2. "a.list" being "bold", makes a myriad of things shown by gitweb in bold font-weight, which is a regression from pre-17d07443188909ef5f8b8c24043cb6d9fef51bca behavior.

The fix is to define separately "a.list_bold" and use that style in format_subject_html().

---
 gitweb/gitweb.css  |    9 +++++++--
 gitweb/gitweb.perl |    4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)
gitweb/gitweb.css +7 -2
index 9013895..db58629 100644
@@ -115,13 +115,18 @@ div.list_head {
 	font-style: italic;
 }
 
-a.list {
+a.list_bold {
 	text-decoration: none;
 	font-weight: bold;
 	color: #000000;
 }
 
-table.tags a.list {
+a.list {
+	text-decoration: none;
+	color: #000000;
+}
+
+table.tags {
 	font-weight: normal;
 }
 
gitweb/gitweb.perl +2 -2
index 063735d..5237f25 100755
@@ -504,11 +504,11 @@ sub format_subject_html {
 	$extra = '' unless defined($extra);
 
 	if (length($short) < length($long)) {
-		return $cgi->a({-href => $href, -class => "list",
+		return $cgi->a({-href => $href, -class => "list_bold",
 		                -title => $long},
 		       esc_html($short) . $extra);
 	} else {
-		return $cgi->a({-href => $href, -class => "list"},
+		return $cgi->a({-href => $href, -class => "list_bold"},
 		       esc_html($long)  . $extra);
 	}
 }
Signature · 1 line
1.4.2.g3851f
#1 lore raw

PATCH 1/1 gitweb: bugfix: a.list formatting regression

From: Jakub Narebski <[email protected]>

Fix regression introduced by
commit 17d07443188909ef5f8b8c24043cb6d9fef51bca.

"a.list" being "bold", makes a myriad of things shown by gitweb in bold font-weight, which is a regression from pre-17d07443188909ef5f8b8c24043cb6d9fef51bca behavior.

The fix is to add "subject" class and use this class to replace pre-format_subject_html formatting of subject (comment) via using (or not) <b>...</b> element. This should go back to the pre-17d0744318... style.

Regression noticed by Luben Tuikov.

---

Quoted 3 lines · Luben Tuikov

1. Commit 17d07443188909ef5f8b8c24043cb6d9fef51bca defines "a.list" twice in gitweb.css, once with bold and once with normal font-weight.

"table.tags a.list" means "a.list" inside "table.tags", so it is not redefinition of "a.list", but override (more specific CSS rule wins). It is for subject of tags list ("summary" and "tags" actions) to be in normal weight, as in such list the tag itself (ref) is in bold, not the tag comment (first line of free form part of tag).

 gitweb/gitweb.css  |    7 +++++--
 gitweb/gitweb.perl |    4 ++--
 2 files changed, 7 insertions(+), 4 deletions(-)
gitweb/gitweb.css +5 -2
index 9013895..6c13d9e 100644
@@ -117,11 +117,14 @@ div.list_head {
 
 a.list {
 	text-decoration: none;
-	font-weight: bold;
 	color: #000000;
 }
 
-table.tags a.list {
+a.subject {
+	font-weight: bold;
+}
+
+table.tags a.subject {
 	font-weight: normal;
 }
 
gitweb/gitweb.perl +2 -2
index 90157d5..40c5177 100755
@@ -504,11 +504,11 @@ sub format_subject_html {
 	$extra = '' unless defined($extra);
 
 	if (length($short) < length($long)) {
-		return $cgi->a({-href => $href, -class => "list",
+		return $cgi->a({-href => $href, -class => "list subject",
 		                -title => $long},
 		       esc_html($short) . $extra);
 	} else {
-		return $cgi->a({-href => $href, -class => "list"},
+		return $cgi->a({-href => $href, -class => "list subject"},
 		       esc_html($long)  . $extra);
 	}
 }
Signature · 1 line
1.4.1.1
#2 lore raw

Re: [PATCH] gitweb: bugfix: a.list formatting regression

Quoted 14 lines · --- Jakub Narebski

From: Jakub Narebski <[email protected]>

Fix regression introduced by
commit 17d07443188909ef5f8b8c24043cb6d9fef51bca.

"a.list" being "bold", makes a myriad of things shown by gitweb in bold font-weight, which is a regression from pre-17d07443188909ef5f8b8c24043cb6d9fef51bca behavior.

The fix is to add "subject" class and use this class to replace pre-format_subject_html formatting of subject (comment) via using (or not) <b>...</b> element. This should go back to the pre-17d0744318... style.

Quoted 5 lines

Regression noticed by Luben Tuikov.

---

ACK. Looks good.

Luben

Quoted 64 lines
Quoted 3 lines · Luben Tuikov

1. Commit 17d07443188909ef5f8b8c24043cb6d9fef51bca defines "a.list" twice in gitweb.css, once with bold and once with normal font-weight.

"table.tags a.list" means "a.list" inside "table.tags", so it is not redefinition of "a.list", but override (more specific CSS rule wins). It is for subject of tags list ("summary" and "tags" actions) to be in normal weight, as in such list the tag itself (ref) is in bold, not the tag comment (first line of free form part of tag).

 gitweb/gitweb.css  |    7 +++++--
 gitweb/gitweb.perl |    4 ++--
 2 files changed, 7 insertions(+), 4 deletions(-)
gitweb/gitweb.css +5 -2
index 9013895..6c13d9e 100644
@@ -117,11 +117,14 @@ div.list_head {
 
 a.list {
 	text-decoration: none;
-	font-weight: bold;
 	color: #000000;
 }
 
-table.tags a.list {
+a.subject {
+	font-weight: bold;
+}
+
+table.tags a.subject {
 	font-weight: normal;
 }
 
gitweb/gitweb.perl +2 -2
index 90157d5..40c5177 100755
@@ -504,11 +504,11 @@ sub format_subject_html {
 	$extra = '' unless defined($extra);
 
 	if (length($short) < length($long)) {
-		return $cgi->a({-href => $href, -class => "list",
+		return $cgi->a({-href => $href, -class => "list subject",
 		                -title => $long},
 		       esc_html($short) . $extra);
 	} else {
-		return $cgi->a({-href => $href, -class => "list"},
+		return $cgi->a({-href => $href, -class => "list subject"},
 		       esc_html($long)  . $extra);
 	}
 }
Signature · 6 lines
1.4.1.1

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

Re: [PATCH] gitweb: bugfix: a.list formatting regression

In reply to Jakub Narebski
Quoted 14 lines · --- Jakub Narebski

From: Jakub Narebski <[email protected]>

Fix regression introduced by
commit 17d07443188909ef5f8b8c24043cb6d9fef51bca.

"a.list" being "bold", makes a myriad of things shown by gitweb in bold font-weight, which is a regression from pre-17d07443188909ef5f8b8c24043cb6d9fef51bca behavior.

The fix is to add "subject" class and use this class to replace pre-format_subject_html formatting of subject (comment) via using (or not) <b>...</b> element. This should go back to the pre-17d0744318... style.

Quoted 5 lines

Regression noticed by Luben Tuikov.

---

ACK. Looks good.

Luben

Quoted 60 lines
Quoted 3 lines · Luben Tuikov

1. Commit 17d07443188909ef5f8b8c24043cb6d9fef51bca defines "a.list" twice in gitweb.css, once with bold and once with normal font-weight.

"table.tags a.list" means "a.list" inside "table.tags", so it is not redefinition of "a.list", but override (more specific CSS rule wins). It is for subject of tags list ("summary" and "tags" actions) to be in normal weight, as in such list the tag itself (ref) is in bold, not the tag comment (first line of free form part of tag).

 gitweb/gitweb.css  |    7 +++++--
 gitweb/gitweb.perl |    4 ++--
 2 files changed, 7 insertions(+), 4 deletions(-)
gitweb/gitweb.css +5 -2
index 9013895..6c13d9e 100644
@@ -117,11 +117,14 @@ div.list_head {
 
 a.list {
 	text-decoration: none;
-	font-weight: bold;
 	color: #000000;
 }
 
-table.tags a.list {
+a.subject {
+	font-weight: bold;
+}
+
+table.tags a.subject {
 	font-weight: normal;
 }
 
gitweb/gitweb.perl +2 -2
index 90157d5..40c5177 100755
@@ -504,11 +504,11 @@ sub format_subject_html {
 	$extra = '' unless defined($extra);
 
 	if (length($short) < length($long)) {
-		return $cgi->a({-href => $href, -class => "list",
+		return $cgi->a({-href => $href, -class => "list subject",
 		                -title => $long},
 		       esc_html($short) . $extra);
 	} else {
-		return $cgi->a({-href => $href, -class => "list"},
+		return $cgi->a({-href => $href, -class => "list subject"},
 		       esc_html($long)  . $extra);
 	}
 }
Signature · 1 line
1.4.1.1
#4 lore raw

Re: [PATCH] gitweb: bugfix: a.list formatting regression

Quoted 7 lines · Luben Tuikov
Quoted 7 lines

The fix is to add "subject" class and use this class to replace pre-format_subject_html formatting of subject (comment) via using (or not) <b>...</b> element. This should go back to the pre-17d0744318... style.

Regression noticed by Luben Tuikov.

Quoted 7 lines
Quoted 3 lines

---

ACK. Looks good.

Luben

Thanks, both.

#5 lore raw

Re: [PATCH] gitweb: bugfix: a.list formatting regression

In reply to Jakub Narebski
Quoted 14 lines · Jakub Narebski

From: Jakub Narebski <[email protected]>

Fix regression introduced by
commit 17d07443188909ef5f8b8c24043cb6d9fef51bca.

"a.list" being "bold", makes a myriad of things shown by gitweb in bold font-weight, which is a regression from pre-17d07443188909ef5f8b8c24043cb6d9fef51bca behavior.

The fix is to add "subject" class and use this class to replace pre-format_subject_html formatting of subject (comment) via using (or not) <b>...</b> element. This should go back to the pre-17d0744318... style.

Quoted 5 lines

Regression noticed by Luben Tuikov.

---

I haven't seen an Ack from Luben for the proposed renaming of the class, although I very much like naming things for what they mean (i.e. "subject"), not what they do (i.e. "bold") myself.

It might be worthwhile to do a full sweep of the pages we generate and identify what classes we would want. I have a feeling that we overuse a.list for example -- they are all in some form of list alright but they might benefit from a bit finer logical separatoin. One list is enumaration of refs and another is a chronological sequence of commits.

Then people who would want to tweak the presentation would have an easier time changing only gitweb.css.

#6 lore raw

Re: [PATCH] gitweb: bugfix: a.list formatting regression

Quoted 1 line · Junio C Hamano

Jakub Narebski <[email protected]> writes:

(the above is result of paste in wrong place in git-send-email invocation) [...]

Quoted 4 lines
Quoted 4 lines

The fix is to add "subject" class and use this class to replace pre-format_subject_html formatting of subject (comment) via using (or not) <b>...</b> element. This should go back to the pre-17d0744318... style.

[...]

Quoted 12 lines

I haven't seen an Ack from Luben for the proposed renaming of the class, although I very much like naming things for what they mean (i.e. "subject"), not what they do (i.e. "bold") myself.

It might be worthwhile to do a full sweep of the pages we generate and identify what classes we would want. I have a feeling that we overuse a.list for example -- they are all in some form of list alright but they might benefit from a bit finer logical separatoin. One list is enumaration of refs and another is a chronological sequence of commits.

Quoted 2 lines

Then people who would want to tweak the presentation would have an easier time changing only gitweb.css.

Next patch in this series of patches
[PATCH] gitweb: Replace some presentational HTML by CSS
Message-Id: <[email protected]>
adds "name" subclass (a.list.name) for ref names. (I think subclasses/multiple classes is the way to do it, as all a.list elements have something in common: use next class to divide).

Signature · 3 lines
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
#7 lore raw

Re: [PATCH] gitweb: bugfix: a.list formatting regression

Quoted 12 lines · Jakub Narebski
Quoted 9 lines · Junio C Hamano

It might be worthwhile to do a full sweep of the pages we generate and identify what classes we would want. I have a feeling that we overuse a.list for example -- they are all in some form of list alright but they might benefit from a bit finer logical separatoin. One list is enumaration of refs and another is a chronological sequence of commits.

Then people who would want to tweak the presentation would have an easier time changing only gitweb.css.

Quoted 6 lines

Next patch in this series of patches
[PATCH] gitweb: Replace some presentational HTML by CSS
Message-Id: <[email protected]>
adds "name" subclass (a.list.name) for ref names. (I think subclasses/multiple classes is the way to do it, as all a.list elements have something in common: use next class to divide).

I agree about the implementation aspect, such as using "list.name" as class names; I was suggesting to start from design.

#8 lore raw
In reply to Luben Tuikov
Quoted 6 lines · Luben Tuikov

Fix regression introduced by
commit 17d07443188909ef5f8b8c24043cb6d9fef51bca.

1. Commit 17d07443188909ef5f8b8c24043cb6d9fef51bca defines "a.list" twice in gitweb.css, once with bold and once with normal font-weight.

The normal one is limited to a.list that is inside table.tags isn't it? I had an impression that this was done on purpose.

Quoted 3 lines

2. "a.list" being "bold", makes a myriad of things shown by gitweb in bold font-weight, which is a regression from pre-17d07443188909ef5f8b8c24043cb6d9fef51bca behavior.

The only difference I see offhand is that Jakub's version shows the tag text in normal weight in summary pane (tags section), while yours show it in bold. Also clickable object names in many views are shown in bold in Jakub's version while yours do not distinguish them from unclickable ones.

I tend to agree that bold looks too loud in tree view, but showing tree and parent diffently from commit itself in commit view may be a good thing. I am not sure bold is a good choice, though. Usually people underline clickable links not type in bold.

I do not case either way myself that much. Could you battle this out with the guilty party?

#9 lore raw
In reply to Luben Tuikov
Quoted 7 lines · Luben Tuikov

Fix regression introduced by
commit 17d07443188909ef5f8b8c24043cb6d9fef51bca.

1. Commit 17d07443188909ef5f8b8c24043cb6d9fef51bca defines "a.list" twice in gitweb.css, once with bold and once with normal font-weight.

Quoted 6 lines

2. "a.list" being "bold", makes a myriad of things shown by gitweb in bold font-weight, which is a regression from pre-17d07443188909ef5f8b8c24043cb6d9fef51bca behavior.

The fix is to define separately "a.list_bold" and use that style in format_subject_html().

This fix is counter to what I wanted to do. I thought that "list" class is used only in "subject" links, so I defaulted it to bold (all such elements except one were inside <b>...</b>), and encoded exceptions; notice

+table.tags a.list {
+ font-weight: normal;
+}
+

We could as well define "bold" class for "a", i.e.

+a.bold {
+ font-weight: bold;
+}

but this is presentational CSS, no better than <b>...</b> element.

The correct solution would be to add "subject" class perhaps, and do exceptions for it.

Signature · 3 lines
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git