Add smarter objects selector widget into Djblets.

Review Request #10214 — Created Oct. 10, 2018 and updated

skaefer143
Djblets
master
10215
f2eb684...
djblets, students

This change adds a smarter objects selector widget from Review Board 4.0
into Djblets. This is a form field widget and Backbone view, which must
be extended to be useful.

See /r/10215.

I ran all tests with ./tests/runtests.py. No errors were thrown.

With the /r/10215 Review Board patch, I navigated to
admin/db/scmtools/repository/add/. Next to "Users with access:", the
smarter user selector widget appeared. This widget extends the smarter
objects selector widget.

  • 0
  • 0
  • 6
  • 0
  • 6
Description From Last Updated
brennie
  1. 
      
  2. djblets/forms/widgets.py (Diff revision 1)
     
     
     

    Blank line between these.

  3. djblets/forms/widgets.py (Diff revision 1)
     
     

    This is used inside of Django to extract the value from the data and files dictionaries based on the name of the field (name).

    See the docs.

  4. 
      
brennie
  1. 
      
  2. djblets/forms/widgets.py (Diff revision 1)
     
     

    You need to move this template into Djblets as well. If anyone were to use this outside of Review Board, they would get a template not found error.

  3. 
      
skaefer143
Review request changed

Change Summary:

I moved the JS Widgets into Djblets, and added a new initialization argument called using_avatars. This is because we can't assume in Djblets that the widget is using an avatar service.
I think this works for moving templates and JS files into Djblets, but let me know if I'm wrong.

Commit:

-a14bf9f21bfea84a84f52667c1081f2c3b6afead
+250c8898785a7c90a6067e09db05573a4873e8a1

Diff:

Revision 2 (+560)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

skaefer143
skaefer143
skaefer143
skaefer143
brennie
  1. 
      
  2. This needs to be Djblets. not RB..

  3. 
      
skaefer143
Review request changed

Change Summary:

Defines the RelatedObjectSelectorView with Djblets., not RB..

Commit:

-a18614f119e87dd9f19b7f558e1b79663d955103
+f2eb68434da59308852eb2b31f3731da5e0264c1

Diff:

Revision 6 (+376 -1)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
Loading...