Added function to reload render options with AJAX.

Review Request #10749 — Created Oct. 9, 2019 and updated

Information

Review Board
master

Reviewers

Individual review UIs that have dynamic render options can call this function,
and optionally pass in extra query parameters to send to the endpoint.

More details can be found here

  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
Added function to reload render options with AJAX.
622063c15356c6789049d605b14a324a2620cb61 amalik2
Description From Last Updated

This also depends on the endpoint that will serve up the contents of the tables, so for now there's some …

amalik2amalik2

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 24 ['$el'] is better written in dot notation.

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

New CSS should follow this guide

brenniebrennie

You can use regular function statements here.

brenniebrennie

Leftover testing code?

brenniebrennie

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

Col: 6 Unnecessary semicolon.

reviewbotreviewbot

Col: 6 Unnecessary semicolon.

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E265 block comment should start with '# '

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E265 block comment should start with '# '

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

flake8

amalik2
Review request changed
Commits:
Summary ID Author
Added function to reload render options with AJAX.
de8ed5aeb30cd699133e15665c0b3150535cdab0 amalik2
contentReloaded TODO message
3672c0404f978dde39a7fd79baaf6fb830158dae amalik2
Added function to reload render options with AJAX.
de8ed5aeb30cd699133e15665c0b3150535cdab0 amalik2
contentReloaded TODO message
3672c0404f978dde39a7fd79baaf6fb830158dae amalik2
started on reloading comments after reloading data
2eb65bbfa849ddd375d6631fba360140be0aa553 amalik2

Checks run (2 failed)

flake8 failed.
JSHint failed.

flake8

JSHint

amalik2
amalik2
Review request changed
Summary:
WIP: Added function to reload render options with AJAX.
Added function to reload render options with AJAX.
Description:
~  

Still need to reload comments when a table gets updated

  ~

Individual review UIs that have dynamic render options can call this function,

  + and optionally pass in extra query parameters to send to the endpoint.

  +
  +

More details can be found here

Testing Done:
   
  1. Ran JavaScript unit tests.
   
  1. Tested manually to make sure that the element to update actually gets
    updated by using a mock endpoint.
  +
  1. Tested manually to make sure comments are correctly reattached after
    a request is finished.
Commits:
Summary ID Author
Added function to reload render options with AJAX.
de8ed5aeb30cd699133e15665c0b3150535cdab0 amalik2
contentReloaded TODO message
3672c0404f978dde39a7fd79baaf6fb830158dae amalik2
started on reloading comments after reloading data
2eb65bbfa849ddd375d6631fba360140be0aa553 amalik2
Added function to reload render options with AJAX.
de8ed5aeb30cd699133e15665c0b3150535cdab0 amalik2
contentReloaded TODO message
3672c0404f978dde39a7fd79baaf6fb830158dae amalik2
started on reloading comments after reloading data
2eb65bbfa849ddd375d6631fba360140be0aa553 amalik2
fixed refreshing comments after table reloads
9149bc199a9f35044bd9b22ac54ac61382ca0542 amalik2
refactored refresh
fb65d69fc2aff7dc97af9eec073d7d0c765adbfd amalik2

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

amalik2
  1. 
      
  2. Show all issues

    This also depends on the endpoint that will serve up the contents of the tables, so for now there's some code here for testing purposes that I'll remove later

  3. 
      
amalik2
Review request changed
Commits:
Summary ID Author
Added function to reload render options with AJAX.
de8ed5aeb30cd699133e15665c0b3150535cdab0 amalik2
contentReloaded TODO message
3672c0404f978dde39a7fd79baaf6fb830158dae amalik2
started on reloading comments after reloading data
2eb65bbfa849ddd375d6631fba360140be0aa553 amalik2
fixed refreshing comments after table reloads
9149bc199a9f35044bd9b22ac54ac61382ca0542 amalik2
refactored refresh
fb65d69fc2aff7dc97af9eec073d7d0c765adbfd amalik2
Added function to reload render options with AJAX.
de8ed5aeb30cd699133e15665c0b3150535cdab0 amalik2
contentReloaded TODO message
3672c0404f978dde39a7fd79baaf6fb830158dae amalik2
started on reloading comments after reloading data
2eb65bbfa849ddd375d6631fba360140be0aa553 amalik2
fixed refreshing comments after table reloads
9149bc199a9f35044bd9b22ac54ac61382ca0542 amalik2
refactored refresh
fb65d69fc2aff7dc97af9eec073d7d0c765adbfd amalik2
fixed div not being disabled
d688e87cf14065ca3cef0696450ea18ae0e8b997 amalik2

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

brennie
  1. 
      
  2. reviewboard/static/rb/css/common.less (Diff revision 4)
     
     
    Show all issues

    New CSS should follow this guide

    1. I think this is resolved now

  3. reviewboard/static/rb/js/views/tests/textBasedReviewableViewTests.es6.js (Diff revision 4)
     
     
     
     
     
     
     
     
     
     
     
    Show all issues

    You can use regular function statements here.

  4. Show all issues

    Leftover testing code?

    1. Yes, I'm not sure what endpoint I'm supposed to hit right now

  5. 
      
amalik2
Review request changed
Commits:
Summary ID Author
Added function to reload render options with AJAX.
de8ed5aeb30cd699133e15665c0b3150535cdab0 amalik2
contentReloaded TODO message
3672c0404f978dde39a7fd79baaf6fb830158dae amalik2
started on reloading comments after reloading data
2eb65bbfa849ddd375d6631fba360140be0aa553 amalik2
fixed refreshing comments after table reloads
9149bc199a9f35044bd9b22ac54ac61382ca0542 amalik2
refactored refresh
fb65d69fc2aff7dc97af9eec073d7d0c765adbfd amalik2
fixed div not being disabled
d688e87cf14065ca3cef0696450ea18ae0e8b997 amalik2
Added function to reload render options with AJAX.
de8ed5aeb30cd699133e15665c0b3150535cdab0 amalik2
contentReloaded TODO message
3672c0404f978dde39a7fd79baaf6fb830158dae amalik2
started on reloading comments after reloading data
2eb65bbfa849ddd375d6631fba360140be0aa553 amalik2
fixed refreshing comments after table reloads
9149bc199a9f35044bd9b22ac54ac61382ca0542 amalik2
refactored refresh
fb65d69fc2aff7dc97af9eec073d7d0c765adbfd amalik2
fixed div not being disabled
d688e87cf14065ca3cef0696450ea18ae0e8b997 amalik2
addressed comments on review request
efb9fa409083f274c6567fb5e6ad5af5fe0f9236 amalik2

Checks run (2 failed)

flake8 failed.
JSHint failed.

flake8

JSHint

amalik2
Review request changed
Commits:
Summary ID Author
Added function to reload render options with AJAX.
de8ed5aeb30cd699133e15665c0b3150535cdab0 amalik2
contentReloaded TODO message
3672c0404f978dde39a7fd79baaf6fb830158dae amalik2
started on reloading comments after reloading data
2eb65bbfa849ddd375d6631fba360140be0aa553 amalik2
fixed refreshing comments after table reloads
9149bc199a9f35044bd9b22ac54ac61382ca0542 amalik2
refactored refresh
fb65d69fc2aff7dc97af9eec073d7d0c765adbfd amalik2
fixed div not being disabled
d688e87cf14065ca3cef0696450ea18ae0e8b997 amalik2
addressed comments on review request
efb9fa409083f274c6567fb5e6ad5af5fe0f9236 amalik2
Added function to reload render options with AJAX.
519bb71474bf32be0d0cc31e15aed8cb312e24ba amalik2

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

amalik2
Review request changed
Commits:
Summary ID Author
Added function to reload render options with AJAX.
519bb71474bf32be0d0cc31e15aed8cb312e24ba amalik2
Added function to reload render options with AJAX.
ed125289f5e7224a7f2ed6ecd47a4d1feba34190 amalik2

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

amalik2
Review request changed
Commits:
Summary ID Author
Added function to reload render options with AJAX.
ed125289f5e7224a7f2ed6ecd47a4d1feba34190 amalik2
Added function to reload render options with AJAX.
622063c15356c6789049d605b14a324a2620cb61 amalik2

Checks run (2 succeeded)

flake8 passed.
JSHint passed.