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

Room List Store: Filter rooms by active space #29399

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

MidhunSureshR
Copy link
Member

@MidhunSureshR MidhunSureshR commented Mar 3, 2025

  • Each room node in the skip list has a property that tells you if that node belongs to the currently active space.
  • We redo this calculation for all room nodes whenever active space changes.
  • We redo this calculation for a single room when it gets an update and is re-inserted into the skip list.
  • A list of sorted rooms that belong to the active space is made available through a custom iterator that skips over any nodes that are not in the active space.

Ideally the room list store would give more information about spaces (and the ability to filter by arbitrary spaces) but this should be sufficient for the time being.

* Returns a promise that resolves when the space store is ready.
* This happens after an initial hierarchy of spaces and rooms has been computed.
*/
public get isReady(): Promise<void> {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is to prevent the room list store from calling methods on the space store before the space store has computed an initial space hierarchy.

Otherwise, the room list store will get incorrect information about
spaces and thus will produce an incorrect roomlist.
Implement a way to filter by active space
@MidhunSureshR MidhunSureshR force-pushed the midhun/rls/filter-by-space branch from c40acd7 to 81ea160 Compare March 3, 2025 15:30
@MidhunSureshR MidhunSureshR marked this pull request as ready for review March 3, 2025 15:31
@MidhunSureshR MidhunSureshR requested a review from a team as a code owner March 3, 2025 15:31
* Returns a promise that resolves when the space store is ready.
* This happens after an initial hierarchy of spaces and rooms has been computed.
*/
public get isReady(): Promise<void> {
Copy link
Member

Choose a reason for hiding this comment

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

isReady sounds like it returns a boolean, the naming does not describe a promise which resolves when ready, could you pick a better name?

Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

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

Looks sane otherwise

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

Successfully merging this pull request may close these issues.

2 participants