Skip to content

Conversation

@angryPodo
Copy link
Contributor

Issue

Overview

  • Improved the user experience by providing visual feedback for asynchronous image loading states (loading, error).
  • Modified the rememberAsyncImagePainter function in ImagePainter.kt to return an appropriate painter for each state
    • Loading State: Displays a gray ColorPainter as a placeholder, providing
      immediate visual feedback.
    • Error State: Displays a predefined error_mascot drawable if the image fails to load.
    • Success State: Displays the successfully loaded image.

Links

  • N/A

Screenshot

Before After
Error Error
image image
Loading Loading
Loading before Loading after

…ates

Modify rememberAsyncImagePainter to provide visual feedback during different image loading states.

- On loading: Display a placeholder painter.
- On error: Display a predefined error mascot image.
- On success: Display the loaded image.

This change improves user experience by clearly indicating the status of image loading.

Fixes DroidKaigi#159
…ates

Modify rememberAsyncImagePainter to provide visual feedback during different image loading states.

- On loading: Display a placeholder painter.
- On error: Display a predefined error mascot image.
- On success: Display the loaded image.

This change improves user experience by clearly indicating the status of image loading.

Fixes DroidKaigi#159
@angryPodo angryPodo requested a review from a team as a code owner August 22, 2025 18:12
@angryPodo angryPodo requested review from kilalabu and removed request for a team August 22, 2025 18:12
Copy link
Contributor

@kilalabu kilalabu 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! Thanks for this PR.
I need to get a design check on this, so it won't be merged right away 🙏
I'll wait for feedback from the designer.

@kilalabu
Copy link
Contributor

@angryPodo
Sorry for the wait 🙏
The designer gave the green light, so let's move forward with the UI you proposed!
Could you please resolve the conflicts?

@angryPodo
Copy link
Contributor Author

@kilalabu
Perfect! I’ll resolve the conflicts now and push the update. 🚀

…-asyncimage-loading-state

# Conflicts:
#	feature/profile/src/commonMain/kotlin/io/github/confsched/profile/ProfileEditScreen.kt
#	feature/profile/src/commonMain/kotlin/io/github/confsched/profile/card/ProfileCardScreen.kt
@angryPodo angryPodo requested a review from kilalabu August 28, 2025 07:05
@github-actions
Copy link

Snapshot diff report

File name Image
FavoritesScreenPrevi
ew_compare.png
io.github.droidkaigi
.confsched.favorites
.FavoritesScreenTest
- FavoritesScreen -
when server is oper
ational - with singl
e favorite session -
it should display s
ingle favorite sessi
on_compare.png
io.github.droidkaigi
.confsched.favorites
.FavoritesScreenTest
- FavoritesScreen -
when server is oper
ational - with many
favorite sessions -
scroll to see more s
essions - it should
display scrolled con
tent_compare.png
io.github.droidkaigi
.confsched.favorites
.FavoritesScreenTest
- FavoritesScreen -
when server is oper
ational - with many
favorite sessions -
it should display mu
ltiple favorite sess
ions_compare.png
io.github.droidkaigi
.confsched.favorites
.FavoritesScreenTest
- FavoritesScreen -
when server is oper
ational - with many
favorite sessions -
click first session
bookmark - it should
display remaining f
avorite sessions_com
pare.png
ContributorsScreenPr
eview_compare.png
io.github.droidkaigi
.confsched.staff.Sta
ffScreenTest - Staff
Screen - when server
is operational - wh
en launch - after lo
ading - when scroll
to index 10 - it sho
uld show staffs_comp
are.png
StaffItemPreview_com
pare.png
StaffScreenPreview_c
ompare.png
io.github.droidkaigi
.confsched.staff.Sta
ffScreenTest - Staff
Screen - when server
is operational - wh
en launch - after lo
ading - it should sh
ow first and second
staffs_compare.png
io.github.droidkaigi
.confsched.staff.Sta
ffScreenTest - Staff
Screen - when server
is error - when lau
nch - after loading
- click retry after
server gets operatio
nal - after waiting
for 5 seconds - it s
hould show staffs_co
mpare.png
SponsorScreenPreview
_compare.png
TimetableItemDetailS
creenPreview_compare
.png
io.github.droidkaigi
.confsched.sessions.
SearchScreenTest - S
earchScreen - when s
erver is operational
- after loading - w
hen filter language
chip click - when cl
ick English - it sho
uld selected English
_compare.png
TimetableItemDetailH
eadlineWithMixedPrev
iew_compare.png
TimetableGridItemPre
view_LongTitle_compa
re.png
TimetableItemDetailH
eadlinePreview_compa
re.png
io.github.droidkaigi
.confsched.sessions.
SearchScreenTest - S
earchScreen - when s
erver is operational
- after loading - w
hen filter category
chip click - when cl
ick App Architecture
en - it should sele
cted App Architectur
e en_compare.png
io.github.droidkaigi
.confsched.sessions.
TimetableItemDetailS
creenTest - Timetabl
eItemDetailScreen -
when server is opera
tional - when launch
- it should show se
ssion detail title_c
ompare.png
TimetableItemDetailH
eadlineWithEnglishPr
eview_compare.png
io.github.droidkaigi
.confsched.sessions.
SearchScreenTest - S
earchScreen - when s
erver is operational
- after loading - w
hen filter session t
ype chip click - whe
n click Normal - it
should selected Norm
al_compare.png
TimetableScreenPrevi
ew_Grid_compare.png
io.github.droidkaigi
.confsched.sessions.
SearchScreenTest - S
earchScreen - when s
erver is operational
- after loading - w
hen filter category
chip click - when cl
ick Jetpack Compose
en - it should selec
ted Jetpack Compose
en_compare.png
TimetableGridPreview
_compare.png
io.github.droidkaigi
.confsched.sessions.
TimetableItemDetailS
creenTest - Timetabl
eItemDetailScreen -
when server is opera
tional - when font s
cale is huge - it sh
ould show huge font
session detail(top)_
compare.png
io.github.droidkaigi
.confsched.sessions.
TimetableItemDetailS
creenTest - Timetabl
eItemDetailScreen -
when server is opera
tional - when font s
cale is small - it s
hould show small fon
t session detail_com
pare.png
TimetableScreenPrevi
ew_List_compare.png
TimetableGridItemPre
view_80min_compare.p
ng
TimetableGridItemPre
view_WithError_compa
re.png
TimetableGridItemPre
view_compare.png

@kilalabu
Copy link
Contributor

@angryPodo
spotless-check / spotless-check (pull_request) is failing, can you check?

…ates

Modify rememberAsyncImagePainter to provide visual feedback during different image loading states.

- On loading: Display a placeholder painter.
- On error: Display a predefined error mascot image.
- On success: Display the loaded image.

This change improves user experience by clearly indicating the status of image loading.

Fixes DroidKaigi#159
@angryPodo
Copy link
Contributor Author

@kilalabu
Thanks for the heads-up. I've fixed the spotless formatting issues and pushed the corrected commit The CI should be passing now. Please let me know if there are any other issues.

Copy link
Contributor

@kilalabu kilalabu left a comment

Choose a reason for hiding this comment

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

LGTM!
Sorry for keeping you waiting! Thank you contribution 👍

@kilalabu kilalabu added this pull request to the merge queue Aug 28, 2025
Merged via the queue into DroidKaigi:main with commit e55a27d Aug 28, 2025
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.

Improve AsyncImage loading state

2 participants