Testing Done: |
|
---|
Refactor CSS for DiffCommit listings
Review Request #7220 — Created April 17, 2015 and submitted
All the CSS for styling tables of
DiffCommit
s has been refactored
intodiffviewer.less
to reduce duplication. The styling can now be
more easily made consistent across all views where it is shown.
Viewed a review request with a change description and the diff
viewer of a review request with multiple commits.
Description | From | Last Updated |
---|---|---|
This is copied from the .diff-index code below here. How should this be refactored? |
brennie | |
No blank line. |
chipx86 | |
While this isn't a strict rule, a good starting point is to alphabetize the rules. There are exceptions. For instance, … |
chipx86 | |
Can you add a constant for this color? |
chipx86 | |
Alphabetical order. |
chipx86 | |
We probably want the author to shrink to fit, and the summary to expand to take all remaining space. For … |
chipx86 | |
This td should go before the tr above (alphabetical). That, or it should nest. |
chipx86 | |
These should be swapped. Children go after the immediate selector's rules. |
chipx86 |
-
-
reviewboard/static/rb/css/pages/diffviewer.less (Diff revision 1) This is copied from the
.diff-index
code below here. How should this be refactored?
Change Summary:
More refactoring.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+75 -92) |
-
Tool: Pyflakes Ignored Files: reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/templates/reviews/boxes/commit_list.html reviewboard/templates/reviews/boxes/commit_list_change.html reviewboard/static/rb/css/pages/reviews.less reviewboard/static/rb/css/pages/diffviewer.less Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/templates/reviews/boxes/commit_list.html reviewboard/templates/reviews/boxes/commit_list_change.html reviewboard/static/rb/css/pages/reviews.less reviewboard/static/rb/css/pages/diffviewer.less
-
-
-
reviewboard/static/rb/css/pages/diffviewer.less (Diff revision 2) While this isn't a strict rule, a good starting point is to alphabetize the rules. There are exceptions. For instance,
position
often goes withtop
,left
, etc., andwidth
andheight
often go together. In a simple case like this, though, it's preferrable to alphabetize. -
reviewboard/static/rb/css/pages/diffviewer.less (Diff revision 2) Can you add a constant for this color?
-
-
reviewboard/static/rb/css/pages/diffviewer.less (Diff revision 2) We probably want the author to shrink to fit, and the summary to expand to take all remaining space. For this, I'd suggest something like:
&.diff-commit-author { white-space: nowrap; } &.diff-commit-summary { width: 100%; }
(Also, notice the alphabetical order.)
-
reviewboard/static/rb/css/pages/diffviewer.less (Diff revision 2) This
td
should go before thetr
above (alphabetical). That, or it should nest. -
reviewboard/static/rb/css/pages/diffviewer.less (Diff revision 2) These should be swapped. Children go after the immediate selector's rules.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+78 -94) |
-
Tool: Pyflakes Ignored Files: reviewboard/static/rb/css/pages/diffviewer.less reviewboard/templates/reviews/boxes/commit_list.html reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/css/pages/reviews.less reviewboard/static/rb/css/defs.less reviewboard/templates/reviews/boxes/commit_list_change.html Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/css/pages/diffviewer.less reviewboard/templates/reviews/boxes/commit_list.html reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/css/pages/reviews.less reviewboard/static/rb/css/defs.less reviewboard/templates/reviews/boxes/commit_list_change.html