Page MenuHomePhabricator

On Workboards, sort groups by "natural order", not subpriority
ClosedPublic

Authored by epriestley on Mar 10 2019, 4:22 PM.

Details

Summary

Depends on D20263. Ref T10333. I want to add groups like "Assignee" to workboards. This means you may have several tasks grouped under, say, "Alice".

When you drag the bottom-most task under "Alice" to the top, what does that mean?

Today, the only grouping is "Priority", and it means "change the task's secret/hidden global subpriority". However, this seems to generally be a somewhat-bad answer, and is quite complex. It also doesn't make much sense for an author grouping, since one task can't really be "more assigned" to Alice than another task.

Users likely intend this operation to mean "move it, visually, with no other effects" -- that is, user intent is to shuffle sticky notes around on a board, not edit anything substantive. The meaning is probably something like "this is similar to other nearby tasks" or "maybe this is a good place to start", which we can't really capture with any top-level attribute.

We could extend "subpriority" and give tasks a secret/hidden "sub-assignment strength" and so on, but this seems like a bad road to walk down. We'll also run into trouble later when subproject columns may appear on the board, and a user could want to put a task in different positions on different subprojects, conceivably.

In the "Natural" order view, we already have what is probably a generally better approach for this: a task display order particular to the column, that just remembers where you put the sticky notes.

Move away from "subpriority", and toward a world where we mostly keep sticky notes where you stuck them and move them around only when we have to. With no grouping, we still sort by "natural" order, as before. With priority grouping, we now sort by <priority, natural>. When you drag stuff around inside a priority group, we update the natural order.

This means that moving cards around on a "priority" board will also move them around on a "natural" board, at least somewhat. I think this is okay. If it's not intuitive, we could give every ordering its own separate "natural" view, so we remember where you stuck stuff on the "priority" board but that doesn't affect the "Natural" board. But I suspect we won't need to.

Test Plan
  • Viewed and dragged a natural board.
  • Viewed and dragged a priority board.
  • Dragged within and between groups of 0, 1, and multiple items.

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Mar 10 2019, 4:22 PM
epriestley requested review of this revision.Mar 10 2019, 4:23 PM
epriestley added inline comments.Mar 11 2019, 12:27 AM
src/applications/project/controller/PhabricatorProjectBoardViewController.php
525–531

We always sort cards on the client, so we don't need this (not entirely sure if we ever did).

epriestley updated this revision to Diff 48381.Mar 11 2019, 3:10 AM
  • Fix a bug with dragging between columns on a priority-sorted board.
amckinley accepted this revision.Mar 12 2019, 6:48 PM
This revision is now accepted and ready to land.Mar 12 2019, 6:48 PM
This revision was automatically updated to reflect the committed changes.