diff options
author | Mathieu Suen <mathieu.suen@sonarsource.com> | 2024-05-16 12:01:37 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-05-17 20:02:38 +0000 |
commit | b00382ce3a439ee4bf1048e5cc62a845f486a3b0 (patch) | |
tree | 4423feb856de8b513fda66027dc1a6e5b02909c5 | |
parent | b9b4b8d2c81bc61aa1957df729ca05fc8428fd45 (diff) | |
download | sonarqube-b00382ce3a439ee4bf1048e5cc62a845f486a3b0.tar.gz sonarqube-b00382ce3a439ee4bf1048e5cc62a845f486a3b0.zip |
SONAR-22148 Fixes cayc tour on branch overview
4 files changed, 11 insertions, 5 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/branches/BranchOverviewRenderer.tsx b/server/sonar-web/src/main/js/apps/overview/branches/BranchOverviewRenderer.tsx index 6021e0ec732..02e6df25a08 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/BranchOverviewRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/BranchOverviewRenderer.tsx @@ -199,7 +199,7 @@ export default function BranchOverviewRenderer(props: BranchOverviewRendererProp <div> {branch && ( <> - {currentUser.isLoggedIn && ( + {currentUser.isLoggedIn && hasNewCodeMeasures && ( <PromotedSection content={translate('overview.promoted_section.content')} dismissed={dismissedTour ?? false} @@ -217,7 +217,9 @@ export default function BranchOverviewRenderer(props: BranchOverviewRendererProp branch={branch} component={component} measures={measures} - showTakeTheTourButton={dismissedTour && currentUser.isLoggedIn} + showTakeTheTourButton={ + dismissedTour && currentUser.isLoggedIn && hasNewCodeMeasures + } startTour={startTourGuide} /> <BasicSeparator /> diff --git a/server/sonar-web/src/main/js/apps/overview/branches/TabsPanel.tsx b/server/sonar-web/src/main/js/apps/overview/branches/TabsPanel.tsx index c699725ca81..72b3839f8a2 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/TabsPanel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/TabsPanel.tsx @@ -155,7 +155,10 @@ export function TabsPanel(props: React.PropsWithChildren<MeasuresPanelProps>) { value={isNewCode ? CodeScope.New : CodeScope.Overall} > {isNewCode && leakPeriod && ( - <LightLabel className="sw-body-sm sw-flex sw-items-center sw-mr-6"> + <LightLabel + className="sw-body-sm sw-flex sw-items-center sw-mr-6 sw-pl-4" + data-spotlight-id="cayc-promotion-2" + > <span className="sw-mr-1">{translate('overview.new_code')}:</span> <LeakPeriodInfo leakPeriod={leakPeriod} /> </LightLabel> diff --git a/server/sonar-web/src/main/js/apps/overview/components/LastAnalysisLabel.tsx b/server/sonar-web/src/main/js/apps/overview/components/LastAnalysisLabel.tsx index 22bd24d7b98..5fcb961d0f3 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/LastAnalysisLabel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/LastAnalysisLabel.tsx @@ -30,7 +30,7 @@ export default function LastAnalysisLabel({ analysisDate }: Readonly<Props>) { const intl = useIntl(); return analysisDate ? ( - <span className="sw-pl-4" data-spotlight-id="cayc-promotion-2"> + <span> {intl.formatMessage( { id: 'overview.last_analysis_x', diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index 824f1bf2c0b..205669841b6 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -110,6 +110,7 @@ got_it=Got it help=Help here=here hide=Hide +ide=IDE inactive=Inactive info=Info issue=Issue @@ -4090,7 +4091,7 @@ guiding.cayc_promotion.3.title=Green is clean guiding.cayc_promotion.3.content.1=Quality Gate Status tells you if your new code is clean or not. Keep it green as often as possible, and your project will always be production-ready. guiding.cayc_promotion.4.title=Clean at all levels guiding.cayc_promotion.4.content.1=With SonarLint, clean code as you write it in your {value}. -guiding.cayc_promotion.4.content.2=When a feature is ready, analyze your {value} and make sure no issue is missed. +guiding.cayc_promotion.4.content.2=When a feature is ready, analyze your {value} (commercial edition only) and make sure no issue is missed. guiding.cayc_promotion.4.content.3=Finally, rely on a thorough {value} analysis to ensure the new code is clean. guiding.replay_tour_button.1.title=Replay tour guiding.replay_tour_button.tour_completed.1.title=Tour complete! |