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

Adjust some idea plugin behaviors #431

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

takahirom
Copy link
Owner

@takahirom takahirom commented Jul 14, 2024

  • Roborazzi Plugin will use default configuration of IDE
  • Sort Gradle tasks and select first by default
screencast.2024-07-14.15-13-20.mp4

* Roborazzi Plugin will use default configuration of IDE
* Sort Gradle tasks and select first by default
@takahirom
Copy link
Owner Author

takahirom commented Jul 14, 2024

@eyedol Thank you for all your contributions to the Roborazzi Idea Plugin! I've made some adjustments to the behaviors related to executing Gradle tasks. Could you please review these changes?

Copy link
Contributor

@eyedol eyedol left a comment

Choose a reason for hiding this comment

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

LGTM. Nice too see the support with running the selected tasks via the user's run configuration

refreshImageList(project)
// For updating the task list after syncing the gradle task
coroutineScope.launch {
fetchTasks(project)
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we can skip executing this in a coroutine

Copy link
Owner Author

Choose a reason for hiding this comment

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

Thanks
I addressed some performance issues in https://github.com/takahirom/roborazzi/pull/439/files

Comment on lines +43 to +52
val runManager = RunManager.getInstance(project)
val configurationFactory = GradleExternalTaskConfigurationType.getInstance().factory
val runConfiguration = runManager.createConfiguration(
"Execute $taskName",
configurationFactory
)

val gradleRunConfiguration = runConfiguration.configuration as GradleRunConfiguration
gradleRunConfiguration.settings.apply {
externalProjectPath = project.basePath
Copy link
Contributor

Choose a reason for hiding this comment

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

Neat to see it added to run configuration

@takahirom takahirom merged commit 4c293fe into main Jul 18, 2024
6 checks passed
@takahirom takahirom deleted the takahirom/adjust-idea-plugin-behaviors/2024-07-14 branch July 18, 2024 03:06
chrisbanes pushed a commit to chrisbanes/haze that referenced this pull request Jul 19, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[io.github.takahirom.roborazzi](https://github.com/takahirom/roborazzi)
| `1.22.2` -> `1.23.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.github.takahirom.roborazzi/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.github.takahirom.roborazzi/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.github.takahirom.roborazzi/1.22.2/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.github.takahirom.roborazzi/1.22.2/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[io.github.takahirom.roborazzi:roborazzi-junit-rule](https://github.com/takahirom/roborazzi)
| `1.22.2` -> `1.23.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.github.takahirom.roborazzi:roborazzi-junit-rule/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.github.takahirom.roborazzi:roborazzi-junit-rule/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.github.takahirom.roborazzi:roborazzi-junit-rule/1.22.2/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.github.takahirom.roborazzi:roborazzi-junit-rule/1.22.2/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[io.github.takahirom.roborazzi:roborazzi-compose-desktop](https://github.com/takahirom/roborazzi)
| `1.22.2` -> `1.23.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.github.takahirom.roborazzi:roborazzi-compose-desktop/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.github.takahirom.roborazzi:roborazzi-compose-desktop/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.github.takahirom.roborazzi:roborazzi-compose-desktop/1.22.2/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.github.takahirom.roborazzi:roborazzi-compose-desktop/1.22.2/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[io.github.takahirom.roborazzi:roborazzi-compose](https://github.com/takahirom/roborazzi)
| `1.22.2` -> `1.23.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.github.takahirom.roborazzi:roborazzi-compose/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.github.takahirom.roborazzi:roborazzi-compose/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.github.takahirom.roborazzi:roborazzi-compose/1.22.2/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.github.takahirom.roborazzi:roborazzi-compose/1.22.2/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[io.github.takahirom.roborazzi:roborazzi](https://github.com/takahirom/roborazzi)
| `1.22.2` -> `1.23.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.github.takahirom.roborazzi:roborazzi/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.github.takahirom.roborazzi:roborazzi/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.github.takahirom.roborazzi:roborazzi/1.22.2/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.github.takahirom.roborazzi:roborazzi/1.22.2/1.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>takahirom/roborazzi (io.github.takahirom.roborazzi)</summary>

###
[`v1.23.0`](https://github.com/takahirom/roborazzi/releases/tag/1.23.0)

[Compare
Source](https://github.com/takahirom/roborazzi/compare/1.22.2...1.23.0)

### Breaking Changes to
`roborazzi.generateComposePreviewRobolectricTests.customTestQualifiedClassName`
Gradle Extension

We released
`roborazzi.generateComposePreviewRobolectricTests.customTestQualifiedClassName`
in the previous release `1.22.0`, allowing customization of preview test
behavior. We have since discovered that the interface of
RobolectricPreviewTest cannot adapt to Compose Multiplatform Preview
because RobolectricPreviewTest uses `AndroidPreviewInfo` from
[ComposablePreviewScanner](https://github.com/sergio-sastre/ComposablePreviewScanner),
which represents Android Compose Preview. To address this, we have added
a generic parameter to handle the annotation and renamed
RobolectricPreviewTest to ComposePreviewTester.

The Gradle extension property has been renamed:


`roborazzi.generateComposePreviewRobolectricTests.customTestQualifiedClassName`
->
`roborazzi.generateComposePreviewRobolectricTests.testerQualifiedClassName`

Old interface:

```kotlin
interface RobolectricPreviewTest {
  fun previews(vararg packages: String): List<ComposablePreview<AndroidPreviewInfo>>

  fun test(
    preview: ComposablePreview<AndroidPreviewInfo>,
  )
}
```

New interface:

```kotlin
interface ComposePreviewTester<T : Any> {
  fun previews(vararg packages: String): List<ComposablePreview<T>>

  fun test(
    preview: ComposablePreview<T>,
  )
}
```

#### What's Changed

- Rename ComposePreviewRobolectricTest to ComposePreviewTester to
support custom Preview annotation tests in Experimental Compose Preview
Support by [@&#8203;takahirom](https://github.com/takahirom) in
[takahirom/roborazzi#438
- \[Idea Plugin]Adjust some idea plugin behaviors by
[@&#8203;takahirom](https://github.com/takahirom) in
[takahirom/roborazzi#431
We haven't released this feature yet. Stay tuned!

**Full Changelog**:
takahirom/roborazzi@1.22.2...1.23.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
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.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/chrisbanes/haze).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzEuNCIsInVwZGF0ZWRJblZlciI6IjM3LjQzMS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
github-merge-queue bot pushed a commit to slackhq/circuit that referenced this pull request Jul 19, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[io.github.takahirom.roborazzi](https://github.com/takahirom/roborazzi)
| plugin | minor | `1.22.2` -> `1.23.0` |
|
[io.github.takahirom.roborazzi:roborazzi-junit-rule](https://github.com/takahirom/roborazzi)
| dependencies | minor | `1.22.2` -> `1.23.0` |
|
[io.github.takahirom.roborazzi:roborazzi-compose](https://github.com/takahirom/roborazzi)
| dependencies | minor | `1.22.2` -> `1.23.0` |
|
[io.github.takahirom.roborazzi:roborazzi](https://github.com/takahirom/roborazzi)
| dependencies | minor | `1.22.2` -> `1.23.0` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>takahirom/roborazzi (io.github.takahirom.roborazzi)</summary>

###
[`v1.23.0`](https://github.com/takahirom/roborazzi/releases/tag/1.23.0)

[Compare
Source](https://github.com/takahirom/roborazzi/compare/1.22.2...1.23.0)

##### Breaking Changes to
`roborazzi.generateComposePreviewRobolectricTests.customTestQualifiedClassName`
Gradle Extension

We released
`roborazzi.generateComposePreviewRobolectricTests.customTestQualifiedClassName`
in the previous release `1.22.0`, allowing customization of preview test
behavior. We have since discovered that the interface of
RobolectricPreviewTest cannot adapt to Compose Multiplatform Preview
because RobolectricPreviewTest uses `AndroidPreviewInfo` from
[ComposablePreviewScanner](https://github.com/sergio-sastre/ComposablePreviewScanner),
which represents Android Compose Preview. To address this, we have added
a generic parameter to handle the annotation and renamed
RobolectricPreviewTest to ComposePreviewTester.

The Gradle extension property has been renamed:


`roborazzi.generateComposePreviewRobolectricTests.customTestQualifiedClassName`
->
`roborazzi.generateComposePreviewRobolectricTests.testerQualifiedClassName`

Old interface:

```kotlin
interface RobolectricPreviewTest {
  fun previews(vararg packages: String): List<ComposablePreview<AndroidPreviewInfo>>

  fun test(
    preview: ComposablePreview<AndroidPreviewInfo>,
  )
}
```

New interface:

```kotlin
interface ComposePreviewTester<T : Any> {
  fun previews(vararg packages: String): List<ComposablePreview<T>>

  fun test(
    preview: ComposablePreview<T>,
  )
}
```

##### What's Changed

- Rename ComposePreviewRobolectricTest to ComposePreviewTester to
support custom Preview annotation tests in Experimental Compose Preview
Support by [@&#8203;takahirom](https://github.com/takahirom) in
[takahirom/roborazzi#438
- \[Idea Plugin]Adjust some idea plugin behaviors by
[@&#8203;takahirom](https://github.com/takahirom) in
[takahirom/roborazzi#431
We haven't released this feature yet. Stay tuned!

**Full Changelog**:
takahirom/roborazzi@1.22.2...1.23.0

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **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.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjQzMy4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
This pull request was closed.
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