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

Extract room directory results to its own component #8252

Merged
merged 4 commits into from
Apr 7, 2022

Conversation

germain-gg
Copy link
Contributor

@germain-gg germain-gg commented Apr 7, 2022

For element-hq/element-web#21354

I also remove the unused RoomDetail* components, I believe they are left-over from the groups deprecation


This change is marked as an internal change (Task), so will not be included in the changelog.

Preview: https://pr8252--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.

@germain-gg germain-gg requested a review from a team as a code owner April 7, 2022 12:31
@germain-gg germain-gg added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label Apr 7, 2022
@codecov
Copy link

codecov bot commented Apr 7, 2022

Codecov Report

Merging #8252 (07917e2) into develop (5fbb25c) will increase coverage by 0.02%.
The diff coverage is 0.00%.

❗ Current head 07917e2 differs from pull request most recent head 2b1952a. Consider uploading reports for the commit 2b1952a to get more accurate results

@@             Coverage Diff             @@
##           develop    #8252      +/-   ##
===========================================
+ Coverage    28.57%   28.60%   +0.02%     
===========================================
  Files          862      861       -1     
  Lines        49809    49761      -48     
  Branches     12689    12674      -15     
===========================================
  Hits         14232    14232              
+ Misses       35577    35529      -48     
Impacted Files Coverage Δ
src/components/structures/RoomDirectory.tsx 0.00% <0.00%> (ø)
src/components/views/rooms/PublicRoomTile.tsx 0.00% <0.00%> (ø)

Copy link
Contributor

@kerryarchibald kerryarchibald left a comment

Choose a reason for hiding this comment

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

LGTM, left one nitpick comment.

@@ -620,7 +487,13 @@ export default class RoomDirectory extends React.Component<IProps, IState> {
content = <Spinner />;
} else {
const cells = (this.state.publicRooms || [])
.reduce((cells, room) => cells.concat(this.createRoomCells(room)), []);
.reduce((cells, room) => cells.concat(
Copy link
Contributor

Choose a reason for hiding this comment

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

This could just be a map now instead of reduce()

@germain-gg germain-gg enabled auto-merge (squash) April 7, 2022 16:00
@germain-gg germain-gg merged commit 2332785 into develop Apr 7, 2022
@germain-gg germain-gg deleted the gsouquet/public-rooms-tile branch April 7, 2022 16:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants