Add a smart tooltip to show descriptions in the diffviewer
Review Request #7256 — Created April 27, 2015 and submitted
Hovering over a summary in the commit description table now shows a
tooltip with copyable text if the commit's description is longer than
he summary. Moving the mouse off of the tooltip causes it to disappear.
Verified that the description was correctly shown.
The tooltip's text align's pixel-perfectly with the table's text in
Chrome, Firefox, and Safari on OS X.
Description | From | Last Updated |
---|---|---|
Blank line after this. |
|
|
Undo this change. |
|
|
If you're using .text(), you shouldn't also need to escape. |
|
|
These should go up below background-color. Also, no blank lines between the rules (as it gets harder to differentiate rules … |
|
|
Should be .box-shadow(...). |
|
|
We have a new .transition for this that does all the vendor-specific prefixes (though you'll need to pass duration as … |
|
|
This will put the cid key in diffCommit.attributes, which probably isn't what you want. You can instead put {} as … |
|
|
_.noop is built for this purpose. Not a big difference, except that it's one less function to create. |
|
|
Where does the 9 come from? |
|
|
Can you put the function body on its own line? |
|
|
This doesn't seem like a useful rule :) |
|
-
-
-
-
reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js (Diff revision 1) If you're using
.text()
, you shouldn't also need to escape.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+74 -2) |

-
Tool: Pyflakes Ignored Files: reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/css/pages/diffviewer.less Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/css/pages/diffviewer.less
-
-
reviewboard/static/rb/css/pages/diffviewer.less (Diff revision 2) These should go up below
background-color
. Also, no blank lines between the rules (as it gets harder to differentiate rules and nested styles).Also, should use
.border-radius(...)
. -
-
reviewboard/static/rb/css/pages/diffviewer.less (Diff revision 2) We have a new
.transition
for this that does all the vendor-specific prefixes (though you'll need to pass duration as part of the value). -
reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js (Diff revision 2) This will put the
cid
key indiffCommit.attributes
, which probably isn't what you want. You can instead put{}
as the first value to_.extend()
, or use_.defaults
. I think the latter is probably the best way to go.I also think, for future expansion, that this should be more like:
tr = this._itemTemplate(_.defaults( { cid: diffCommit.cid }, diffCommit.attributes));
-
reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js (Diff revision 2) _.noop
is built for this purpose. Not a big difference, except that it's one less function to create. -
reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js (Diff revision 2) Where does the 9 come from?
-
reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js (Diff revision 2) Can you put the function body on its own line?
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+494 -212) |

-
Tool: Pyflakes Processed Files: reviewboard/datagrids/columns.py reviewboard/reviews/templatetags/reviewtags.py Ignored Files: reviewboard/static/rb/js/newReviewRequest/views/repositoryView.js reviewboard/templates/datagrids/datagrid.html reviewboard/static/rb/js/newReviewRequest/views/newReviewRequestView.js reviewboard/templates/reviews/review_reply.html reviewboard/static/rb/css/pages/newReviewRequest.less reviewboard/static/rb/js/views/uploadDiffView.js reviewboard/static/rb/js/newReviewRequest/views/postCommitView.js reviewboard/static/rb/css/pages/diffviewer.less reviewboard/static/rb/css/ui/sidebars.less reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/css/pages/base.less reviewboard/static/rb/css/ui/datagrids.less reviewboard/static/rb/css/pages/admin.less reviewboard/static/rb/js/newReviewRequest/views/commitView.js reviewboard/static/rb/css/pages/reviews.less reviewboard/templates/reviews/new_review_request.html reviewboard/static/rb/css/defs.less reviewboard/static/rb/js/newReviewRequest/views/repositorySelectionView.js reviewboard/static/rb/css/mixins/style.less Tool: PEP8 Style Checker Processed Files: reviewboard/datagrids/columns.py reviewboard/reviews/templatetags/reviewtags.py Ignored Files: reviewboard/static/rb/js/newReviewRequest/views/repositoryView.js reviewboard/templates/datagrids/datagrid.html reviewboard/static/rb/js/newReviewRequest/views/newReviewRequestView.js reviewboard/templates/reviews/review_reply.html reviewboard/static/rb/css/pages/newReviewRequest.less reviewboard/static/rb/js/views/uploadDiffView.js reviewboard/static/rb/js/newReviewRequest/views/postCommitView.js reviewboard/static/rb/css/pages/diffviewer.less reviewboard/static/rb/css/ui/sidebars.less reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/css/pages/base.less reviewboard/static/rb/css/ui/datagrids.less reviewboard/static/rb/css/pages/admin.less reviewboard/static/rb/js/newReviewRequest/views/commitView.js reviewboard/static/rb/css/pages/reviews.less reviewboard/templates/reviews/new_review_request.html reviewboard/static/rb/css/defs.less reviewboard/static/rb/js/newReviewRequest/views/repositorySelectionView.js reviewboard/static/rb/css/mixins/style.less
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+84 -2) |

-
Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/css/pages/diffviewer.less Tool: Pyflakes Ignored Files: reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/css/pages/diffviewer.less
Change Summary:
Positioning adjustments. Renders perfect on Fx, but is off to top and right by 1px in chrome.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 5 (+83 -2) |

-
Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/css/pages/diffviewer.less Tool: Pyflakes Ignored Files: reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/css/pages/diffviewer.less
Change Summary:
Now pixel perfect in Chrome, Fx, and Safari on OSX.
Testing Done: |
|
|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
|||||||||||||||
Diff: |
Revision 6 (+87 -3) |

-
Tool: Pyflakes Ignored Files: reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/css/pages/diffviewer.less Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/css/pages/diffviewer.less
-
-
reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js (Diff revision 6) So I've managed to replace one magic number (9) with another (2), but this time it aligns pixel perfectly on all of my browsers.
I'm not sure if there is a better way to calculate this without it being a gigantic pain.
Change Summary:
Remove empty LESS rule.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 7 (+87 -3) |

-
Tool: Pyflakes Ignored Files: reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/css/pages/diffviewer.less Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/css/pages/diffviewer.less
-
-
reviewboard/static/rb/css/pages/diffviewer.less (Diff revision 7) This doesn't seem like a useful rule :)
Change Summary:
Fix David's issue. Refactor.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 8 (+79 -2) |