element-hq / element-hq/element-x-android
Implement Room Sorting Within Spaces
- Dominant language
- Kotlin
- Stars
- 2.4k
- Forks
- 624
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 149
Description
### Your use case
#### What would you like to do?
Add an option (to the 3 dot menu or elsewhere) to change how the rooms within a space are sorted.
While rooms and DMs in the Chats tab seem to be sorted by latest activity, rooms within the _Space_ tab don't seem to be sorted in any discernible order at all. And whatever logic Element is using to sort them is not editable.
In the screenshot below, for example, the rooms are definitely not alphabetical, and top to bottom at the time of capture, the last activity was as follows:
Today
Yesterday at 4am
11 days ago
Yesterday at 5pm
4 days ago
(to be clear, this is not the space for my org, just an example)
So it isn't sorted by latest either. Regardless of what logic it _is_ using, we need to be able to enforce our own. Element Classic had Latest and A-Z. Those seem perfectly sensible to implement here as well.
#### Why would you like to do it?
Consistent room ordering is important to my organization, and right now the rooms are just a jumble, which makes it hard to find what you need. Meanwhile on the element desktop client, since our rooms have numerical prefixes, they can be sorted A-Z to put important rooms (announcements for example) at the top every time.
#### How would you like to achieve it?
Implement a simple A-Z or Latest sort option just like Classic has.
### Have you considered any alternatives?
I could use Classic or Desktop. Which is what I will do, and what I've been recommending our users do until X has an option for this.
### Additional context
_No response_
### Are you willing to provide a PR?
No
Contributor guide
Research direction
Start by tracing how rooms are displayed and ordered in the Space tab, then compare the requested A-Z and Latest choices with the sorting behavior described for Element Classic. Determine where a user-facing sort option could fit, such as the three-dot menu. Done means users can choose A-Z or Latest ordering for rooms within a space and the selected ordering is applied consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100