Manage Insights screen#9501
Conversation
planarvoid
left a comment
There was a problem hiding this comment.
Looks pretty good! Check my comments about the LinkButton block and let me know what you think
| popupMenuHandler | ||
| ) | ||
| ) { | ||
| override val uiModel: LiveData<UiModel> = super.uiModel.map { model -> |
There was a problem hiding this comment.
I think this belongs to the org.wordpress.android.ui.stats.refresh.lists.UiModelMapper#mapInsights method cause that's where we build the UiModel. You can either pass the mutableNavigationTarget as a parameter to the mapInsights function. What do you think?
| } | ||
| } | ||
|
|
||
| enum class InsightsTypes : StatsTypes { |
There was a problem hiding this comment.
I'd remove the StatsTypes from the base StatsBlock implementation. I think the Control block doesn't need type. We just need to do a bit of casting in the StatsBlockAdapter and modify the DiffUtils so they don't check the statsTypes when it's comparing the Control block
|
Everything looks pretty great! One thing is that adding a new block still keeps it in a permanent loading state (the first time you add it). Do you want to tackle this in a separate PR? |
|
Thanks @0nko Dragging items in the list feels so good now, it's looking really solid, few things:
Regarding the functionality, there still seems to be one issue:
|
…e-insights # Conflicts: # WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/StatsFragment.kt # WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/StatsViewModel.kt # WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/lists/BaseListUseCase.kt # WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/lists/StatsListViewModel.kt # WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/utils/ItemPopupMenuHandler.kt
|
This looks and feels amazing @0nko , thanks! |
planarvoid
left a comment
There was a problem hiding this comment.
Looks good 👍 , as discussed, we'll move the fix for the infinitely loading blocks to a separate PR/issue

Fixes #9464.
To test:
Update release notes:
RELEASE-NOTES.txt.