-
Notifications
You must be signed in to change notification settings - Fork 495
Add Local Incidence Card to Statistics (EXPOSUREAPP-7446) #3596
Add Local Incidence Card to Statistics (EXPOSUREAPP-7446) #3596
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.
UA approved
...n-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/cards/LocalIncidenceCard.kt
Outdated
Show resolved
Hide resolved
Corona-Warn-App/src/main/java/de/rki/coronawarnapp/util/formatter/FormatterStatistics.kt
Outdated
Show resolved
Hide resolved
Corona-Warn-App/src/main/res/layout/home_statistics_cards_local_incidence_layout.xml
Outdated
Show resolved
Hide resolved
Corona-Warn-App/src/main/res/layout/home_statistics_cards_local_incidence_layout.xml
Outdated
Show resolved
Hide resolved
… cards, district names are resolved in the parser, also added fetching of local statistics based on active districts
…d' into feature/7446-local-incidence-card
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.
I got crash after removing Local Incidence Card
java.lang.IllegalStateException: Two different ViewHolders have the same stable ID. Stable IDs in your adapter MUST BE unique and SHOULD NOT change.
ViewHolder 1:LocalIncidenceCard{312f8db position=2 id=8, oldPos=-1, pLpos:-1 not recyclable(1)}
View Holder 2:LocalIncidenceCard{ddbd4cd position=1 id=8, oldPos=-1, pLpos:-1} androidx.recyclerview.widget.RecyclerView{afd4cff VFED..... ......ID 0,269-1080,1241 #7f0a06d7 app:id/statistics_recyclerview}, adapter:de.rki.coronawarnapp.statistics.ui.homecards.StatisticsCardAdapter@9e5d0c4, layout:de.rki.coronawarnapp.statistics.ui.homecards.StatisticsLayoutManager@80dcbad, context:de.rki.coronawarnapp.ui.main.MainActivity@a39276d
Doesn't meet the Acceptance Criteria:
The code is already there but is not used. Something like this should work: // HomeFragmentViewModel.kt, line 203
data = statsData.copy(
items = mutableListOf(AddStatsItem(isEnabled = statsData.items.filterIsInstance<LocalIncidenceStats>().size < 5))
.plus(statsData.items)
), |
Doesn't meet the Acceptance Criteria:
|
weird, this has not happened for me during testing, will investigate |
…ser selection to a server result and enables us to sort the cards by the time they were added at
…d' into feature/7446-local-incidence-card
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.
Looking better every day 😁.
Found a few inconsistencies we need to check out.
.../src/main/java/de/rki/coronawarnapp/statistics/local/storage/LocalStatisticsConfigStorage.kt
Outdated
Show resolved
Hide resolved
.../src/main/java/de/rki/coronawarnapp/statistics/local/storage/LocalStatisticsConfigStorage.kt
Outdated
Show resolved
Hide resolved
...rn-App/src/main/java/de/rki/coronawarnapp/statistics/local/source/LocalStatisticsProvider.kt
Outdated
Show resolved
Hide resolved
...rn-App/src/main/java/de/rki/coronawarnapp/statistics/local/source/LocalStatisticsProvider.kt
Outdated
Show resolved
Hide resolved
Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/local/FederalStateToPackageId.kt
Show resolved
Hide resolved
...n-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/cards/StatisticsCardItem.kt
Outdated
Show resolved
Hide resolved
...n-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/cards/StatisticsCardItem.kt
Outdated
Show resolved
Hide resolved
...n-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/cards/StatisticsCardItem.kt
Outdated
Show resolved
Hide resolved
...n-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/cards/LocalIncidenceCard.kt
Outdated
Show resolved
Hide resolved
Corona-Warn-App/src/main/res/layout/home_statistics_cards_local_incidence_layout.xml
Outdated
Show resolved
Hide resolved
one minor thing: |
Added distinct condition to the provided stats as the same package can contain multiple districts
…d' into feature/7446-local-incidence-card
…d' into feature/7446-local-incidence-card
…d' into feature/7446-local-incidence-card
Disabled the AddCard completely (no ripple)
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.
The positive trend icon should be green and the negative trend icon should be red, like the rest of the cards. But I see the trend icon only in grey color.
Kudos, SonarCloud Quality Gate passed! |
Description
This PR Adds the local incidence card for the new local statistics feature, note that there is no logic in place to actually display the card at the moment this will be done in a follow up PR