From f3825292bd89d9e9b4cc52167a574d79c1e00c67 Mon Sep 17 00:00:00 2001 From: Nicolas QUINQUENEL Date: Fri, 27 Dec 2024 15:05:35 +0100 Subject: [PATCH] SLI-1790 Promote SQC free plan inside the IDE extensions --- .../config/global/wizard/ServerStep.form | 20 ++----------------- .../config/global/wizard/ServerStep.java | 18 +++-------------- .../documentation/SonarLintDocumentation.kt | 3 +-- .../SonarLintProjectNotifications.kt | 2 +- .../intellij/telemetry/LinkTelemetry.kt | 6 ++---- .../sonarlint/intellij/util/HelpLabelUtils.kt | 2 +- .../SonarLintDocumentationTests.kt | 1 - 7 files changed, 10 insertions(+), 42 deletions(-) diff --git a/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.form b/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.form index f7c2382bb2..458f4efa3a 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.form +++ b/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.form @@ -121,17 +121,9 @@ - - - - - - - - - + @@ -150,7 +142,7 @@ - + @@ -194,14 +186,6 @@ - - - - - - - - diff --git a/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.java b/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.java index c842163793..33df1e9ade 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.java +++ b/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.java @@ -48,9 +48,7 @@ import org.sonarlint.intellij.telemetry.LinkTelemetry; import static org.sonarlint.intellij.common.util.SonarLintUtils.SONARCLOUD_URL; -import static org.sonarlint.intellij.telemetry.LinkTelemetry.COMPARE_SERVER_PRODUCTS; -import static org.sonarlint.intellij.telemetry.LinkTelemetry.SONARCLOUD_PRODUCT_PAGE; -import static org.sonarlint.intellij.telemetry.LinkTelemetry.SONARQUBE_EDITIONS_DOWNLOADS; +import static org.sonarlint.intellij.telemetry.LinkTelemetry.SONARCLOUD_FREE_SIGNUP_PAGE; public class ServerStep extends AbstractWizardStepEx { private static final int NAME_MAX_LENGTH = 50; @@ -70,8 +68,6 @@ public class ServerStep extends AbstractWizardStepEx { private JButton proxyButton; private JEditorPane sonarQubeDescription; private JEditorPane sonarCloudDescription; - private JEditorPane sonarCloudFree; - private JEditorPane sonarQubeFree; private JEditorPane compareProducts; private ErrorPainter errorPainter; @@ -101,14 +97,8 @@ protected void textChanged(DocumentEvent e) { "and extends the CI/CD workflow to systematically help developers and organizations deliver Clean Code."; sonarCloudDescription.setText(cloudMainText); - initEditorPane(sonarCloudFree, "SonarQube Cloud is entirely free for open source projects", - SONARCLOUD_PRODUCT_PAGE); - - initEditorPane(sonarQubeFree, "SonarQube Server offers a free Community Build", - SONARQUBE_EDITIONS_DOWNLOADS); - - initEditorPane(compareProducts, "Discover which option is the best for your team here", - COMPARE_SERVER_PRODUCTS); + initEditorPane(compareProducts, "Explore SonarQube Cloud with our free tier", + SONARCLOUD_FREE_SIGNUP_PAGE); if (!editing) { sonarqubeIcon.addMouseListener(new MouseInputAdapter() { @@ -274,8 +264,6 @@ private void createUIComponents() { sonarqubeText = SwingHelper.createHtmlViewer(false, null, null, null); sonarQubeDescription = SwingHelper.createHtmlViewer(false, null, null, null); sonarCloudDescription = SwingHelper.createHtmlViewer(false, null, null, null); - sonarCloudFree = SwingHelper.createHtmlViewer(false, null, null, null); - sonarQubeFree = SwingHelper.createHtmlViewer(false, null, null, null); compareProducts = SwingHelper.createHtmlViewer(false, null, null, null); var text = new JBTextField(); diff --git a/src/main/java/org/sonarlint/intellij/documentation/SonarLintDocumentation.kt b/src/main/java/org/sonarlint/intellij/documentation/SonarLintDocumentation.kt index 1558e666a6..14cc2fe628 100644 --- a/src/main/java/org/sonarlint/intellij/documentation/SonarLintDocumentation.kt +++ b/src/main/java/org/sonarlint/intellij/documentation/SonarLintDocumentation.kt @@ -47,10 +47,9 @@ object SonarLintDocumentation { object Marketing { private const val BASE_MARKETING_URL = "https://www.sonarsource.com" - const val COMPARE_SERVER_PRODUCTS_LINK = "$BASE_MARKETING_URL/open-source-editions" const val SONARQUBE_EDITIONS_DOWNLOADS_LINK = "$BASE_MARKETING_URL/products/sonarqube/downloads" const val SONARCLOUD_PRODUCT_LINK = "$BASE_MARKETING_URL/products/sonarcloud" - const val SONARCLOUD_PRODUCT_SIGNUP_LINK = "$BASE_MARKETING_URL/products/sonarcloud/signup/" + const val SONARCLOUD_PRODUCT_SIGNUP_LINK = "$BASE_MARKETING_URL/products/sonarcloud/signup-free/" } } diff --git a/src/main/java/org/sonarlint/intellij/notifications/SonarLintProjectNotifications.kt b/src/main/java/org/sonarlint/intellij/notifications/SonarLintProjectNotifications.kt index 6d8036bd93..484b5c138d 100644 --- a/src/main/java/org/sonarlint/intellij/notifications/SonarLintProjectNotifications.kt +++ b/src/main/java/org/sonarlint/intellij/notifications/SonarLintProjectNotifications.kt @@ -125,7 +125,7 @@ class SonarLintProjectNotifications(private val myProject: Project) { content, NotificationType.INFORMATION ).apply { - addAction(OpenTrackedLinkAction("Try SonarQube Cloud for free", LinkTelemetry.SONARCLOUD_SIGNUP_PAGE)) + addAction(OpenTrackedLinkAction("Try SonarQube Cloud for free", LinkTelemetry.SONARCLOUD_FREE_SIGNUP_PAGE)) addAction(OpenTrackedLinkAction("Download SonarQube Server", LinkTelemetry.SONARQUBE_EDITIONS_DOWNLOADS)) addAction(OpenInBrowserAction("Learn more", null, CONNECTED_MODE_BENEFITS_LINK)) addAction(DontAskAgainAction()) diff --git a/src/main/java/org/sonarlint/intellij/telemetry/LinkTelemetry.kt b/src/main/java/org/sonarlint/intellij/telemetry/LinkTelemetry.kt index 2e9f875f3b..6edbe66e7a 100644 --- a/src/main/java/org/sonarlint/intellij/telemetry/LinkTelemetry.kt +++ b/src/main/java/org/sonarlint/intellij/telemetry/LinkTelemetry.kt @@ -25,15 +25,13 @@ import org.sonarlint.intellij.documentation.SonarLintDocumentation import org.sonarlint.intellij.documentation.SonarLintDocumentation.Intellij.RULE_SECTION_LINK enum class LinkTelemetry( - val linkId: String, + private val linkId: String, val url: String ) { - SONARCLOUD_SIGNUP_PAGE("sonarCloudSignUpPage", SonarLintDocumentation.Marketing.SONARCLOUD_PRODUCT_SIGNUP_LINK), + SONARCLOUD_FREE_SIGNUP_PAGE("sonarqubeCloudFreeSignUp", SonarLintDocumentation.Marketing.SONARCLOUD_PRODUCT_SIGNUP_LINK), CONNECTED_MODE_DOCS("connectedModeDocs", SonarLintDocumentation.Intellij.CONNECTED_MODE_LINK), - COMPARE_SERVER_PRODUCTS("compareServerProducts", SonarLintDocumentation.Marketing.COMPARE_SERVER_PRODUCTS_LINK), SONARQUBE_EDITIONS_DOWNLOADS("sonarQubeEditionsDownloads", SonarLintDocumentation.Marketing.SONARQUBE_EDITIONS_DOWNLOADS_LINK), - SONARCLOUD_PRODUCT_PAGE("sonarCloudProductPage", SonarLintDocumentation.Marketing.SONARCLOUD_PRODUCT_LINK), RULE_SELECTION_PAGE("rulesSelectionDocs", RULE_SECTION_LINK); fun browseWithTelemetry() { diff --git a/src/main/java/org/sonarlint/intellij/util/HelpLabelUtils.kt b/src/main/java/org/sonarlint/intellij/util/HelpLabelUtils.kt index 6aaf66afc0..afdd8a0307 100644 --- a/src/main/java/org/sonarlint/intellij/util/HelpLabelUtils.kt +++ b/src/main/java/org/sonarlint/intellij/util/HelpLabelUtils.kt @@ -31,7 +31,7 @@ class HelpLabelUtils { "SonarQube Cloud complements SonarQube for IDE by detecting more across the whole project.", "Try SonarQube Cloud for free", true ) { - LinkTelemetry.SONARCLOUD_SIGNUP_PAGE.browseWithTelemetry() + LinkTelemetry.SONARCLOUD_FREE_SIGNUP_PAGE.browseWithTelemetry() } @JvmStatic diff --git a/src/test/java/org/sonarlint/intellij/documentation/SonarLintDocumentationTests.kt b/src/test/java/org/sonarlint/intellij/documentation/SonarLintDocumentationTests.kt index f64da26966..803f5214a8 100644 --- a/src/test/java/org/sonarlint/intellij/documentation/SonarLintDocumentationTests.kt +++ b/src/test/java/org/sonarlint/intellij/documentation/SonarLintDocumentationTests.kt @@ -61,7 +61,6 @@ class SonarLintDocumentationTests { SonarLintDocumentation.SonarCloud.SMART_NOTIFICATIONS, - SonarLintDocumentation.Marketing.COMPARE_SERVER_PRODUCTS_LINK, SonarLintDocumentation.Marketing.SONARQUBE_EDITIONS_DOWNLOADS_LINK, SonarLintDocumentation.Marketing.SONARCLOUD_PRODUCT_LINK, SonarLintDocumentation.Marketing.SONARCLOUD_PRODUCT_SIGNUP_LINK,