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)
Mon, Nov 11, 5:08 AM
Unknown Object (File)
Tue, Nov 5, 11:50 PM
Unknown Object (File)
Sun, Nov 3, 9:36 PM
Unknown Object (File)
Thu, Oct 31, 6:35 AM
Unknown Object (File)
Oct 16 2024, 9:49 PM
Unknown Object (File)
Oct 16 2024, 9:27 PM
Unknown Object (File)
Oct 15 2024, 5:48 PM
Unknown Object (File)
Oct 13 2024, 9:00 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
Branch
grip2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 22244
Build 30413: Run Core Tests
Build 30412: arc lint + arc unit

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.