Skip to content

Commit

Permalink
SLVSCODE-984 adjust wording about free editions
Browse files Browse the repository at this point in the history
  • Loading branch information
sophio-japharidze-sonarsource committed Dec 23, 2024
1 parent a4bfc71 commit 64605e9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/connected/connectionsetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ const SONARQUBE_DESCRIPTION =
`An <b>open-source, self-managed</b> tool that easily integrates into the developers' CI/CD pipeline<br>
and DevOps platform to systematically help developers and organizations deliver Clean Code.
<br><br>
SonarQube offers a free <a id="sonarQubeEditionsDownloads" href="#">Community Build</a>`;
Discover which offer is better for your team <a id="sonarQubeEditionsDownloads" href="#">here</a>.`;

const SONARCLOUD_DESCRIPTION =
`A <b>Software-as-a-Service (SaaS)</b> tool that easily integrates into the cloud DevOps platforms<br>
and extends the CI/CD workflow to systematically help developers and organizations deliver Clean Code.
<br><br>
<a id="sonarCloudProductPage" href="#">SonarQube Cloud</a> is entirely free for open-source projects.`;
Explore SonarQube Cloud with our <a id="sonarqubeCloudFreeSignUp" href="#">free tier</a>.`;

const SONARQUBE_SERVER_LABEL = 'SonarQube Server';
const SONARQUBE_CLOUD_LABEL = 'SonarQube Cloud';
Expand Down Expand Up @@ -327,7 +327,7 @@ async function handleMessage(message) {
/*
* Exported for unit tests
*/
const SONARCLOUD_PRODUCT_LINK_COMMAND = 'sonarCloudProductPageLinkClick';
const SONARCLOUD_FREE_SIGNUP_LINK_COMMAND = 'sonarCloudFreeSignupPageLinkClick';
const SONARQUBE_EDITIONS_DOWNLOAD_LINK_COMMAND = 'sonarQubeEditionsDownloadsLinkClick';
const TOKEN_CHANGED_COMMAND = 'tokenChanged';

Expand All @@ -352,9 +352,9 @@ export async function handleMessageWithConnectionSettingsService(
}
saveConnection(message, connectionSettingsService);
break;
case SONARCLOUD_PRODUCT_LINK_COMMAND:
case SONARCLOUD_FREE_SIGNUP_LINK_COMMAND:
delete message.command;
vscode.commands.executeCommand(Commands.TRIGGER_HELP_AND_FEEDBACK_LINK, 'sonarCloudProductPage');
vscode.commands.executeCommand(Commands.TRIGGER_HELP_AND_FEEDBACK_LINK, 'sonarqubeCloudFreeSignUp');
break;
case SONARQUBE_EDITIONS_DOWNLOAD_LINK_COMMAND:
delete message.command;
Expand Down
9 changes: 8 additions & 1 deletion src/help/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ export const helpAndFeedbackItems: HelpAndFeedbackItem[] = [
icon: 'n/a',
viewItem: false
},
{
id: 'sonarqubeCloudFreeSignUp',
label: 'SonarQube Cloud free tier',
url: 'https://www.sonarsource.com/products/sonarcloud/signup-free/',
icon: 'n/a',
viewItem: false
},
{
id: 'sonarQubeProductPage',
label: 'SonarQube Server',
Expand All @@ -95,7 +102,7 @@ export const helpAndFeedbackItems: HelpAndFeedbackItem[] = [
{
id: 'sonarQubeEditionsDownloads',
label: 'SonarQube Server Downloads',
url: 'https://www.sonarsource.com/products/sonarqube/downloads/',
url: 'https://www.sonarsource.com/open-source-editions/',
icon: 'n/a',
viewItem: false
}
Expand Down
6 changes: 3 additions & 3 deletions webview-ui/connectionsetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function init() {
byId('token').addEventListener('keyup', onChangeToken);
byId('enableNotifications').addEventListener('change', onChangeEnableNotifications);
byId('saveConnection').addEventListener('click', onClickSaveConnection);
byId('sonarCloudProductPage')?.addEventListener('click', onClickSonarCloudProductPage);
byId('sonarqubeCloudFreeSignUp')?.addEventListener('click', onClickSonarCloudFreeSignupLink);
byId('sonarQubeEditionsDownloads')?.addEventListener('click', onClickSonarQubeDownloadsPage);
tryRestoreState();
}
Expand Down Expand Up @@ -175,8 +175,8 @@ function onClickSaveConnection() {
vscode.postMessage(saveConnectionMessage);
}

function onClickSonarCloudProductPage() {
vscode.postMessage({ command: 'sonarCloudProductPageLinkClick' });
function onClickSonarCloudFreeSignupLink() {
vscode.postMessage({ command: 'sonarCloudFreeSignupPageLinkClick' });
}

function onClickSonarQubeDownloadsPage() {
Expand Down

0 comments on commit 64605e9

Please sign in to comment.