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

Display whether the group summary/room list is loading #1560

Merged
merged 5 commits into from
Oct 31, 2017

Conversation

lukebarnard1
Copy link
Contributor

@lukebarnard1 lukebarnard1 commented Oct 31, 2017

This uses a ready flag assigned to each fetching API used by the GroupServer. I've avoided making this generic for now for want of not doing so early.

fixes element-hq/element-web#5457

This uses a `ready` flag assigned to each fetching API used by the GroupServer. I've avoided making this generic for now for want of not doing so early.
@@ -670,7 +677,7 @@ export default React.createClass({
<h3>{ _t('Rooms') }</h3>
{ addRoomRow }
</div>
<RoomDetailList rooms={this._groupStore.getGroupRooms()} />
<RoomDetailList rooms={this.state.groupRooms} loading={this.state.groupRoomsLoading} />
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason for passing this into RoomDetailList and letting it deal with the loading state rather than just showing a spinner in lieu of it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really, TBH. Happy do to the simpler thing of replacing it entirely with a spinner.

@@ -96,6 +105,10 @@ export default class GroupStore extends EventEmitter {
this.removeListener('update', fn);
}

isStateReady(id) {
Copy link
Member

Choose a reason for hiding this comment

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

This is quite nice but I feel like we now need to doc what string values are acceptable to it. How about defining some constants on the GroupStore class and and using these instead?

@dbkr dbkr assigned lukebarnard1 and unassigned dbkr Oct 31, 2017
@lukebarnard1 lukebarnard1 assigned dbkr and unassigned lukebarnard1 Oct 31, 2017
@dbkr dbkr merged commit 273aae2 into develop Oct 31, 2017
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.

"No rooms in group" shown while waiting for rooms request to finish
2 participants