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

♻️ [SponsorsScreen]Added loading indicator since it is missing. #950

Conversation

Corvus400
Copy link
Contributor

@Corvus400 Corvus400 commented Sep 3, 2024

Issue

  • None.

Overview (Required)

  • I modified the UIState so that it can display a loading screen.

Movie (Optional)

Before After
before.mp4
after.mp4

@github-actions github-actions bot temporarily deployed to deploygate-distribution September 3, 2024 19:05 Inactive
@Corvus400 Corvus400 marked this pull request as ready for review September 3, 2024 21:12
val supporters = sponsors.filter { it.plan == SUPPORTER }.toPersistentList()

val platinumSponsorsUiState = if (platinumSponsors.isNotEmpty()) {
PlatinumSponsorsUiState.Exists(
Copy link
Member

Choose a reason for hiding this comment

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

How about making one big state instead of making for each category?

sealed interface SponsorsListUiState{
data class Exists(
    val platinumSponsors: PersistentList<Sponsor>,
    val goldSponsors: PersistentList<Sponsor>,
    val supporters: PersistentList<Sponsor>,
)
 object Loading
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@takahirom
The issues you pointed out have already been dealt with, so your PR is ready to be reviewed. 🫡
d80ba13

sponsor = sponsor,
onSponsorsItemClick = onSponsorsItemClick,
)
when (uiState) {
Copy link
Member

Choose a reason for hiding this comment

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

Sorry, but if you want to show the progress for each section, the previous UI state definition is better. (I have so many PRs to review, and I don't have time to look into this a lot 🙇). Can we have a Slot API pattern-like method for each category? These boilerplate codes are a little messy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@takahirom
I restored UiState and reduced redundant processing. 🫡

@github-actions github-actions bot had a problem deploying to deploygate-distribution September 6, 2024 03:14 Failure
@Corvus400 Corvus400 requested a review from takahirom September 6, 2024 03:33
@DroidKaigi DroidKaigi deleted a comment from github-actions bot Sep 6, 2024
@github-actions github-actions bot temporarily deployed to deploygate-distribution September 6, 2024 03:43 Inactive
@github-actions github-actions bot temporarily deployed to deploygate-distribution September 6, 2024 06:53 Inactive
Copy link
Member

@takahirom takahirom left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you for considering the solution with us.

@takahirom takahirom merged commit 1e1fe32 into DroidKaigi:main Sep 6, 2024
6 checks passed
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.

2 participants