Page MenuHomePhabricator

Begin lifting column layout logic out of ColumnPositionQuery
ClosedPublic

Authored by epriestley on Feb 3 2016, 5:52 PM.
Tags
None
Referenced Files
F11412282: D15174.diff
Thu, Dec 8, 5:12 AM
Unknown Object (File)
Tue, Nov 29, 8:00 PM
Unknown Object (File)
Tue, Nov 29, 8:00 PM
Unknown Object (File)
Tue, Nov 29, 8:00 PM
Unknown Object (File)
Wed, Nov 16, 6:48 AM
Unknown Object (File)
Sun, Nov 13, 4:05 PM
Unknown Object (File)
Sat, Nov 12, 7:43 PM
Unknown Object (File)
Fri, Nov 11, 1:39 PM
Subscribers
None

Details

Summary

Ref T10010. This is a precursor to D15171, which I'll eventually rebuild on top of these changes.

Currently, ColumnPositionQuery does a lot of "column layout" stuff that's very similar to the Milestone/Subproject stuff that needs to happen in D15171. The current approach there ended up splitting this layout stuff across two unrelated classes (ColumnPositionQuery + BoardViewController), neither of which is a particularly great place to do it -- the Query is too low-level, and the Controller is too high-level.

Instead, introduce a new "LayoutEngine" which does all this layout stuff. Swap two of the four places that we query this stuff over to the new engine:

  • "Project (Column)" on tasks.
  • Transaction generation when moving cards.

These sites aren't swapped by this diff, but will be by the next one:

  • Actually applying transactions.
  • Main layout for boards (this could swap easily now, but applying transactions currently relies on position writes having taken place, so it can't swap until the other one swaps).

Once everything is swapped over, I should be able to add the D15171 logic to LayoutEngine instead of BoardViewController and end up with a cleaner approach overall.

One particularly benefit is that looking at a board won't do a bunch of position writes anymore, which wasn't a big deal, but which I was a bit uneasy with.

Test Plan
  • Viewed tasks that are on boards, saw column annotations in project list.
  • Moved cards between columns on a board.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Begin lifting column layout logic out of ColumnPositionQuery.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.

(☞゚∀゚)☞

This revision is now accepted and ready to land.Feb 3 2016, 6:11 PM