[checklist] Add checklist items from a template

Review Request #7960 — Created Feb. 13, 2016 and discarded — Latest diff uploaded

Information

rb-extension-pack
master

Reviewers

Background

Previous work on the checklist allowed templates to be created, this change
finishes the ability to actually import checklist items from a template.
Please see this gif for a demonstration. Note: These changes depend on the
changes in 7248. 7248 implemented single level nesting of checklist items.

Changes

A button was added that allows the user to switch input modes between adding
a single item with text, or selecting one of the user's templates and
importing those items into the checklist for the current review request.
The templates can be created in the user account page.

In additon, before when the user would add items and the page was refreshed
the items would all of a sudden be in different locations. This change also
improves the sorting of checklist items and initial load of the items so
that the items remain in the order they were created.

Other changes:

Ignored PyCharm (.idea) folder in .gitignore.

Only manual testing was done as described below.

Switch input modes

  • Load a diff page, open the checklist.
  • Click the "Add items from a template" link.
  • The input box on the bottom should switch to a select box and add button.
  • The link should now say "Add individual items".
  • Clicking on it now should bring back the text input box.
  • The link and input modes toggle multiple times as specified above.

Load template options

  • Create a new template in the user account page.
  • Load a diff page, and open the checklist template select.
  • The new template title should be present and selectable.

Add template items

  • Open a checklist.
  • Select a template to add and click add.
  • It should add the items, with the title of the template as the parent item.
  • The items of the template should be child items nested under this parent.
  • Refresh the page, the items should still be there.
  • Try adding a combination of indivual items and multiple templates.
  • You should not be able to add the default "Select a Template" option.

Load in order

  • Have a blank checklist.
  • Add items individually, and through the template. Take note of the order of the items.
  • Refresh the page, the items should be in the same order they once were.

Regression

  • All the buttons to check, add, edit, remove, collapse, etc, should work.
  • Adding just individual items should still work.
  • Checking items within a template should work.

    Loading...