[WIP] Front end DnD Editor for per-user file storage
Review Request #5954 — Created June 8, 2014 and discarded
Ready for the first iteration of review.
- Changed bodyTopEditor in the review dialog view to use the created view, dragged and dropped a few files.
- Manually tried adding multiple files to a DnDEditorView
- Observed and recorded expected behaviour when a file dragged over both a window that has a DnDEditorView in focus and one that does not.
Extensive testing won't be possible until the backend stuff has been implemented.
Description | From | Last Updated |
---|---|---|
RB.MarkdownFileView? |
mike_conley | |
Just a nit - we tend to put the documentation for a function above the function header. It's also a … |
mike_conley | |
What is a "file" in this context? Is it something that we'd be able to get a mimetype from? That … |
mike_conley | |
No multiple drops? |
mike_conley | |
This should use "true" and "false" rather than "1" and "0". |
david | |
We always use brackets around conditional blocks: if (!this.active) { return; } In this specific case, because there's already a … |
david | |
Indentation should be 4 spaces with no tabs. You should check the rest of your changes for proper indentation. |
david | |
It's only really common for web browsers to show .gif, .png, and .jpg/jpeg. I don't see any need to support … |
david | |
This doesn't seem to "append" for codemirror fields. |
david | |
Care to put this above the method instead of inside it? |
david | |
Indentation is off here. |
david | |
I'm not sure what this comment means. Is this supposed to be a to-do item? |
david | |
Add a space after // |
david | |
What does this comment mean? |
david | |
Can you add the word "TODO" here? |
david | |
Can you put the comment above the method name? |
david | |
Should be only one blank line. Please also add a comment for attachFileView |
david | |
The outer parens can be removed here. |
david | |
The var statement should be at the beginning of the function (to make the hoisting clear). This line needs some … |
david | |
We should lower-case file.name before comparing, especially if someone is coming from a case-insensitive filesystem. It might also make sense … |
david | |
Should have a space after //. This should also be marked 'TODO' |
david | |
Should have a space after // (or just get rid of this--I think it's pretty clear that these are event … |
david | |
Remove this line. |
david | |
Backbone.Events should already be mixed in to any view. |
david |
-
This is a review from Review Bot. Tool: Pyflakes Processed Files: Ignored Files: reviewboard/static/rb/js/views/markdownEditorView.js
- Groups:
- Description:
-
~ [WIP] Front end DnD Editor for per-user file storage
~ Ready for the first iteration of review.
- Testing Done:
-
~ Nothing yet
~ Changed bodyTopEditor in the review dialog view to use the created view, dragged and dropped a few files. Extensive testing won't be possible until the backend stuff has been implemented.
- - Still firming out the details not ready for review yet.
- Commit:
-
d5462fa2469d1573d6a9137c641dfebee14919719224d90c6e24d185b75a267e2f87c7252071cbc2
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: Ignored Files: reviewboard/static/rb/js/views/reviewDialogView.js reviewboard/static/rb/js/views/markdownEditorView.js reviewboard/static/rb/js/views/dndUploaderView.js
-
-
-
-
Just a nit - we tend to put the documentation for a function above the function header. It's also a good idea to thoroughly describe the parameters to the function, and their expected types.
-
What is a "file" in this context? Is it something that we'd be able to get a mimetype from? That might be better than looking at file extensions.
-
- Testing Done:
-
~ Changed bodyTopEditor in the review dialog view to use the created view, dragged and dropped a few files. Extensive testing won't be possible until the backend stuff has been implemented.
~ - Changed bodyTopEditor in the review dialog view to use the created view, dragged and dropped a few files.
+ - Manually tried adding multiple files to a DnDEditorView
+ - Observed and recorded expected behaviour when a file dragged over both a window that has a DnDEditorView in focus and one that does not.
+ + Extensive testing won't be possible until the backend stuff has been implemented.
- Commit:
-
9224d90c6e24d185b75a267e2f87c7252071cbc20d61228847414833f006e944bfd2a794435e297e
-
Tool: Pyflakes Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/views/reviewDialogView.js reviewboard/static/rb/js/views/reviewRequestEditorView.js reviewboard/static/rb/js/views/markdownEditorView.js reviewboard/static/rb/js/views/dndUploaderView.js Tool: PEP8 Style Checker Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/views/reviewDialogView.js reviewboard/static/rb/js/views/reviewRequestEditorView.js reviewboard/static/rb/js/views/markdownEditorView.js reviewboard/static/rb/js/views/dndUploaderView.js
-
-
-
We always use brackets around conditional blocks:
if (!this.active) { return; }
In this specific case, because there's already a conditional around the contents of the method, I'd just fold it into that:
if (this.action && !this._dropOverlay && ...
-
Indentation should be 4 spaces with no tabs. You should check the rest of your changes for proper indentation.
-
It's only really common for web browsers to show .gif, .png, and .jpg/jpeg. I don't see any need to support .tiff or other formats.
-
Tool: Pyflakes Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/views/reviewDialogView.js reviewboard/static/rb/js/views/reviewRequestEditorView.js reviewboard/static/rb/js/views/markdownEditorView.js reviewboard/static/rb/js/views/dndUploaderView.js Tool: PEP8 Style Checker Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/views/reviewDialogView.js reviewboard/static/rb/js/views/reviewRequestEditorView.js reviewboard/static/rb/js/views/markdownEditorView.js reviewboard/static/rb/js/views/dndUploaderView.js
-
-
-
-
-
-
-
-
-
-
-
-
The
var
statement should be at the beginning of the function (to make the hoisting clear). This line needs some spaces in it:function(file) { var i; ... for (i = 0; i < imageExtensions.length; i++) {
-
We should lower-case
file.name
before comparing, especially if someone is coming from a case-insensitive filesystem.It might also make sense to use an indexOf call instead of regex match, for a slight efficiency gain.
-
-
Should have a space after
//
(or just get rid of this--I think it's pretty clear that these are event handlers. -
-