Page MenuHomePhabricator

Begin lifting column layout logic out of ColumnPositionQuery

Authored by epriestley on Feb 3 2016, 5:52 PM.
Referenced Files
F11144604: D15174.diff
Fri, Sep 23, 8:32 PM
Unknown Object (File)
Fri, Sep 16, 9:15 PM
Unknown Object (File)
Mon, Sep 12, 11:13 AM
Unknown Object (File)
Fri, Sep 9, 12:06 PM
Unknown Object (File)
Fri, Sep 2, 3:36 AM
Unknown Object (File)
Aug 12 2022, 11:58 PM
Unknown Object (File)
Aug 10 2022, 12:01 PM
Unknown Object (File)
Aug 7 2022, 9:33 PM



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

rP Phabricator
Lint Not Applicable
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