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
Unknown Object (File)
Thu, Apr 25, 12:41 AM
Unknown Object (File)
Thu, Apr 11, 6:50 PM
Unknown Object (File)
Thu, Apr 11, 5:53 AM
Unknown Object (File)
Thu, Apr 11, 2:42 AM
Unknown Object (File)
Mon, Apr 8, 7:22 PM
Unknown Object (File)
Mar 18 2024, 3:36 AM
Unknown Object (File)
Feb 27 2024, 8:21 AM
Unknown Object (File)
Feb 4 2024, 5:10 PM
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.