From 51d7e2c8d283d760299d02b2378d3bcfe000327b Mon Sep 17 00:00:00 2001 From: Razz4780 Date: Tue, 7 Jan 2025 16:14:25 +0100 Subject: [PATCH 1/6] Added redirect --- changelog.d/316.added.md | 1 + .../main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 changelog.d/316.added.md diff --git a/changelog.d/316.added.md b/changelog.d/316.added.md new file mode 100644 index 00000000..d868ec34 --- /dev/null +++ b/changelog.d/316.added.md @@ -0,0 +1 @@ +Added dropdown menu action that redirects to the plugin docs.g \ No newline at end of file diff --git a/modules/core/src/main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt b/modules/core/src/main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt index 3b6a45d3..7fd48e90 100644 --- a/modules/core/src/main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt +++ b/modules/core/src/main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt @@ -20,6 +20,7 @@ import javax.swing.JComponent const val DISCORD_URL = "https://discord.gg/metalbear" const val MIRRORD_FOR_TEAMS_URL = "https://app.metalbear.co/" +const val DOCS_URL = "https://mirrord.dev/docs/using-mirrord/intellij-plugin/" /** * Copied from internal [com.intellij.execution.ui.TogglePopupAction]. @@ -164,6 +165,12 @@ class MirrordDropDown : TogglePopupAction(), DumbAware { } } + private class DocsAction : AnAction("How To Use?") { + override fun actionPerformed(e: AnActionEvent) { + BrowserUtil.browse(DOCS_URL) + } + } + override fun getActionGroup(e: AnActionEvent): ActionGroup { val project = e.project ?: throw Error("mirrord requires an open project") val service = project.service() @@ -180,6 +187,7 @@ class MirrordDropDown : TogglePopupAction(), DumbAware { } addSeparator("Help") + add(DocsAction()) add(DiscordAction()) } } From 6a0432809fc832c3ae1b238c38cee84cf06577de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Smolarek?= <34063647+Razz4780@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:19:07 +0100 Subject: [PATCH 2/6] Change action name --- .../src/main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt b/modules/core/src/main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt index 7fd48e90..5aa18f0c 100644 --- a/modules/core/src/main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt +++ b/modules/core/src/main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt @@ -165,7 +165,7 @@ class MirrordDropDown : TogglePopupAction(), DumbAware { } } - private class DocsAction : AnAction("How To Use?") { + private class DocsAction : AnAction("Documentation") { override fun actionPerformed(e: AnActionEvent) { BrowserUtil.browse(DOCS_URL) } From 4cbc77163514fd1a2e512ee8d628b4633163ca14 Mon Sep 17 00:00:00 2001 From: Razz4780 Date: Tue, 7 Jan 2025 16:20:34 +0100 Subject: [PATCH 3/6] Fix changelog --- changelog.d/316.added.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/316.added.md b/changelog.d/316.added.md index d868ec34..f02670e1 100644 --- a/changelog.d/316.added.md +++ b/changelog.d/316.added.md @@ -1 +1 @@ -Added dropdown menu action that redirects to the plugin docs.g \ No newline at end of file +Added dropdown menu action that redirects to the plugin docs. \ No newline at end of file From b49380748ba0cff4d1a2748200bdf3f6b8a3dd11 Mon Sep 17 00:00:00 2001 From: Razz4780 Date: Tue, 7 Jan 2025 16:21:37 +0100 Subject: [PATCH 4/6] Added utm medium --- .../src/main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/src/main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt b/modules/core/src/main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt index 5aa18f0c..04aa7349 100644 --- a/modules/core/src/main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt +++ b/modules/core/src/main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt @@ -19,8 +19,8 @@ import java.util.* import javax.swing.JComponent const val DISCORD_URL = "https://discord.gg/metalbear" -const val MIRRORD_FOR_TEAMS_URL = "https://app.metalbear.co/" -const val DOCS_URL = "https://mirrord.dev/docs/using-mirrord/intellij-plugin/" +const val MIRRORD_FOR_TEAMS_URL = "https://app.metalbear.co/?utm_medium=intellij" +const val DOCS_URL = "https://mirrord.dev/docs/using-mirrord/intellij-plugin/?utm_medium=intellij" /** * Copied from internal [com.intellij.execution.ui.TogglePopupAction]. From ed1c3029bc878633ff1c2f41fa0d9deaae873534 Mon Sep 17 00:00:00 2001 From: Razz4780 Date: Tue, 7 Jan 2025 16:28:20 +0100 Subject: [PATCH 5/6] Added utm_source --- .../src/main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/src/main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt b/modules/core/src/main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt index 04aa7349..21887a53 100644 --- a/modules/core/src/main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt +++ b/modules/core/src/main/kotlin/com/metalbear/mirrord/MirrordDropDown.kt @@ -19,8 +19,8 @@ import java.util.* import javax.swing.JComponent const val DISCORD_URL = "https://discord.gg/metalbear" -const val MIRRORD_FOR_TEAMS_URL = "https://app.metalbear.co/?utm_medium=intellij" -const val DOCS_URL = "https://mirrord.dev/docs/using-mirrord/intellij-plugin/?utm_medium=intellij" +const val MIRRORD_FOR_TEAMS_URL = "https://app.metalbear.co/?utm_medium=intellij&utm_source=ui_action" +const val DOCS_URL = "https://mirrord.dev/docs/using-mirrord/intellij-plugin/?utm_medium=intellij&utm_source=ui_action" /** * Copied from internal [com.intellij.execution.ui.TogglePopupAction]. From f07d279013fcd92b5c93a9bd81b67aac27b4eca1 Mon Sep 17 00:00:00 2001 From: Razz4780 Date: Tue, 7 Jan 2025 16:59:34 +0100 Subject: [PATCH 6/6] Fixed poetry in E2E --- test-workspace/pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/test-workspace/pyproject.toml b/test-workspace/pyproject.toml index f2f15fe0..5db9ebf1 100644 --- a/test-workspace/pyproject.toml +++ b/test-workspace/pyproject.toml @@ -4,6 +4,7 @@ version = "0.1.0" description = "" authors = [""] readme = "README.md" +package-mode = false [tool.poetry.dependencies] python = "^3.11"