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

Update all dependencies 1.34.0 to v1.35.0 #1223

Merged
merged 1 commit into from
Dec 8, 2024
Merged

Update all dependencies 1.34.0 to v1.35.0 #1223

merged 1 commit into from
Dec 8, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 8, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
io.github.takahirom.roborazzi 1.34.0 -> 1.35.0 age adoption passing confidence
io.github.takahirom.roborazzi:roborazzi-junit-rule 1.34.0 -> 1.35.0 age adoption passing confidence
io.github.takahirom.roborazzi:roborazzi-compose 1.34.0 -> 1.35.0 age adoption passing confidence
io.github.takahirom.roborazzi:roborazzi 1.34.0 -> 1.35.0 age adoption passing confidence

Release Notes

takahirom/roborazzi (io.github.takahirom.roborazzi)

v1.35.0

Compare Source

Add support for heightDp, widthDp, showBackground, and backgroundColor of Compose Preview parameters

We have introduced Experimental Compose Preview Support in 1.22.0, but it does not yet support all parameters of the @Preview annotation. Thanks to @​sergio-sastre 's pull request, the Experimental Compose Preview Support now includes support for heightDp, widthDp, showBackground, and backgroundColor.

Introduce RoborazziComposeOptions

To accommodate the changes in preview parameters, we’ve made the API more flexible.

We’ve added the RoborazziComposeOptions parameter to ComposablePreview<AndroidPreviewInfo>.captureRoboImage() and the composable function version, captureRoboImage{}. Previously, the API was limited; for example, you couldn’t access the ActivityScenario or the composable function directly. Now, you have full control over these components. Thank you for your code review @​sergio-sastre

Here’s an example of a custom option:

    captureRoboImage(
      roborazziComposeOptions = RoborazziComposeOptions {
        // We have several options to configure the test environment.
        fontScale(2f)
        // We can also configure the activity scenario and the composable content.
        addOption(
          object : RoborazziComposeComposableOption,
            RoborazziComposeActivityScenarioOption {
            override fun configureWithActivityScenario(scenario: ActivityScenario<out Activity>) {
              scenario.onActivity {
                it.window.decorView.setBackgroundColor(Color.BLUE)
              }
            }

            override fun configureWithComposable(content: @&#8203;Composable () -> Unit): @&#8203;Composable () -> Unit {
              return {
                Box(Modifier
                  .padding(10.dp)
                  .background(color = androidx.compose.ui.graphics.Color.Red)
                  .padding(10.dp)
                ) {
                  content()
                }
              }
            }
          }
        )
      },
    ) {
      Text("Hello Compose!")
    }

image

Breaking Change: fun ComposablePreview<AndroidPreviewInfo>.applyToRobolectricConfiguration() is now deprecated and marked as an error

As part of our updates to how composables are configured, the applyToRobolectricConfiguration() function is now deprecated and marked as an error. Instead, you can use one of the following alternatives:

  • previewInfo.toRoborazziComposeOptions().apply(scenario, composeContent)
  • ComposablePreview<AndroidPreviewInfo>.captureRoboImage(roborazziComposeOptions)

We believe this feature is not widely used, and the migration should be straightforward. However, if you encounter any issues, please don’t hesitate to reach out.

What's Changed

Full Changelog: takahirom/roborazzi@1.34.0...1.35.0


Configuration

📅 Schedule: Branch creation - "* 0-3 * * *" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@yschimke yschimke merged commit 16f2a63 into main Dec 8, 2024
7 checks passed
@renovate renovate bot deleted the renovate/all branch December 8, 2024 08:03
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.

1 participant