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

Add more props to RoomSubList #541

Merged
merged 5 commits into from
Dec 18, 2015
Merged

Add more props to RoomSubList #541

merged 5 commits into from
Dec 18, 2015

Conversation

kegsay
Copy link
Contributor

@kegsay kegsay commented Dec 18, 2015

Part of the fix for #348

alwaysShowHeader has been added to force the title to be shown even if there are 0 elements. Required so people can actually click the archived header.

showSpinner has been added to make a spinner spin if there are 0 elements. Required so people know a request is ongoing whilst getting archived rooms.

onHeaderClick has been added so we can call the JS SDK when the archived room header is clicked.

startAsHidden has been added to allow the initial collapsed/expanded state to be modified. Required because the archived section should be collapsed by default as we don't yet have the rooms until you try to expand it.

Also added a TODO questioning the naming of props.collapsed - it's terribly confusing because I think of collapsed as "no rooms are showing but you can expand them" but that is actually represented in the code as state.hidden = true.

See also:

startAsHidden: Previously we never started in the hidden state and all was well.
But with archived rooms you DO want to start hidden as you haven't fetched the
room list yet. Without this, you need to click twice (close/open) before the
archived room list will load.

showSpinner: If true, will show a spinner iff there are 0 elements being displayed.
Used when fetching the archived room list in RoomList.
@ara4n
Copy link
Member

ara4n commented Dec 18, 2015

lgtm other than comment on matrix-org/matrix-react-sdk#62

@ara4n
Copy link
Member

ara4n commented Dec 18, 2015

lgtm if it works :)

kegsay added a commit that referenced this pull request Dec 18, 2015
@kegsay kegsay merged commit 59f419b into develop Dec 18, 2015
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.

3 participants