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-1788 SLI-1784 SLI-1796 Create Walkthrough for SonarQube for IDE #1280

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

eray-felek-sonarsource
Copy link
Contributor

@eray-felek-sonarsource eray-felek-sonarsource commented Jan 7, 2025

4 Page walkthrough the let user get familiar with the SonarQube IDE functionalities

@eray-felek-sonarsource eray-felek-sonarsource changed the title Feature/ef/sli 1784 SLI-1788 SLI-1784 SLI-1796 Create Walkthrough for SonarQube for IDE Jan 9, 2025
Copy link

Choose a reason for hiding this comment

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

The SonarLintWalkthroughToolWindow file is huge and very hard to follow, and I feel like has lots of duplications. I would suggest to either deduplicate common logic and object creations by extracting them to methods, or separate each walkthrough step in a separate file.

I also added some suggestions about wording and capitalization.

var connectWithYourTeamPage = new JPanel(new BorderLayout());
var reachOutToUsPage = new JPanel(new BorderLayout());

var icon = new ImageIcon(Objects.requireNonNull(getClass().getResource("/images/sonarqube-for-ide-mark.png")));

Choose a reason for hiding this comment

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

Just making sure this will look good in both, light and dark mode?

Copy link
Member

Choose a reason for hiding this comment

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

Also, please add all icons to the SonarLintIcons utility class

var learnAsYouCodeStepLabel = new JLabel("Step 2/4", SwingConstants.LEFT);
learnAsYouCodeStepLabel.setFont(new Font(FONT, Font.PLAIN, 14));

var learnAsYouCodePageLabel = new JLabel("Learn as you code");

Choose a reason for hiding this comment

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

Suggested change
var learnAsYouCodePageLabel = new JLabel("Learn as you code");
var learnAsYouCodePageLabel = new JLabel("Learn as You Code");

welcomePageScrollPane.setBorder(null);
welcomePageScrollPane.setPreferredSize(new Dimension(70, 100));

var welcomePageNextButton = new JButton("Next: Learn as you code");

Choose a reason for hiding this comment

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

Suggested change
var welcomePageNextButton = new JButton("Next: Learn as you code");
var welcomePageNextButton = new JButton("Next: Learn as You Code");

Choose a reason for hiding this comment

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

Button labels should have title-case capitalization

learnAsYouCodeScrollPane.setPreferredSize(new Dimension(70, 100));

var learnAsYouCodePageBackButton = new JButton(PREVIOUS);
var learnAsYouCodePageNextButton = new JButton("Next: Connect with your team");

Choose a reason for hiding this comment

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

Suggested change
var learnAsYouCodePageNextButton = new JButton("Next: Connect with your team");
var learnAsYouCodePageNextButton = new JButton("Next: Connect with Your Team");


var connectWithYourTeamStepLabel = new JLabel("Step 3/4", SwingConstants.LEFT);
connectWithYourTeamStepLabel.setFont(new Font(FONT, Font.PLAIN, 14));
var connectWithYourTeamLabel = new JLabel("Connect with your team");

Choose a reason for hiding this comment

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

Page titles and button labels should be in Title Case, I think.

Suggested change
var connectWithYourTeamLabel = new JLabel("Connect with your team");
var connectWithYourTeamLabel = new JLabel("Connect with Your Team");

SONARQUBE_FOR_IDE + " supports the analysis of 15+ languages including Python, Java, Javascript, IaC domains along with secrets " +
"detection. " +
"<a href=\"" + RULE_SECTION_LINK + "\">Learn more</a>.<br><br>" +
"Detect issues while you code in an open files or run the analysis on more file in the <a href=\"#reportView\">report view</a>" +

Choose a reason for hiding this comment

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

Suggested change
"Detect issues while you code in an open files or run the analysis on more file in the <a href=\"#reportView\">report view</a>" +
"Detect issues in open files while you code, or run the analysis of more files from the <a href=\"#reportView\">Report view</a>" +

"<a href=\"" + RULE_SECTION_LINK + "\">Learn more</a>.<br><br>" +
"Detect issues while you code in an open files or run the analysis on more file in the <a href=\"#reportView\">report view</a>" +
".<br><br>" +
"Open a file and start your clean code journey.</body></html>");

Choose a reason for hiding this comment

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

Suggested change
"Open a file and start your clean code journey.</body></html>");
"Open a file and start your Clean Code journey.</body></html>");

"Apply the same set of rules as your team by using " + SONARQUBE_FOR_IDE + " in Connected Mode with SonarQube Cloud or SonarQube " +
"Server" +
".<br><br>" +
"With connected mode, benefit from advanced analysis like <a href=\"#taintVulnerabilities\">Taint Vulnerabilities</a> and open " +

Choose a reason for hiding this comment

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

Suggested change
"With connected mode, benefit from advanced analysis like <a href=\"#taintVulnerabilities\">Taint Vulnerabilities</a> and open " +
"With Connected Mode, benefit from advanced analysis like <a href=\"#taintVulnerabilities\">Taint Vulnerabilities</a> and open " +

"Server" +
".<br><br>" +
"With connected mode, benefit from advanced analysis like <a href=\"#taintVulnerabilities\">Taint Vulnerabilities</a> and open " +
"issues and <a href=\"#aiFixSuggestions\">AI fix suggestions</a> from SonarQube Server or Cloud in the IDE.<br><br>" +

Choose a reason for hiding this comment

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

Suggested change
"issues and <a href=\"#aiFixSuggestions\">AI fix suggestions</a> from SonarQube Server or Cloud in the IDE.<br><br>" +
"issues and <a href=\"#aiFixSuggestions\">AI fix suggestions</a> from SonarQube (Server, Cloud) in the IDE.<br><br>" +

".<br><br>" +
"With connected mode, benefit from advanced analysis like <a href=\"#taintVulnerabilities\">Taint Vulnerabilities</a> and open " +
"issues and <a href=\"#aiFixSuggestions\">AI fix suggestions</a> from SonarQube Server or Cloud in the IDE.<br><br>" +
"Already using SonarQube Cloud or Server? <a href=\"#setupConnection\">Set up a connection</a>.</body></html>");

Choose a reason for hiding this comment

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

Suggested change
"Already using SonarQube Cloud or Server? <a href=\"#setupConnection\">Set up a connection</a>.</body></html>");
"Already using SonarQube (Cloud, Server)? <a href=\"#setupConnection\">Set up a Connection</a>.</body></html>");

Copy link
Member

@thahnen thahnen left a comment

Choose a reason for hiding this comment

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

I second Sophio here that this needs some de-duplication and documentation as well.

var connectWithYourTeamPage = new JPanel(new BorderLayout());
var reachOutToUsPage = new JPanel(new BorderLayout());

var icon = new ImageIcon(Objects.requireNonNull(getClass().getResource("/images/sonarqube-for-ide-mark.png")));
Copy link
Member

Choose a reason for hiding this comment

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

Also, please add all icons to the SonarLintIcons utility class

}
}
} else if ("#communityForum".equals(e.getDescription())) {
BrowserUtil.browse("https://community.sonarsource.com/c/sl/fault/6");
Copy link
Member

Choose a reason for hiding this comment

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

You should add this link to the SonarLintDocumentation utility class

Copy link

Quality Gate failed Quality Gate failed

Failed conditions
4 New issues

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarQube IDE SonarQube IDE

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.

3 participants