Skip to content

Introduces Activity.workflowContentView, workflowContentViewOrNull #1336

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

Merged
merged 1 commit into from
Jun 6, 2025

Conversation

rjrjr
Copy link
Contributor

@rjrjr rjrjr commented Jun 6, 2025

Simplifies creating a WorkflowLayout and using it as the contentView of an Activity. Written with an eye toward making it easy to hand off from one workflow runtime to another, or doing something like activity.workflowContentView.show(LoadingScreen) before any workflow runtime is put in place.

@rjrjr rjrjr requested review from a team and zach-klippenstein as code owners June 6, 2025 16:46
@@ -125,7 +120,7 @@ class PerformancePoetryActivity : AppCompatActivity() {
val traceMain = intent.getBooleanExtra(EXTRA_TRACE_ALL_MAIN_THREAD_MESSAGES, false)
val traceSelectOnTimeout = intent.getBooleanExtra(EXTRA_TRACE_SELECT_TIMEOUTS, false)
val areTracingViaMainLooperCurrently = traceMain || traceSelectOnTimeout
val ableToTrace = Build.VERSION.SDK_INT != 28 && (debuggable || profileable)
val ableToTrace = debuggable || profileable
Copy link
Contributor Author

Choose a reason for hiding this comment

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

IDE called out the 28 check as redundant b/c our min SDK is now 29

Simplifies creating a `WorkflowLayout` and using it as the `contentView` of an `Activity`. Written with an eye toward making it easy to hand off from one workflow runtime to another, or doing something like `activity.workflowContentView.show(LoadingScreen)` before any workflow runtime is put in place. Nice for testing too.
@rjrjr
Copy link
Contributor Author

rjrjr commented Jun 6, 2025

Oops, botched a couple of test updates. Easy fixes.

@rjrjr
Copy link
Contributor Author

rjrjr commented Jun 6, 2025

Oh no! Putting this back to draft status while I dig in to this.

com.squareup.sample.compose.textinput.TextInputTest > allowsTextEditing[Pixel_6(AVD) - 16] FAILED
        leakcanary.NoLeakAssertionFailedError: Application memory leaks were detected:
        ====================================
Tests on Pixel_6(AVD) - 16 failed: There was 1 failure(s).

@rjrjr rjrjr marked this pull request as draft June 6, 2025 19:55
@rjrjr
Copy link
Contributor Author

rjrjr commented Jun 6, 2025

Oh no! Putting this back to draft status while I dig in to this.

com.squareup.sample.compose.textinput.TextInputTest > allowsTextEditing[Pixel_6(AVD) - 16] FAILED
        leakcanary.NoLeakAssertionFailedError: Application memory leaks were detected:
        ====================================
Tests on Pixel_6(AVD) - 16 failed: There was 1 failure(s).

Bah. It's a flake at the command line, and I didn't touch any code related to this test (TextInputActivity uses androidx.activity.compose.setContent, not WorkflowLayout).

@rjrjr rjrjr force-pushed the ray/activity-workflowContentView branch from 941413a to de3966d Compare June 6, 2025 19:59
@rjrjr rjrjr marked this pull request as ready for review June 6, 2025 19:59
@rjrjr rjrjr merged commit 82ca010 into main Jun 6, 2025
44 checks passed
@rjrjr rjrjr deleted the ray/activity-workflowContentView branch June 6, 2025 21:00
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