Page MenuHomePhabricator

Conpherence - sort participant list in main conpherence with an actual algorithm
ClosedPublic

Authored by btrahan on Apr 6 2015, 4:41 PM.
Tags
None
Referenced Files
F14057936: D12302.diff
Sun, Nov 17, 8:12 AM
F14024912: D12302.id29537.diff
Thu, Nov 7, 1:17 PM
F14006319: D12302.id.diff
Mon, Oct 28, 6:15 AM
F14005993: D12302.id29537.diff
Sun, Oct 27, 11:06 PM
F13987474: D12302.diff
Mon, Oct 21, 9:40 AM
F13987465: D12302.id.diff
Mon, Oct 21, 9:37 AM
F13987463: D12302.id29535.diff
Mon, Oct 21, 9:36 AM
F13987457: D12302.id29536.diff
Mon, Oct 21, 9:34 AM
Subscribers

Details

Summary

Fixes T7765. The existing sort was based on when people were added to the conpherence and basically feels random in time. Instead, sort current logged in user to the top and make the rest of the list alphabetical.

Test Plan

viewed a conpherenece and noted my logged in user at top and the rest was sorted alphabetically
viewed a room that i was not a participant in and participant list rendered correctly

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

btrahan retitled this revision from to Conpherence - sort participant list in main conpherence with an actual algorithm.
btrahan updated this object.
btrahan edited the test plan for this revision. (Show Details)
btrahan added a reviewer: epriestley.
src/applications/conpherence/view/ConpherencePeopleWidgetView.php
12–17

Not sure if this is too gross versus a custom comparator.

You can also write that like, e.g.:

$head_handles = array_select_keys($handles, array($user_phid));
$handles = $head_handles + $handles;
epriestley edited edge metadata.

In particular, you don't need the unset() and never use $user_handle.

This revision is now accepted and ready to land.Apr 6 2015, 4:47 PM
btrahan edited edge metadata.

slap the user to the front of the list with maximum elegance

This revision was automatically updated to reflect the committed changes.