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

App layout Home screen empty states #7007

Merged
merged 5 commits into from
Sep 5, 2022

Conversation

fedrunov
Copy link
Contributor

@fedrunov fedrunov commented Sep 5, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

new app layout home screen needs empty states

Motivation and context

closes #6835

Screenshots / GIFs

All chats Space Unreads
all_chats space unreads
all_chat_dark space_dark unreads_dark

@bmarty
Copy link
Member

bmarty commented Sep 5, 2022

There is a pb with the description, this PR does not close #6999

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

StateView usage (as an item of a RecyclerView) is a bit weird. Is it possible to do otherwise?

Else only minor remarks.

Thanks!

library/ui-strings/src/main/res/values/strings.xml Outdated Show resolved Hide resolved
library/ui-strings/src/main/res/values/strings.xml Outdated Show resolved Hide resolved

override fun bind(holder: Holder) {
super.bind(holder)
holder.stateView.state = emptyData ?: StateView.State.Content
Copy link
Member

Choose a reason for hiding this comment

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

I guess in this case emptyData will never be null, so it could be a lateinit var

vector/src/main/res/layout/item_room_list_empty.xml Outdated Show resolved Hide resolved
@fedrunov
Copy link
Contributor Author

fedrunov commented Sep 5, 2022

StateView usage (as an item of a RecyclerView) is a bit weird. Is it possible to do otherwise?

Agree, but problem here is that both recent carousel and filter tabs are part of the same recycler as rooms list, so we can't put whole list inside StateView as we normally do. Putting it inside is the best solution I've found

@fedrunov fedrunov requested a review from bmarty September 5, 2022 14:09
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

Thanks for the update and explanation!

android:id="@+id/stateView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:colorBackground">

Choose a reason for hiding this comment

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

  • ⚠️ Possible overdraw: Root element paints background ?android:colorBackground with a theme that also paints a background (inferred theme is @android:style/Theme.Holo)
  • ⚠️ Possible overdraw: Root element paints background ?android:colorBackground with a theme that also paints a background (inferred theme is @android:style/Theme.Holo)

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 5, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@fedrunov fedrunov merged commit efe5eb0 into develop Sep 5, 2022
@fedrunov fedrunov deleted the feature/nfe/app_layout_empty_states branch September 5, 2022 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

App Layout: Empty States
4 participants