Add front-end support for inline forms and the change form in the admin UI.

Review Request #10826 — Created Jan. 15, 2020 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

The administration UI's Change Form, which is responsible for adding or
modifying objects in the database, is complex and has a lot of custom
JavaScript that can be fragile when we update our version of Django and
can interact poorly with our own logic and styling.

This change introduces the beginning of a view for managing the Change
Form, which currently just sets up the biggest part of this change, the
new Inline Forms classes.

Inline Forms are a Django admin UI concept that makes it easy to add or
modify related objects all in the same Change Form page.

This change provides custom code for managing these forms, allowing us
to control any initialization of form elements, maintain styles that
won't conflict with other parts of the page (unlike current inline
support), and check for regressions through unit tests.

This is a big chunk of the client-side work for this page, which is why
we're starting here. Upcoming changes will improve upon the styling and
component structure of the page.

JavaScript unit tests pass.

Tested the inline forms on several different models, verifying that
adding and removing work as expected and that state on the forms are
correct.

Changes between revision 1 and 2

orig
1
2

Commits

Summary ID Author
Add front-end support for inline forms and the change form in the admin UI.
The administration UI's Change Form, which is responsible for adding or modifying objects in the database, is complex and has a lot of custom JavaScript that can be fragile when we update our version of Django and can interact poorly with our own logic and styling. This change introduces the beginning of a view for managing the Change Form, which currently just sets up the biggest part of this change, the new Inline Forms classes. Inline Forms are a Django admin UI concept that makes it easy to add or modify related objects all in the same Change Form page. This change provides custom code for managing these forms, allowing us to control any initialization of form elements, maintain styles that won't conflict with other parts of the page (unlike current inline support), and check for regressions through unit tests. This is a big chunk of the client-side work for this page, which is why we're starting here. Upcoming changes will improve upon the styling and component structure of the page.
34801f3ccc331b261ce09997c8732bbdc5f7cd45 Christian Hammond
Add front-end support for inline forms and the change form in the admin UI.
The administration UI's Change Form, which is responsible for adding or modifying objects in the database, is complex and has a lot of custom JavaScript that can be fragile when we update our version of Django and can interact poorly with our own logic and styling. This change introduces the beginning of a view for managing the Change Form, which currently just sets up the biggest part of this change, the new Inline Forms classes. Inline Forms are a Django admin UI concept that makes it easy to add or modify related objects all in the same Change Form page. This change provides custom code for managing these forms, allowing us to control any initialization of form elements, maintain styles that won't conflict with other parts of the page (unlike current inline support), and check for regressions through unit tests. This is a big chunk of the client-side work for this page, which is why we're starting here. Upcoming changes will improve upon the styling and component structure of the page.
ecbdb85fd60eb6305a263fa9a586b88eaad537e5 Christian Hammond
reviewboard/static/rb/js/admin/views/changeFormPageView.es6.js
reviewboard/static/rb/js/admin/views/inlineFormGroupView.es6.js
Loading...