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

Show TimeLane even if the visibleItemsInfo is empty #904

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mochico
Copy link

@mochico mochico commented Oct 11, 2022

Issue

Overview (Required)

  • Show TimeLane on the Preview of Android Studio
  • For reviewer: Please close the issue if you don't like to add the fixing code for preview

Links

Screenshot

Before After

Special thanks for the investigation

@offwhiite @sobaya-0141

@@ -23,6 +23,23 @@ fun TimeLane(
}
}
var currentDurationTime: DurationTime? = null

if (visibleItemsInfo.value.isEmpty()) {
Copy link
Author

Choose a reason for hiding this comment

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

For reviewer:
The original cause of missing TimeLane in the preview was: the preview is a preview, and the scroll does not happen, so visibleItemsInfo is empty.
This should fix the original problem of missing TimeLane in the Preview screenshot tests and should not break the product but it is open to the argument if we have to put the code for the test. If you think it better to avoid placing the code for testing, you'd better update the expected screenshot in the test.

@github-actions
Copy link

There are differences in Compose previews:

@github-actions github-actions bot temporarily deployed to deploygate-distribution October 12, 2022 01:50 Inactive
@mochico mochico marked this pull request as ready for review November 7, 2022 13:58
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.

Fix TimeLane preview
1 participant