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

Support prioritized room list filters #4737

Merged
merged 2 commits into from
Jun 9, 2020

Conversation

turt2live
Copy link
Member

For element-hq/element-web#13635

This is to fix an issue where when using both the community filter panel and the search box it's an AND rather than further refining the results.

This makes the search box further refine the community filter panel results.

Screenshot proof (ignore the ugly CSS - that's not important here):
image

turt2live added 2 commits June 8, 2020 21:38
This is to fix an issue where when using both the community filter panel and the search box it's an AND rather than further refining the results.

This makes the search box further refine the community filter panel results.
@turt2live turt2live requested a review from a team June 9, 2020 03:42
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

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

Thanks, looks good overall!

@@ -45,3 +45,63 @@ export function arrayDiff<T>(a: T[], b: T[]): { added: T[], removed: T[] } {
removed: a.filter(i => !b.includes(i)),
};
}

/**
* Helper functions to perform LINQ-like queries on arrays.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see you're slowly implementing every C# / .NET Framework feature... 😜

Copy link
Member Author

Choose a reason for hiding this comment

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

I really wanted groupBy

/**
* Helper functions to perform LINQ-like queries on arrays.
*/
export class ArrayUtil<T> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Util sounds like a module of static functions rather than a class to me... Not sure what to suggest at the moment though.

Copy link
Member Author

Choose a reason for hiding this comment

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

Possibly LINQArray or Array2 to fully embrace .net bad practices. Or dump these on the Array prototype and forget that they're custom to the project

Copy link
Collaborator

@jryans jryans Jun 9, 2020

Choose a reason for hiding this comment

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

Yikes. 😨 Let's just leave it as-is for now, can change if we're inspired later.

@turt2live turt2live merged commit 82f2551 into develop Jun 9, 2020
@turt2live turt2live deleted the travis/room-list/filter-priority branch June 9, 2020 13:57
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.

2 participants