HomePhabricator

Separate workboard view state (ordering, filtering, hidden columns) from the…

Description

Separate workboard view state (ordering, filtering, hidden columns) from the View controller

Summary:
Depends on D20627. Ref T4900. If a user orders a board by "Sort by Title", then toggles the visibility of hidden columns, we want to keep the board sorted by title. To accomplish this, we pass the board state around to all the workflows here.

Pull the "bag of state properties" code out of the View controller. This class basically:

  • reads state from a request (order, hidden, filter);
  • manages defaults;
  • provides the application with the current settings; and
  • generates URIs with "?order=X&hidden=Y&filter=Z" to preserve state.

This is still a little questionable/transitional since some of the controllers need more cleanup.

Test Plan:
Toggled state, order, filters, clicked around various workflows and saw the filters preserved.

A lot of these workflows are pretty serious edge cases. For example, here's a feature this implements:

  • Changed workboard order to "Title".
  • Selected "Bulk Edit Tasks..." in an empty column and command-clicked it to open the link in a new window.
  • Hovered over "Cancel".
  • Saw the link properly generate with "?order=title", preserving the order.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T4900

Differential Revision: https://secure.phabricator.com/D20628