-
Notifications
You must be signed in to change notification settings - Fork 782
space switcher empty spaces #6988
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, no blocking remarks here.
@@ -71,6 +73,7 @@ class SpaceListFragment : | |||
homeActivitySharedActionViewModel = activityViewModelProvider[HomeSharedActionViewModel::class.java] | |||
roomListSharedActionViewModel = activityViewModelProvider[RoomListSharedActionViewModel::class.java] | |||
views.stateView.contentView = views.groupListView | |||
views.spacesEmptyButton.onClick { onAddSpaceSelected() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is maybe not new, but when the user clicks on this button, do we want to close the bottomsheet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericdecanini could you please verify?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we don't want to close it immediately in case the user navigates back but we want to close it following a successful space creation.
There's already an issue for this #6950
Edit: This behaviour already works like this in this PR. It also may be that we can close the above mentioned issue if we investigate that this works too in other cases
views.spacesEmptyGroup.isVisible = false | ||
views.groupListView.isVisible = true | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About StateView, the correct code would be:
is Success -> {
if (spaces.invoke().isEmpty()) {
views.stateView.state = StateView.State.Empty(...)
} else {
views.stateView.state = StateView.State.Content
}
}
But maybe there are specific needs here? If this is the spaces_empty_button
, maybe we could improve the StateView to integrate it. (can be done later, to not block this.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StateView
has exact implementation for Empty
state and I hadn't time to extend it to accept custom views (it rises some problems like callbacks for button). So in this case I had to place custom empty state near content view and switch between them. StateView
her is mostly for loading state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK; thanks for explaining.
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be merged!
Type of change
Content
empty state for new space switching dialog
Motivation and context
closes #6754
Screenshots / GIFs