matrix-react-sdk
matrix-react-sdk copied to clipboard
Spaces.includeSubSpaceRoomsInRoomList settings
Adds a setting to allow only showing direct children of a space in the room list:

Here's what your changelog entry will look like:
✨ Features
- Spaces.includeSubSpaceRoomsInRoomList settings (#7682). Contributed by @kerryarchibald.
Preview: https://pr7682--matrix-react-sdk.netlify.app ⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.
@t3chguy Is it the amount of state tracked to check for changes in onStoreUpdate that concerns you?
Adding hierarchical space filters seems like adding quite a lot of complexity for a relatively small win. Maintenance of both direct and indirect child lists in SpaceStore is still needed as isRoomInSpace depends on the indirect child list and is used pretty widely. It also complexifies the application of space settings - should the active spaces settings be applied down the hierarchy?
@t3chguy Is it the amount of state tracked to check for changes in
onStoreUpdatethat concerns you? Adding hierarchical space filters seems like adding quite a lot of complexity for a relatively small win. Maintenance of both direct and indirect child lists inSpaceStoreis still needed asisRoomInSpacedepends on the indirect child list and is used pretty widely. It also complexifies the application of space settings - should the active spaces settings be applied down the hierarchy?
The thing that concerns me is the very minute differences between the various fields, which would go away if things were done hierarchically, like how this new field is indirect children except doesn't concern itself with metaspaces, etc.
How does this interact with notification badges? If you set it to false then will the notifications badge still aggregate counts of grand*-child rooms?
If it does continue aggregating then this will be confusing, as you click the space with a Red (8) and find no rooms which match that expectation, then you click the (8) itself and it takes you to a room in a different view (subspace). If it doesn't then you may miss notifications due to the subspace not being visible with the panel collapsed, so this may require some finesse.
@t3chguy this one is back for more review :-) Hierarchical space filters hit a major snag on cycles being allowed in space hierarchy. Shelving that for now to get this feature over the line.
**Ignore this, need to test notification states
Hierarchical space filters hit a major snag on cycles being allowed in space hierarchy. Shelving that for now to get this feature over the line.
Sure, the typical approach we take is maintaining and passing around a parentPath Set to prevent hitting upon such a cycle, would be nice if you could stick up what you have into a draft PR so someone else might continue it if you can't :)
Notification states when sub space rooms are hidden are a bit strange. I don't use any other messaging tools with the level of nesting that Element allows so I'm not sure what behaviour is usual. @nadonomy what do you think?
https://user-images.githubusercontent.com/3055605/154673154-d29de9de-90c3-4c5c-adec-b0622e177e4b.mov
Expanding the space panel is ok, but makes it at least 3 clicks to find your unread room.

Compared to probably 2 clicks in the current room list:

This PR fixes https://github.com/vector-im/element-meta/issues/418
Seems like a really niche feature add! What are the odds that this still gets merged?
My active subspace rooms flood the space rooms and I can't find them without searching for them...