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

SLI-1790 Promote SQC free plan inside the IDE extensions #1275

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,9 @@
<html.disable class="java.lang.Boolean" value="false"/>
</clientProperties>
</component>
<component id="6000f" class="javax.swing.JEditorPane" binding="sonarCloudFree" custom-create="true">
<constraints>
<grid row="3" column="0" row-span="1" col-span="3" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="150" height="50"/>
</grid>
</constraints>
<properties/>
</component>
</children>
</grid>
<grid id="67a8a" layout-manager="GridLayoutManager" row-count="4" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="67a8a" layout-manager="GridLayoutManager" row-count="3" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
Expand All @@ -150,7 +142,7 @@
<grid id="2a5be" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="3" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="3" anchor="1" fill="1" indent="0" use-parent-layout="false"/>
<grid row="2" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="3" anchor="1" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
Expand Down Expand Up @@ -194,14 +186,6 @@
</constraints>
<properties/>
</component>
<component id="47aa" class="javax.swing.JEditorPane" binding="sonarQubeFree" custom-create="true">
<constraints>
<grid row="2" column="0" row-span="1" col-span="3" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="150" height="50"/>
</grid>
</constraints>
<properties/>
</component>
</children>
</grid>
</children>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down Expand Up @@ -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, "<a href=\"" + SONARCLOUD_PRODUCT_PAGE.getUrl() + "\">SonarQube Cloud</a> is entirely free for open source projects",
SONARCLOUD_PRODUCT_PAGE);

initEditorPane(sonarQubeFree, "SonarQube Server offers a free <a href=\"" + SONARQUBE_EDITIONS_DOWNLOADS.getUrl() + "\">Community Build</a>",
SONARQUBE_EDITIONS_DOWNLOADS);

initEditorPane(compareProducts, "Discover which option is the best for your team <a href=\"" + COMPARE_SERVER_PRODUCTS.getUrl() + "\">here</a>",
COMPARE_SERVER_PRODUCTS);
initEditorPane(compareProducts, "Explore SonarQube Cloud with our <a href=\"" + SONARCLOUD_FREE_SIGNUP_PAGE.getUrl() + "\">free tier</a>",

Choose a reason for hiding this comment

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

I feel like we need a . at the end of the sentence. Not sure 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

Given IntelliJ guidelines: Do not put a period at the end of a single sentence, even if it is a complete sentence.

SONARCLOUD_FREE_SIGNUP_PAGE);

if (!editing) {
sonarqubeIcon.addMouseListener(new MouseInputAdapter() {
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading