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

Compose placeholders #1095

Merged
merged 11 commits into from
Jan 23, 2025
Merged

Compose placeholders #1095

merged 11 commits into from
Jan 23, 2025

Conversation

planarvoid
Copy link
Contributor

Fix

In this PR I'm implementing a parallel solution that allows you to draw placeholders in Jetpack Compose instead of Android Views. This is actually more reliable, especially when considering redrawing which was hard to do with AV.
I created the compose placeholder manager from the previous manager and cleaned up things that I think are not necessary with compose. It should be much more straightforward because the compose view should be redrawn when the state changes without any forced redrawns.

This PR is much smaller than it seems because ViewPlaceholderManager is just a rename of PlaceholderManager so it doesn't need to be reviewed.

Test

Test this feature with the related DO PR.

Review

@danilo04

Make sure strings will be translated:

  • If there are new strings that have to be translated, I have added them to the client's strings.xml as a part of the integration PR.

@planarvoid planarvoid self-assigned this Dec 10, 2024
Copy link
Contributor

@AmandaRiu AmandaRiu left a comment

Choose a reason for hiding this comment

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

@planarvoid Tested in the Day One app using a Samsung device and these latest changes work nicely! I made a couple minor code comments for your review. I'm not merging this PR since it looks like it may be waiting for Klym and Danilo as well, but on my end it looks good. 👍🏻

planarvoid and others added 3 commits January 23, 2025 17:15
…ers/ViewPlaceholderManager.kt

Co-authored-by: Amanda Riu <[email protected]>
…ers/ViewPlaceholderManager.kt

Co-authored-by: Amanda Riu <[email protected]>
…ers/ViewPlaceholderManager.kt

Co-authored-by: Amanda Riu <[email protected]>
Copy link
Contributor

@danilo04 danilo04 left a comment

Choose a reason for hiding this comment

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

This has been tested in Day One Android and is working as expected!

@planarvoid planarvoid enabled auto-merge January 23, 2025 16:26
@planarvoid planarvoid merged commit f749d3b into trunk Jan 23, 2025
10 of 14 checks passed
@planarvoid planarvoid deleted the feature/compose-placeholders branch January 23, 2025 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants