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
Unknown Object (File)
Thu, Apr 18, 8:36 PM
Unknown Object (File)
Thu, Apr 11, 7:02 PM
Unknown Object (File)
Thu, Apr 11, 8:25 AM
Unknown Object (File)
Fri, Mar 29, 12:41 AM
Unknown Object (File)
Thu, Mar 28, 11:09 PM
Unknown Object (File)
Thu, Mar 28, 4:49 PM
Unknown Object (File)
Feb 20 2024, 1:05 PM
Unknown Object (File)
Feb 20 2024, 1:05 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