Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Room Order & Subspace Categorization #1326

Open
North-West-Wind opened this issue Sep 10, 2024 · 1 comment
Open

feat: Room Order & Subspace Categorization #1326

North-West-Wind opened this issue Sep 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@North-West-Wind
Copy link

Feature Description

As described in the Matrix specification, rooms can be ordered using the order property in m.space.child event, which is already part of SpaceChild in Matrix Dart SDK. Therefore, we can sort the rooms in lib/pages/chat_list/space_view.dart.

In addition to room ordering, I also want a way to display subspaces as categories.

Rationale

As mentioned, ordering is already part of the Matrix specification. It would be nice to stay consistent with other clients.

Categorization of subspaces would be useful for category-based room organization like Discord. This is extremely useful for spaces created by Matrix Discord bridges.

Mockup

I have already implemented them in #1323. Regardless, here are the mockups actual screenshots.

Normal sorting (no room priority):
image

Rooms on top:
image

Categorized:
image

Space display option menu:
image

Additional Context

This is a rewrite of #1155, to include additional features and mockups.

The categorization feature is inspired by Cinny. In this screenshot, "MAIN", "SPLATOON" and "OTHER STUFF" are subspaces.

Cinny screenshot

@North-West-Wind North-West-Wind added the enhancement New feature or request label Sep 10, 2024
@North-West-Wind North-West-Wind changed the title Room Order & Subspace Categorization feat: Room Order & Subspace Categorization Sep 10, 2024
@North-West-Wind
Copy link
Author

North-West-Wind commented Sep 14, 2024

And I guess I'll explain the low-level mockup modifications as well.

This mainly involves modifying the joinedRooms and SliverList.builder in lib/pages/chat_list/space_view.dart. Instead of using room.client.rooms.where to filter the rooms in the space, I pair each room.spaceChildren with their corresponding room from room.client.rooms and sort it according to the Matrix spec using SpaceChild#order.

For categorization, rooms within a space are first separated into chat rooms and subspaces. For each subspace, I use a modified ChatListItem called ChatListSpaceItem that includes an ExpansionTile with a ListView.builder similar to how the SliverList is built in space_view.dart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant