Bug 46153 - Add Preview button to patch review bar
Summary: Add Preview button to patch review bar
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-20 18:23 PDT by Darin Adler
Modified: 2010-09-21 09:40 PDT (History)
2 users (show)

See Also:


Attachments
Patch (3.05 KB, patch)
2010-09-20 18:28 PDT, Darin Adler
abarth: review+
abarth: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2010-09-20 18:23:35 PDT
Add Preview button and link to bug to patch review bar
Comment 1 Darin Adler 2010-09-20 18:28:01 PDT
Created attachment 68169 [details]
Patch
Comment 2 Adam Barth 2010-09-20 23:27:37 PDT
Comment on attachment 68169 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=68169&action=review

> BugsSite/code-review.js:257
> +    $(document.body).prepend('<div id="toolbar"><div class="actions"><button id="preview_comments">Preview</button><button id="post_comments">Publish</button></div><div class="message"><a href="show_bug.cgi?id=' + bug_id + '" target="_blank">bug ' + bug_id + '</a> <span class="commentStatus"></span> <span class="help">Double-click a line or click or drag on line numbers to add a comment.</span></div></div>');

Thanks for writing this patch.  This should work great.  The only problem is that bug_id won't necessarily be defined when this code runs.  This code runs on DOMContentLoaded, but we fetch the bug_id asynchronously by loading the details page for the attachment.  I'll land a modified version of this patch with just the preview button.
Comment 3 Adam Barth 2010-09-20 23:45:14 PDT
Committed r67927: <http://trac.webkit.org/changeset/67927>
Comment 4 Darin Adler 2010-09-21 09:39:18 PDT
(In reply to comment #2)
> The only problem is that bug_id won't necessarily be defined when this code runs.  This code runs on DOMContentLoaded, but we fetch the bug_id asynchronously by loading the details page for the attachment.  I'll land a modified version of this patch with just the preview button.

Can you help me create a version of this that adds the bug link when the details page loading is complete?