Skip to content

Commit ec901d3

Browse files
committed
feat: open doc links in new tab in case of drawers/modals
1 parent 5cddc4b commit ec901d3

File tree

10 files changed

+16
-7
lines changed

10 files changed

+16
-7
lines changed

src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/SelectMergeStrategy.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const SelectMergeStrategy = ({
103103
{PatchStrategyTooltipInfo && <PatchStrategyTooltipInfo />}
104104
</OverrideStrategyTippyContent>
105105
}
106-
documentationLink="HOME_PAGE"
106+
documentationLink="DOC_HOME_PAGE"
107107
/>
108108

109109
{renderContent()}

src/Pages/GlobalConfigurations/DeploymentCharts/List/UploadChartModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ const UploadChartModal = ({ closeUploadPopup }: UploadChartModalType) => {
206206
docLinkKey="GLOBAL_CONFIG_CUSTOM_CHART_PRE_REQUISITES"
207207
text="View documentation"
208208
dataTestId="learn-more-about-custom-chart-pre-requisites-link"
209+
openInNewTab
209210
/>
210211
</div>
211212
</div>

src/components/CIPipelineN/PluginDetailHeader/PluginDetailHeader.component.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ const PluginDetailHeader = ({ handlePluginVersionChange }: PluginDetailHeaderPro
111111
interactive
112112
documentationLink={docLink as keyof typeof DOCUMENTATION}
113113
documentationLinkText="View documentation"
114-
isExternalLink
114+
isExternalLink={stepType !== PluginType.INLINE}
115+
openInNewTab
115116
>
116117
<button
117118
type="button"

src/components/CIPipelineN/Sidebar.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ export const Sidebar = ({
454454
docLinkKey={helpData.docLink}
455455
text={helpData.helpText}
456456
dataTestId="learn-more-about-ci-pipeline-workflow-editor-link"
457+
openInNewTab
457458
/>
458459
</div>
459460
)}

src/components/ciConfig/CIBuildpackBuildOptions.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ const BuilderTippy = () => {
160160
documentationLinkText={CI_BUILDPACK_OPTION_TEXTS.BuilderTippyContent.documentationLinkText}
161161
documentationLink="APP_CI_CONFIG_BUILD_WITHOUT_DOCKER"
162162
iconClassName="icon-dim-16 fcn-6 ml-4"
163+
openInNewTab
163164
/>
164165
)
165166
}

src/components/ciPipeline/Webhook/WebhookDetailsModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@ export const WebhookDetailsModal = ({ close, isTemplateView }: WebhookDetailType
477477
docLinkKey="GLOBAL_CONFIG_API_TOKEN"
478478
text="How to generate API tokens?"
479479
dataTestId="learn-more-about-generating-api-tokens"
480+
openInNewTab
480481
/>
481482
)
482483
}

src/components/cluster/ClusterInfoStepsModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ export default function ClusterInfoStepsModal({ subTitle, command, clusterName }
107107
text="View documentation"
108108
dataTestId="cluster-info-step-view-documentation"
109109
showExternalIcon
110+
openInNewTab
110111
/>
111112
</div>
112113
</div>

src/components/common/SidePanel/SidePanelDocumentation.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ export const SidePanelDocumentation = ({ onClose }: SidePanelDocumentationProps)
2525
<h2 className="m-0 fs-16 lh-1-5 fw-6 cn-9 flex-grow-1">Documentation</h2>
2626
<div className="flex dc__gap-8">
2727
<Button
28-
dataTestId="side-doc-open-link"
29-
ariaLabel="side-doc-open-link"
30-
showAriaLabelInTippy={false}
28+
dataTestId="open-in-new-tab-button"
29+
ariaLabel="Open in new tab"
3130
icon={<Icon name="ic-arrow-square-out" color={null} />}
3231
variant={ButtonVariantType.borderLess}
3332
style={ButtonStyleType.neutral}
@@ -38,8 +37,8 @@ export const SidePanelDocumentation = ({ onClose }: SidePanelDocumentationProps)
3837
}}
3938
/>
4039
<Button
41-
dataTestId="side-doc-close-btn"
42-
ariaLabel="side-doc-close-btn"
40+
dataTestId="close-side-panel-button"
41+
ariaLabel="close-side-panel-button"
4342
showAriaLabelInTippy={false}
4443
icon={<Icon name="ic-close-large" color={null} />}
4544
variant={ButtonVariantType.borderLess}
@@ -58,6 +57,8 @@ export const SidePanelDocumentation = ({ onClose }: SidePanelDocumentationProps)
5857
src={`${docLink}&theme=${appTheme}`}
5958
width="100%"
6059
height="100%"
60+
sandbox="allow-same-origin allow-scripts"
61+
referrerPolicy="no-referrer"
6162
/>
6263
)}
6364
</div>

src/components/gitOps/UpdateConfirmationDialog.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ const UpdateConfirmationDialog = ({
7979
docLinkKey="GLOBAL_CONFIG_GITOPS"
8080
text="Know more"
8181
dataTestId="know-more-about-git-ops-link"
82+
fullWidth={false}
8283
/>
8384
</p>
8485

src/components/v2/appDetails/k8Resource/nodeDetail/EphemeralContainerDrawer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ const EphemeralContainerDrawer = ({
187187
iconClassName="icon-dim-20 fcn-6 ml-8"
188188
documentationLink="APP_EPHEMERAL_CONTAINER"
189189
documentationLinkText="View Documentation"
190+
openInNewTab
190191
/>
191192
</h2>
192193
<button

0 commit comments

Comments
 (0)