WIP: Dynamic Review UI Rendering

Review Request #10758 — Created Oct. 20, 2019 and updated

Information

Review Board
master

Reviewers

Overview:

Add in functionality to allow review UIs to provide a list of (relative) URLs they want to register, along with the methods that will be handling requests to those URLs.

Task specifications can be found here

This task has been separated into 4 subtasks:

1. Base(1): Review UI URLs - Adding the ability for a ReviewUI subclass to provide URLs they want to make available. Assigned to Nicole.
2. Text(1): Built-In Render URLs - Adding a standard _render/ URL for TextBasedReviewUI. This would ultimately take a type= argument specifying (source or rendered), which could be passed by the caller. Assigned to Nicole.
3. Text(2): Rendering Options Template Block - Update reviewboard/templates/reviews/ui/text.html template to provide a {% block "render_options" %} that subclasses of the template can use to add new UI. This would be blank by default, meaning it's entirely optional, and can be used only by the review UIs that need it. Assigned to Adil.
4. Text(3): Render Requests in JavaScript - Wrap RB.apiCall in a new method to provide Review UIs with the ability to make requests for custom rendering options and backend rendering implementations. Assigned to Adil

Adil's Testing for Tasks 3 and 4:

  1. Ran JavaScript unit tests.
  2. Tested manually to make sure that the element to update actually gets
    updated by using a mock endpoint.
  3. Tested manually to make sure comments are correctly reattached after
    a request is finished.
Summary ID Author
set up base for review ui urls
8321ecb908f20b49eb2268770c82695e3369ddb0 nicolelisa
add testing and fix patterns
db70ed57fcd4ad6e53ed9d7d60050b3fd55334c9 nicolelisa
reviewbot changes
e11c287f2f0ee9d18dbb15b0d8b7a92adb78b025 nicolelisa
wip for url rendering with ajax started
9b5766e66ce9613b4aae5a0c7c3466bdb5edba0d nicolelisa
revert html changes to rendering
ac92785154c3b11ffca422967cc093a3196da6e8 nicolelisa
reviewbot changes
bbac6f795332fbebc83b8392ecc3213b86f58ab2 nicolelisa
Add in Adil's 'Added function to reload render options with AJAX' - Review Request #10749
179716bc369fae4f98b62ebd30ef2f858e87f974 nicolelisa
reviewbot changes
cfebbba9ebc36d2fad99b5d2f88844892a0ec284 nicolelisa
Changed enpoint for ajax request to point to TextBasedReviewUIView url
20b38c6b129876ce9714e3a13672182c88fa8866 nicolelisa
Renamed TextBasedReviewUIView to TextBasedReviewUITextView
fad657c963f5bdf9b98f38eaa802fa033591c203 nicolelisa
Added in Review Request #10731 changes completed by Adil
b2bef6b73d110507856bf81618e48a846ccc79ec nicolelisa
Add dummy features for the Ajax functionality
8db350412c01e143b1d21654493f7667b80ea218 nicolelisa
Description From Last Updated

E402 module level import not at top of file

reviewbotreviewbot

E501 line too long (82 > 79 characters)

reviewbotreviewbot

F401 'django.conf.urls.include' imported but unused

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

F401 'django.core.urlresolvers.reverse_lazy' imported but unused

reviewbotreviewbot

F401 'django.core.urlresolvers.reverse' imported but unused

reviewbotreviewbot

F401 'django.http.Http404' imported but unused

reviewbotreviewbot

F401 'django.core.urlresolvers.resolve' imported but unused

reviewbotreviewbot

F401 'django.db.models.Q' imported but unused

reviewbotreviewbot

F401 'django.http.Http404' imported but unused

reviewbotreviewbot

F401 'django.http.HttpResponseForbidden' imported but unused

reviewbotreviewbot

F401 'django.core.urlresolvers.resolve' imported but unused

reviewbotreviewbot

F401 'django.db.models.Q' imported but unused

reviewbotreviewbot

F401 'django.shortcuts.get_object_or_404' imported but unused

reviewbotreviewbot

F401 'reviewboard.reviews.views.ReviewFileAttachmentView' imported but unused

reviewbotreviewbot

This shouldn't be staticmethod and should be the get method, ie def get(self, ...):

brenniebrennie

Once ReviewFileAttachmentViewMixin is not using staticmethods, this should just be self.get_attachments, etc.

brenniebrennie

Here too

brenniebrennie

F841 local variable 'review_ui' is assigned to but never used

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

This should be TextBasedReviewUIView.as_view()

brenniebrennie

These should not be staticmethods; these should be regular methods instead.

brenniebrennie

These should not be staticmethods; these should be regular methods instead.

brenniebrennie

F841 local variable 'review_ui' is assigned to but never used

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

In addition to these new tests, you should also have tests that assert that unregistering the review UI has the …

amalik2amalik2

This import statement should probably be moved to the top of this file for consistency.

amalik2amalik2

Is there any way this can be done without modifying a global variable in another file? If there isn't, then …

amalik2amalik2

This import statement should probably be moved to the top of this file for consistency.

amalik2amalik2

F401 'django.http.HttpResponse' imported but unused

reviewbotreviewbot

F401 'djblets.util.decorators.augment_method_from' imported but unused

reviewbotreviewbot

F401 'djblets.webapi.resources.WebAPIResource' imported but unused

reviewbotreviewbot

F401 'reviewboard.reviews.models.ReviewRequest' imported but unused

reviewbotreviewbot

F401 'reviewboard.reviews.views.ReviewFileAttachmentView' imported but unused

reviewbotreviewbot

F401 'django.views.generic.base.ContextMixin' imported but unused

reviewbotreviewbot

F401 'django.views.generic.base.TemplateView' imported but unused

reviewbotreviewbot

F401 'django.views.generic.base.RedirectView' imported but unused

reviewbotreviewbot

F401 'reviewboard.webapi.decorators.webapi_check_local_site' imported but unused

reviewbotreviewbot

You should write some tests to make sure that this method works as expected

amalik2amalik2

E501 line too long (81 > 79 characters)

reviewbotreviewbot

E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Is kwargs meant to be used by individual review UIs in the future? I think all of the query parameter …

amalik2amalik2

Just curious about this, how can specific review UIs like the JSON or XML ones render text in different ways …

amalik2amalik2

E501 line too long (84 > 79 characters)

reviewbotreviewbot

F841 local variable 'review_ui' is assigned to but never used

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

F401 'django.db.models.Q' imported but unused

reviewbotreviewbot

F401 'django.shortcuts.get_object_or_404' imported but unused

reviewbotreviewbot

F401 'reviewboard.reviews.views_mixins.ReviewRequestViewMixin' imported but unused

reviewbotreviewbot

E126 continuation line over-indented for hanging indent

reviewbotreviewbot

F401 'django.http.Http404' imported but unused

reviewbotreviewbot

F401 'django.shortcuts.render_to_response' imported but unused

reviewbotreviewbot

F401 'reviewboard.reviews.views.ReviewFileAttachmentView' imported but unused

reviewbotreviewbot

F401 'django.views.generic.base.View' imported but unused

reviewbotreviewbot

F811 redefinition of unused 'ReviewFileAttachmentViewMixin' from line 76

reviewbotreviewbot

E126 continuation line over-indented for hanging indent

reviewbotreviewbot

F841 local variable 'is_enabled_for' is assigned to but never used

reviewbotreviewbot

F401 'django.http.HttpResponseNotFound' imported but unused

reviewbotreviewbot

F401 'django.http.HttpResponse' imported but unused

reviewbotreviewbot

F401 'django.http.HttpResponseBadRequest' imported but unused

reviewbotreviewbot

F401 'django.shortcuts.get_list_or_404' imported but unused

reviewbotreviewbot

E501 line too long (86 > 79 characters)

reviewbotreviewbot

E116 unexpected indentation (comment)

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

F401 'django.db.models.Q' imported but unused

reviewbotreviewbot

F401 'django.shortcuts.get_object_or_404' imported but unused

reviewbotreviewbot

F401 'reviewboard.reviews.views_mixins.ReviewRequestViewMixin' imported but unused

reviewbotreviewbot

E126 continuation line over-indented for hanging indent

reviewbotreviewbot

F401 'django.http.HttpResponse' imported but unused

reviewbotreviewbot

F401 'django.http.Http404' imported but unused

reviewbotreviewbot

F401 'django.shortcuts.render_to_response' imported but unused

reviewbotreviewbot

E126 continuation line over-indented for hanging indent

reviewbotreviewbot

F401 'django.http.HttpResponse' imported but unused

reviewbotreviewbot

F401 'django.http.HttpResponseBadRequest' imported but unused

reviewbotreviewbot

F401 'django.http.HttpResponseNotFound' imported but unused

reviewbotreviewbot

F401 'django.shortcuts.get_list_or_404' imported but unused

reviewbotreviewbot

E116 unexpected indentation (comment)

reviewbotreviewbot

E501 line too long (86 > 79 characters)

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

F401 'django.db.models.Q' imported but unused

reviewbotreviewbot

F401 'django.shortcuts.get_object_or_404' imported but unused

reviewbotreviewbot

F401 'reviewboard.reviews.views_mixins.ReviewRequestViewMixin' imported but unused

reviewbotreviewbot

E126 continuation line over-indented for hanging indent

reviewbotreviewbot

F401 'django.http.HttpResponse' imported but unused

reviewbotreviewbot

F401 'django.http.Http404' imported but unused

reviewbotreviewbot

F401 'django.shortcuts.render_to_response' imported but unused

reviewbotreviewbot

E126 continuation line over-indented for hanging indent

reviewbotreviewbot

F401 'django.http.HttpResponse' imported but unused

reviewbotreviewbot

F401 'django.http.HttpResponseBadRequest' imported but unused

reviewbotreviewbot

F401 'django.http.HttpResponseNotFound' imported but unused

reviewbotreviewbot

F401 'django.shortcuts.get_list_or_404' imported but unused

reviewbotreviewbot

E116 unexpected indentation (comment)

reviewbotreviewbot

E501 line too long (86 > 79 characters)

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E302 expected 2 blank lines, found 0

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

This should be removed, I've removed it from my AJAX function review request now as well

amalik2amalik2

This should be removed, I've removed it from my AJAX function review request now as well

amalik2amalik2

This should be removed, I've removed it from my AJAX function review request now as well

amalik2amalik2

This should be removed, I've removed it from my AJAX function review request now as well

amalik2amalik2

All changes to this file should be reverted since they were just for testing purposes

amalik2amalik2

F401 'django.http.HttpResponse' imported but unused

reviewbotreviewbot

F401 'django.utils.safestring.mark_safe' imported but unused

reviewbotreviewbot

F401 'djblets.util.compat.django.template.loader.render_to_string' imported but unused

reviewbotreviewbot

This test code should be removed

amalik2amalik2

This test code should be removed

amalik2amalik2

This isn't too important but technically this should be an HTTP 400 error. 404 indicates the resource was not found, …

amalik2amalik2

This will need to be slightly modified to handle diff chunks, since those aren't stored using context['rendered_lines'] or context['text_lines']

amalik2amalik2

In my XML review request I had to set context['lines'] to the result of the generate_render() function to bypass the …

amalik2amalik2

This should be context['lines'] = context['text_lines']

amalik2amalik2

This test code should be removed

amalik2amalik2

This should either be implemented and used in some way or removed

amalik2amalik2

Maybe a different name for this key would be more suitable? It may not be that intuitive to others what …

amalik2amalik2

This comment should be removed

amalik2amalik2

This comment should be removed

amalik2amalik2

This isn't important for this review request but in my AJAX function review request, there was a check for whether …

amalik2amalik2

This test code should be removed

amalik2amalik2

This test code should be removed

amalik2amalik2

This test code should be removed

amalik2amalik2

This test code should be removed

amalik2amalik2

The docstring should be modified to include the 'renderType' parameter since you are using it

amalik2amalik2

This should be removed

amalik2amalik2

This test code should be removed

amalik2amalik2

This test code should be removed

amalik2amalik2

This test code should be removed

amalik2amalik2

This test code should be removed

amalik2amalik2

This test code should be removed

amalik2amalik2

This test code should be removed

amalik2amalik2

This test code should be removed

amalik2amalik2

This test code should be removed

amalik2amalik2

This test code should be removed

amalik2amalik2

This test code should be removed

amalik2amalik2

This test code should be removed

amalik2amalik2

This test code should be removed

amalik2amalik2
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

nicolelisa
Review request changed
Commits:
Summary ID Author
set up base for review ui urls
8321ecb908f20b49eb2268770c82695e3369ddb0 nicolelisa
set up base for review ui urls
8321ecb908f20b49eb2268770c82695e3369ddb0 nicolelisa
add testing and fix patterns
db70ed57fcd4ad6e53ed9d7d60050b3fd55334c9 nicolelisa

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

nicolelisa
nicolelisa
Review request changed
Commits:
Summary ID Author
set up base for review ui urls
8321ecb908f20b49eb2268770c82695e3369ddb0 nicolelisa
add testing and fix patterns
db70ed57fcd4ad6e53ed9d7d60050b3fd55334c9 nicolelisa
reviewbot changes
e11c287f2f0ee9d18dbb15b0d8b7a92adb78b025 nicolelisa
set up base for review ui urls
8321ecb908f20b49eb2268770c82695e3369ddb0 nicolelisa
add testing and fix patterns
db70ed57fcd4ad6e53ed9d7d60050b3fd55334c9 nicolelisa
reviewbot changes
e11c287f2f0ee9d18dbb15b0d8b7a92adb78b025 nicolelisa
add get_render_mode
3f69a1f00c9303084d1d89fe47bc622472df4c71 nicolelisa

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

nicolelisa
Review request changed
Commits:
Summary ID Author
set up base for review ui urls
8321ecb908f20b49eb2268770c82695e3369ddb0 nicolelisa
add testing and fix patterns
db70ed57fcd4ad6e53ed9d7d60050b3fd55334c9 nicolelisa
reviewbot changes
e11c287f2f0ee9d18dbb15b0d8b7a92adb78b025 nicolelisa
add get_render_mode
3f69a1f00c9303084d1d89fe47bc622472df4c71 nicolelisa
set up base for review ui urls
8321ecb908f20b49eb2268770c82695e3369ddb0 nicolelisa
add testing and fix patterns
db70ed57fcd4ad6e53ed9d7d60050b3fd55334c9 nicolelisa
reviewbot changes
e11c287f2f0ee9d18dbb15b0d8b7a92adb78b025 nicolelisa
add get_render_mode
9c9d767c43a41e701165bb4506f2b3a11eec5b49 nicolelisa

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

brennie
  1. 
      
  2. reviewboard/reviews/ui/text.py (Diff revision 5)
     
     
     
     
    Show all issues

    This shouldn't be staticmethod and should be the get method, ie

    def get(self, ...):
    
  3. reviewboard/reviews/ui/text.py (Diff revision 5)
     
     
    Show all issues

    Once ReviewFileAttachmentViewMixin is not using staticmethods, this should just be self.get_attachments, etc.

  4. reviewboard/reviews/ui/text.py (Diff revision 5)
     
     
    Show all issues

    Here too

  5. reviewboard/reviews/ui/text.py (Diff revision 5)
     
     
    Show all issues

    This should be TextBasedReviewUIView.as_view()

  6. reviewboard/reviews/views.py (Diff revision 5)
     
     
     
    Show all issues

    These should not be staticmethods; these should be regular methods instead.

  7. reviewboard/reviews/views.py (Diff revision 5)
     
     
     
    Show all issues

    These should not be staticmethods; these should be regular methods instead.

  8. 
      
nicolelisa
Review request changed
Commits:
Summary ID Author
set up base for review ui urls
8321ecb908f20b49eb2268770c82695e3369ddb0 nicolelisa
add testing and fix patterns
db70ed57fcd4ad6e53ed9d7d60050b3fd55334c9 nicolelisa
reviewbot changes
e11c287f2f0ee9d18dbb15b0d8b7a92adb78b025 nicolelisa
add get_render_mode
9c9d767c43a41e701165bb4506f2b3a11eec5b49 nicolelisa
set up base for review ui urls
8321ecb908f20b49eb2268770c82695e3369ddb0 nicolelisa
add testing and fix patterns
db70ed57fcd4ad6e53ed9d7d60050b3fd55334c9 nicolelisa
reviewbot changes
e11c287f2f0ee9d18dbb15b0d8b7a92adb78b025 nicolelisa
add get_render_mode
d71396a9f3efab7725275c2172429aef3e48778b nicolelisa

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

amalik2
  1. 
      
  2. Show all issues

    In addition to these new tests, you should also have tests that assert that unregistering the review UI has the expected behaviour.

    1. Hm. I had sworn i wrote this but I must have forgot. thanks for pointing this out!

  3. reviewboard/reviews/ui/base.py (Diff revision 6)
     
     
    Show all issues

    This import statement should probably be moved to the top of this file for consistency.

    1. This was the workaround for the cyclic import statement discussed in the meeting. If you have any other ideas on how to fix this though, that would be really helpful.

  4. reviewboard/reviews/ui/base.py (Diff revision 6)
     
     
    Show all issues

    Is there any way this can be done without modifying a global variable in another file? If there isn't, then for encapsulation purposes it may be better to have a method in the urls.py file that takes in a urlpatterns argument, and appends it to the dyanmic URL resolver. Something like this:

    def add_dynamic_review_ui_urls(urlpatterns):
    ....

  5. reviewboard/reviews/ui/base.py (Diff revision 6)
     
     
    Show all issues

    This import statement should probably be moved to the top of this file for consistency.

  6. reviewboard/reviews/ui/text.py (Diff revision 6)
     
     
    Show all issues

    You should write some tests to make sure that this method works as expected

    1. Structuring of this is still a WIP but that's on the todo list

  7. reviewboard/reviews/ui/text.py (Diff revision 6)
     
     
    Show all issues

    Is kwargs meant to be used by individual review UIs in the future? I think all of the query parameter values are available in the request object, which already gets passed to the review UI

    1. Changing the structure of this part but will take a look at this when it's moved around.

  8. reviewboard/reviews/ui/text.py (Diff revision 6)
     
     
    Show all issues

    Just curious about this, how can specific review UIs like the JSON or XML ones render text in different ways based on the query parameter values? Where should the code that accesses them actually be (i.e. would it be in get_render_lines? If so, wouldn't that function need to be modified to take in a request argument?)

    1. Yeah, we've been discussing this in the #students channel. Moving a bunch of stuff around to hopefully address this.

  9. 
      
nicolelisa
Review request changed
Commits:
Summary ID Author
set up base for review ui urls
8321ecb908f20b49eb2268770c82695e3369ddb0 nicolelisa
add testing and fix patterns
db70ed57fcd4ad6e53ed9d7d60050b3fd55334c9 nicolelisa
reviewbot changes
e11c287f2f0ee9d18dbb15b0d8b7a92adb78b025 nicolelisa
add get_render_mode
d71396a9f3efab7725275c2172429aef3e48778b nicolelisa
set up base for review ui urls
8321ecb908f20b49eb2268770c82695e3369ddb0 nicolelisa
add testing and fix patterns
db70ed57fcd4ad6e53ed9d7d60050b3fd55334c9 nicolelisa
reviewbot changes
e11c287f2f0ee9d18dbb15b0d8b7a92adb78b025 nicolelisa
add get_render_mode
d87233dcbfd3bc2acf76d71c38c5afa54f20af0c nicolelisa

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

nicolelisa
Review request changed
Commits:
Summary ID Author
set up base for review ui urls
8321ecb908f20b49eb2268770c82695e3369ddb0 nicolelisa
add testing and fix patterns
db70ed57fcd4ad6e53ed9d7d60050b3fd55334c9 nicolelisa
reviewbot changes
e11c287f2f0ee9d18dbb15b0d8b7a92adb78b025 nicolelisa
add get_render_mode
d87233dcbfd3bc2acf76d71c38c5afa54f20af0c nicolelisa
set up base for review ui urls
8321ecb908f20b49eb2268770c82695e3369ddb0 nicolelisa
add testing and fix patterns
db70ed57fcd4ad6e53ed9d7d60050b3fd55334c9 nicolelisa
reviewbot changes
e11c287f2f0ee9d18dbb15b0d8b7a92adb78b025 nicolelisa
wip for url rendering with ajax started
9b5766e66ce9613b4aae5a0c7c3466bdb5edba0d nicolelisa

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

nicolelisa
Review request changed
Commits:
Summary ID Author
set up base for review ui urls
8321ecb908f20b49eb2268770c82695e3369ddb0 nicolelisa
add testing and fix patterns
db70ed57fcd4ad6e53ed9d7d60050b3fd55334c9 nicolelisa
reviewbot changes
e11c287f2f0ee9d18dbb15b0d8b7a92adb78b025 nicolelisa
wip for url rendering with ajax started
9b5766e66ce9613b4aae5a0c7c3466bdb5edba0d nicolelisa
set up base for review ui urls
8321ecb908f20b49eb2268770c82695e3369ddb0 nicolelisa
add testing and fix patterns
db70ed57fcd4ad6e53ed9d7d60050b3fd55334c9 nicolelisa
reviewbot changes
e11c287f2f0ee9d18dbb15b0d8b7a92adb78b025 nicolelisa
wip for url rendering with ajax started
9b5766e66ce9613b4aae5a0c7c3466bdb5edba0d nicolelisa
revert html changes to rendering
ac92785154c3b11ffca422967cc093a3196da6e8 nicolelisa

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

nicolelisa
nicolelisa
Review request changed
Commits:
Summary ID Author
set up base for review ui urls
8321ecb908f20b49eb2268770c82695e3369ddb0 nicolelisa
add testing and fix patterns
db70ed57fcd4ad6e53ed9d7d60050b3fd55334c9 nicolelisa
reviewbot changes
e11c287f2f0ee9d18dbb15b0d8b7a92adb78b025 nicolelisa
wip for url rendering with ajax started
9b5766e66ce9613b4aae5a0c7c3466bdb5edba0d nicolelisa
revert html changes to rendering
ac92785154c3b11ffca422967cc093a3196da6e8 nicolelisa
reviewbot changes
ac31a894d15d2097bfad47231f80cd6226536581 nicolelisa
set up base for review ui urls
8321ecb908f20b49eb2268770c82695e3369ddb0 nicolelisa
add testing and fix patterns
db70ed57fcd4ad6e53ed9d7d60050b3fd55334c9 nicolelisa
reviewbot changes
e11c287f2f0ee9d18dbb15b0d8b7a92adb78b025 nicolelisa
wip for url rendering with ajax started
9b5766e66ce9613b4aae5a0c7c3466bdb5edba0d nicolelisa
revert html changes to rendering
ac92785154c3b11ffca422967cc093a3196da6e8 nicolelisa
reviewbot changes
bbac6f795332fbebc83b8392ecc3213b86f58ab2 nicolelisa
Add in Adil's 'Added function to reload render options with AJAX' - Review Request #10749
179716bc369fae4f98b62ebd30ef2f858e87f974 nicolelisa

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

nicolelisa
nicolelisa
nicolelisa
Review request changed
Commits:
Summary ID Author
set up base for review ui urls
8321ecb908f20b49eb2268770c82695e3369ddb0 nicolelisa
add testing and fix patterns
db70ed57fcd4ad6e53ed9d7d60050b3fd55334c9 nicolelisa
reviewbot changes
e11c287f2f0ee9d18dbb15b0d8b7a92adb78b025 nicolelisa
wip for url rendering with ajax started
9b5766e66ce9613b4aae5a0c7c3466bdb5edba0d nicolelisa
revert html changes to rendering
ac92785154c3b11ffca422967cc093a3196da6e8 nicolelisa
reviewbot changes
bbac6f795332fbebc83b8392ecc3213b86f58ab2 nicolelisa
Add in Adil's 'Added function to reload render options with AJAX' - Review Request #10749
179716bc369fae4f98b62ebd30ef2f858e87f974 nicolelisa
set up base for review ui urls
8321ecb908f20b49eb2268770c82695e3369ddb0 nicolelisa
add testing and fix patterns
db70ed57fcd4ad6e53ed9d7d60050b3fd55334c9 nicolelisa
reviewbot changes
e11c287f2f0ee9d18dbb15b0d8b7a92adb78b025 nicolelisa
wip for url rendering with ajax started
9b5766e66ce9613b4aae5a0c7c3466bdb5edba0d nicolelisa
revert html changes to rendering
ac92785154c3b11ffca422967cc093a3196da6e8 nicolelisa
reviewbot changes
bbac6f795332fbebc83b8392ecc3213b86f58ab2 nicolelisa
Add in Adil's 'Added function to reload render options with AJAX' - Review Request #10749
179716bc369fae4f98b62ebd30ef2f858e87f974 nicolelisa
reviewbot changes
cfebbba9ebc36d2fad99b5d2f88844892a0ec284 nicolelisa
Changed enpoint for ajax request to point to TextBasedReviewUIView url
20b38c6b129876ce9714e3a13672182c88fa8866 nicolelisa
Renamed TextBasedReviewUIView to TextBasedReviewUITextView
fad657c963f5bdf9b98f38eaa802fa033591c203 nicolelisa
Added in Review Request #10731 changes completed by Adil
b2bef6b73d110507856bf81618e48a846ccc79ec nicolelisa
Add dummy features for the Ajax functionality
8db350412c01e143b1d21654493f7667b80ea218 nicolelisa

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

amalik2
  1. 
      
  2. reviewboard/admin/urls.py (Diff revision 12)
     
     
    Show all issues

    This should be removed, I've removed it from my AJAX function review request now as well

  3. reviewboard/admin/urls.py (Diff revision 12)
     
     
    Show all issues

    This should be removed, I've removed it from my AJAX function review request now as well

  4. reviewboard/admin/urls.py (Diff revision 12)
     
     
    Show all issues

    This should be removed, I've removed it from my AJAX function review request now as well

  5. reviewboard/admin/urls.py (Diff revision 12)
     
     
    Show all issues

    This should be removed, I've removed it from my AJAX function review request now as well

  6. reviewboard/reviews/ui/markdownui.py (Diff revision 12)
     
     
    Show all issues

    All changes to this file should be reverted since they were just for testing purposes

  7. reviewboard/reviews/ui/text.py (Diff revision 12)
     
     
    Show all issues

    This test code should be removed

  8. reviewboard/reviews/ui/text.py (Diff revision 12)
     
     
    Show all issues

    This test code should be removed

  9. reviewboard/reviews/ui/text.py (Diff revision 12)
     
     
    Show all issues

    This isn't too important but technically this should be an HTTP 400 error. 404 indicates the resource was not found, while 400 indicates that the client sent a bad request (in this case, an invalid render_type value counts as a bad request)

  10. reviewboard/reviews/ui/text.py (Diff revision 12)
     
     
    Show all issues

    This will need to be slightly modified to handle diff chunks, since those aren't stored using context['rendered_lines'] or context['text_lines']

  11. reviewboard/reviews/ui/text.py (Diff revision 12)
     
     
    Show all issues

    In my XML review request I had to set context['lines'] to the result of the generate_render() function to bypass the caching that occurs in get_rendered_lines(), I think you'll have to do that here as well

  12. reviewboard/reviews/ui/text.py (Diff revision 12)
     
     
    Show all issues

    This should be context['lines'] = context['text_lines']

  13. reviewboard/reviews/ui/text.py (Diff revision 12)
     
     
    Show all issues

    This test code should be removed

  14. reviewboard/reviews/ui/text.py (Diff revision 12)
     
     
    Show all issues

    This should either be implemented and used in some way or removed

  15. reviewboard/reviews/ui/text.py (Diff revision 12)
     
     
    Show all issues

    Maybe a different name for this key would be more suitable? It may not be that intuitive to others what 'reviewUIId' actually means. 'reviewUiType' perhaps?

  16. reviewboard/reviews/views_mixins.py (Diff revision 12)
     
     
    Show all issues

    This comment should be removed

  17. reviewboard/reviews/views_mixins.py (Diff revision 12)
     
     
    Show all issues

    This comment should be removed

  18. Show all issues

    This isn't important for this review request but in my AJAX function review request, there was a check for whether a comment should be rendered or not here. Since that will likely be useful for your JSON review UI if you rebase on top of this review request, you should remember to add that here in your JSON code.

  19. Show all issues

    This test code should be removed

  20. Show all issues

    This test code should be removed

  21. Show all issues

    This test code should be removed

  22. Show all issues

    This test code should be removed

  23. Show all issues

    The docstring should be modified to include the 'renderType' parameter since you are using it

  24. Show all issues

    This should be removed

  25. Show all issues

    This test code should be removed

  26. Show all issues

    This test code should be removed

  27. Show all issues

    This test code should be removed

  28. Show all issues

    This test code should be removed

  29. Show all issues

    This test code should be removed

  30. Show all issues

    This test code should be removed

  31. Show all issues

    This test code should be removed

  32. Show all issues

    This test code should be removed

  33. Show all issues

    This test code should be removed

  34. Show all issues

    This test code should be removed

  35. Show all issues

    This test code should be removed

  36. Show all issues

    This test code should be removed

  37.