Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

fix membership list ordering when presence is disabled. #1924

Merged
merged 1 commit into from
May 24, 2018

Conversation

ara4n
Copy link
Member

@ara4n ara4n commented May 24, 2018

Fixes element-hq/element-web#6643.

@lampholder we really need to find a way for P1 regressions to not hang around open for 23 days (for a regression introduced 66 days ago), especially when it's a oneliner to fix...

@ara4n ara4n changed the title fix https://github.com/vector-im/riot-web/issues/6643 fix membership list ordering May 24, 2018
@lukebarnard1
Copy link
Contributor

@lampholder we really need to find a way for P1 regressions to...

This isn't really pertinent to this particular PR/issue.

@@ -270,7 +270,7 @@ module.exports = React.createClass({

// console.log("comparing " + this.memberString(memberA) + " and " + this.memberString(memberB));

if (userA.currentlyActive && userB.currentlyActive) {
if ((userA.currentlyActive && userB.currentlyActive) || !this._showPresence) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// order by last active, with "active now" first.
// ...and then by power
// ...and then alphabetically.

Why don't we just order by power first instead of special casing?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think because the desired behaviour is that online users should still come first if presence is enabled.

Copy link
Member Author

@ara4n ara4n May 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intended behaviour of the list is to order first by online state, then by power (so offline mods don't clutter up the top of the list). Changing that UX is an entirely separate issue and irrelevant to this PR. This PR is just trying to fix the regression to return to the intended behaviour.

The regression here was that we were ordering by invisible(!) and invalid(!) online state if presence is disabled, which results in an incorrect ordering as per element-hq/element-web#6643, hence this fix.

@ara4n ara4n changed the title fix membership list ordering fix membership list ordering when presence is disabled. May 24, 2018
@ara4n ara4n merged commit 3bee23e into develop May 24, 2018
@ara4n
Copy link
Member Author

ara4n commented May 24, 2018

@lukebarnard1 as a team we are failing to prioritise fixing regressions, hence me highlighting this one with @lampholder so he and I can discuss it and use it as a microcosm of the problem, even if that meta-discussion is technically off-topic for this specific PR.

I would hope it is clear that the bigger goal of improving the overall quality of our work takes priority over pedantry over pertinence of GH comments.

@lukebarnard1
Copy link
Contributor

pedantry over pertinence of GH comments.

To me it was just noisy. I don't see an advantage of mentioning it here. I absolutely agree that we should discuss the overall quality of our work but it doesn't belong on a random PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

member list no longer orders by power level
3 participants