ChangeScreen2: Clean up FileTable status column CSS
The CSS class had rules applied that were not valid, due to a bad copy and paste attempt from another CSS rule elsewhere in Gerrit. FileTable should not have border-right and border-bottom as this table does not use any borders. The border rules did not apply because the token trimColor was not replaced by GWT, as there was no @eval in scope to apply this. Browsers do not understand the color "trimColor", so the rules just failed at display time with CSS warnings. The column should not be forced to a 1px width. This is a pointless value in this context as there is no border present. If none of the rows have a value in this allow the browser to collapse the cell to the smallest reasonable value. Using vertical-align: top was incorrect on this row. The "M" for a modify was sometimes floating a few pixels higher than the path string, making for a very poorly aligned row of text. Allow the text to fall at the same alignment as the path name does so the line reads as a single aligned text row. Use 4px right padding to space the status code offset from the file path. This avoids the character from running into the path string. Draw the status character using the same grey font as is used for the common path string components. This reduces the risk of the character being read as part of the path string, by making it a less important part of the line. Change-Id: I7d36578ecc9d4df6878b469ef04c3dd9653b7f5c
This commit is contained in:
@@ -65,6 +65,7 @@ class FileTable extends FlowPanel {
|
||||
interface FileTableCss extends CssResource {
|
||||
String pointer();
|
||||
String reviewed();
|
||||
String status();
|
||||
String pathColumn();
|
||||
String draftColumn();
|
||||
String newColumn();
|
||||
@@ -74,7 +75,6 @@ class FileTable extends FlowPanel {
|
||||
String commonPrefix();
|
||||
String inserted();
|
||||
String deleted();
|
||||
String statusTypeCell();
|
||||
}
|
||||
|
||||
private static final String REVIEWED;
|
||||
@@ -412,7 +412,7 @@ class FileTable extends FlowPanel {
|
||||
sb.openTr();
|
||||
sb.openTh().setStyleName(R.css().pointer()).closeTh();
|
||||
sb.openTh().setStyleName(R.css().reviewed()).closeTh();
|
||||
sb.openTh().setStyleName(R.css().statusTypeCell()).closeTh();
|
||||
sb.openTh().setStyleName(R.css().status()).closeTh();
|
||||
sb.openTh().append(Util.C.patchTableColumnName()).closeTh();
|
||||
sb.openTh()
|
||||
.setAttribute("colspan", 3)
|
||||
@@ -450,7 +450,7 @@ class FileTable extends FlowPanel {
|
||||
}
|
||||
|
||||
private void columnStatus(SafeHtmlBuilder sb, FileInfo info) {
|
||||
sb.openTd().setStyleName(R.css().statusTypeCell());
|
||||
sb.openTd().setStyleName(R.css().status());
|
||||
if (!Patch.COMMIT_MSG.equals(info.path())) {
|
||||
sb.append(info.status());
|
||||
}
|
||||
@@ -584,7 +584,7 @@ class FileTable extends FlowPanel {
|
||||
sb.openTr();
|
||||
sb.openTh().setStyleName(R.css().pointer()).closeTh();
|
||||
sb.openTh().setStyleName(R.css().reviewed()).closeTh();
|
||||
sb.openTh().setStyleName(R.css().statusTypeCell()).closeTh();
|
||||
sb.openTh().setStyleName(R.css().status()).closeTh();
|
||||
sb.openTd().closeTd(); // path
|
||||
sb.openTd().setAttribute("colspan", 3).closeTd(); // comments
|
||||
|
||||
|
||||
@@ -19,6 +19,11 @@
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.status {
|
||||
padding-right: 4px;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.pathColumn {
|
||||
white-space: nowrap;
|
||||
min-width: 600px;
|
||||
@@ -66,11 +71,3 @@
|
||||
background-color: #d44;
|
||||
}
|
||||
|
||||
.statusTypeCell {
|
||||
width: 1px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
border-right: 1px solid trimColor;
|
||||
border-bottom: 1px solid trimColor;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user