Page MenuHomePhabricator

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

Authored by epriestley on Mar 10 2019, 4:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 19, 8:55 AM
Unknown Object (File)
Fri, Apr 19, 3:03 AM
Unknown Object (File)
Wed, Apr 17, 3:11 PM
Unknown Object (File)
Tue, Apr 16, 10:18 AM
Unknown Object (File)
Thu, Apr 11, 7:19 AM
Unknown Object (File)
Sat, Mar 30, 7:38 AM
Unknown Object (File)
Fri, Mar 29, 9:53 PM
Unknown Object (File)
Sun, Mar 24, 11:20 AM
Subscribers
None

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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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).

  • Fix a bug with dragging between columns on a priority-sorted board.
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.