Add smarter objects selector widget into Djblets
Review Request #10214 — Created Oct. 10, 2018 and submitted
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.
Description | From | Last Updated |
---|---|---|
Remove period from Summary. |
gojeffcho | |
Blank line between these. |
brennie | |
You need to move this template into Djblets as well. If anyone were to use this outside of Review Board, … |
brennie | |
E501 line too long (84 > 79 characters) |
reviewbot | |
E303 too many blank lines (2) |
reviewbot | |
E122 continuation line missing indentation or outdented |
reviewbot | |
This needs to be Djblets. not RB.. |
brennie | |
"This is to be used" sounds a bit awkward - if it must be used, I would specify that, or … |
gojeffcho | |
This comment is really confusing to me, especially the part that says "but the siteconfig field template special cases when … |
shoven | |
.related-object-selector might be a more clear class name (since it's for the relatedObjectSelectorView)? |
shoven | |
Could also use _.each($items, function($item) {...}); or $items.forEach(function($item) {...}); rather than a for loop (I typically subscribe to airbnb's Javascript … |
shoven | |
Typo: initalize --> initialize |
ilaw | |
Capitalization is off here. "size" should be lower case, and "Related" should be upper. |
david | |
Col: 38 Expected '{' and instead saw 'return'. |
reviewbot | |
Col: 25 Expected '{' and instead saw 'return'. |
reviewbot | |
Col: 29 Expected '{' and instead saw 'return'. |
reviewbot | |
Col: 28 Expected '{' and instead saw 'score'. |
reviewbot | |
Col: 37 Expected '{' and instead saw 'return'. |
reviewbot | |
Col: 36 Expected '{' and instead saw 'return'. |
reviewbot | |
Col: 32 'a_value' is defined but never used. |
reviewbot | |
Col: 41 'b_value' is defined but never used. |
reviewbot | |
Col: 33 Expected '{' and instead saw 'return'. |
reviewbot | |
Col: 40 Expected '{' and instead saw 'return'. |
reviewbot | |
Col: 56 Expected '{' and instead saw 'options'. |
reviewbot | |
Col: 52 Expected '{' and instead saw 'options'. |
reviewbot | |
Col: 64 Expected '{' and instead saw 'options'. |
reviewbot | |
Col: 26 'value' is defined but never used. |
reviewbot | |
Col: 48 'calculateScore' is defined but never used. |
reviewbot | |
Col: 22 Expected '{' and instead saw 'search'. |
reviewbot | |
Col: 9 'cmp' was used before it was defined. |
reviewbot | |
Col: 20 Expected '{' and instead saw 'return'. |
reviewbot | |
Col: 20 Expected '{' and instead saw 'return'. |
reviewbot | |
Col: 9 'extend' was used before it was defined. |
reviewbot | |
Col: 26 Expected '{' and instead saw 'continue'. |
reviewbot | |
Col: 9 'trim' was used before it was defined. |
reviewbot | |
Col: 9 'escape_regex' was used before it was defined. |
reviewbot | |
Col: 9 'is_array' was used before it was defined. |
reviewbot | |
Col: 9 'DIACRITICS' was used before it was defined. |
reviewbot | |
Col: 9 'asciifold' was used before it was defined. |
reviewbot | |
Col: 9 'utils' was used before it was defined. |
reviewbot | |
Col: 25 'endbit' is defined but never used. |
reviewbot | |
Col: 13 'key' is defined but never used. |
reviewbot | |
Col: 17 'timeout_blur' is defined but never used. |
reviewbot |
- 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:
-
a14bf9f21bfea84a84f52667c1081f2c3b6afead250c8898785a7c90a6067e09db05573a4873e8a1
- Change Summary:
-
Fixed some style issues.
- Commit:
-
250c8898785a7c90a6067e09db05573a4873e8a17a98d1c8363c8cf2b122b472e3acafd6e1cd04a2
Checks run (2 succeeded)
- Change Summary:
-
Moved
relatedUserWidget
and relevant files back into Review Board repository. There are problems with the order the JS files are run, though, so widget will not currently render. - Description:
-
[WIP] Add smarter objects selector widget into Djblets.
This change adds a smarter objects selector widget from
~ Review Board 4.0 into Djblets. ~ Review Board 4.0 into Djblets. See /r/10215. - Commit:
-
7a98d1c8363c8cf2b122b472e3acafd6e1cd04a20b7202b89ca5f26a2164f5a11ae523f961f02ebc
Checks run (2 succeeded)
- Change Summary:
-
Widget now displays correctly by changing the name in
staticbundles.py
. - Summary:
-
[WIP] Add smarter objects selector widget into Djblets.Add smarter objects selector widget into Djblets.
- Description:
-
- [WIP] Add smarter objects selector widget into Djblets.
- This change adds a smarter objects selector widget from
~ Review Board 4.0 into Djblets. See /r/10215. ~ Review Board 4.0 into Djblets. This is a general widget + and Backbone view, which must be extended to be useful. + + See /r/10215.
- Testing Done:
-
~ [Work in Progress]
~ I ran all tests with ./tests/runtests.py
. No errors were thrown.~ 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. - Commit:
-
0b7202b89ca5f26a2164f5a11ae523f961f02ebca18614f119e87dd9f19b7f558e1b79663d955103
Checks run (2 succeeded)
- Description:
-
~ This change adds a smarter objects selector widget from
~ Review Board 4.0 into Djblets. This is a general widget ~ and Backbone view, which must be extended to be useful. ~ 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.
- Change Summary:
-
Defines the RelatedObjectSelectorView with
Djblets.
, notRB.
. - Commit:
-
a18614f119e87dd9f19b7f558e1b79663d955103f2eb68434da59308852eb2b31f3731da5e0264c1
Checks run (2 succeeded)
- Commit:
-
f2eb68434da59308852eb2b31f3731da5e0264c15440d0efede1158efcba185d70b0147decebefb7
Checks run (2 succeeded)
-
-
This comment is really confusing to me, especially the part that says "but the siteconfig field template special cases when
is_hidden
is True" (it seems like it's missing a verb perhaps?). If you could reword this comment a bit to make it a bit more clear that would be great! -
.related-object-selector
might be a more clear class name (since it's for therelatedObjectSelectorView
)? -
Could also use
_.each($items, function($item) {...});
or$items.forEach(function($item) {...});
rather than a for loop (I typically subscribe to airbnb's Javascript guidelines which recommends something like this over for loops but maybe a mentor can weigh in on their preference for Javascript style).
- Change Summary:
-
Fixed some comments, as well as changed some html classes to be more descriptive.
- Summary:
-
Add smarter objects selector widget into Djblets.Add smarter objects selector widget into Djblets
- Commit:
-
5440d0efede1158efcba185d70b0147decebefb79ab8887e7ced52b29be4b9d763babd2aeb43689e
Checks run (2 succeeded)
- Change Summary:
-
Fix some comment grammar.
- Commit:
-
9ab8887e7ced52b29be4b9d763babd2aeb43689e391c5cd2b4c6652da2aa3ed2a13e79d861482dca
Checks run (2 succeeded)
- Change Summary:
-
fix the placeholder widget string from being cut off by selectize
- Commit:
-
391c5cd2b4c6652da2aa3ed2a13e79d861482dca90464dea73be37de19dd8df0ba0358183a33d301
Checks run (2 succeeded)
- Change Summary:
-
move selectize.js out of reviewboard, into djblets.
- Commit:
-
90464dea73be37de19dd8df0ba0358183a33d30125eac0de866363b0725ee91d1a5d923a3f7f0c5a
- Diff:
-
Revision 11 (+4442)
Checks run (1 failed, 1 succeeded)
JSHint
-
Warning: Showing 30 of 51 failures.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-