- Testing Done:
-
~ Viewed a review request with a change description and the diff viewer of a review request with multiple commits.f
~ Viewed a review request with a change description and the diff
+ viewer of a review request with multiple commits.
Refactor CSS for DiffCommit listings
Review Request #7220 — Created April 17, 2015 and submitted
All the CSS for styling tables of
DiffCommits has been refactored
intodiffviewer.lessto 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? |
|
|
|
No blank line. |
|
|
|
While this isn't a strict rule, a good starting point is to alphabetize the rules. There are exceptions. For instance, … |
|
|
|
Can you add a constant for this color? |
|
|
|
Alphabetical order. |
|
|
|
We probably want the author to shrink to fit, and the summary to expand to take all remaining space. For … |
|
|
|
This td should go before the tr above (alphabetical). That, or it should nest. |
|
|
|
These should be swapped. Children go after the immediate selector's rules. |
|
- Change Summary:
-
More refactoring.
- Commit:
-
f1b4f4e28d8de18c6f7957789048f19a00d09f15fec9122f2dd55dc419295a028b44de90af569a00
- 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
-
-
-
While this isn't a strict rule, a good starting point is to alphabetize the rules. There are exceptions. For instance,
positionoften goes withtop,left, etc., andwidthandheightoften go together. In a simple case like this, though, it's preferrable to alphabetize. -
-
-
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.)
-
-
- Commit:
-
fec9122f2dd55dc419295a028b44de90af569a009749719aedc860e3b2b20cae1ea2144a535e30c9
- 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
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 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