Skip to content

Commit b94e97d

Browse files
mrCherry97OliwiaGowormmitoraj
authored
feat: Add AI banner (#3986)
* feat: Add AI banner * move FeatureCard to components and move BannerCarousel * remove AI banner and adjust cluster overview * move types to separate file * add feedback link and onclicks on banner buttons * move texts to translations * move ai banner to ai directory * add icon for the meet joule title * add feedback links to all configs * adjust texts in svgs and banner * add test for AI banner * add test for AI banner * add test for AI banner * localy it is passing * adjust useFeature * adjust Joule Icon in Disclaimer * Update tests/integration/tests/companion/test-companion-ui.spec.js Co-authored-by: Oliwia Gowor <72342415+OliwiaGowor@users.noreply.github.com> * adjust margin to top * Update public/i18n/en.yaml Co-authored-by: Małgorzata Świeca <malgorzata.swieca@sap.com> * adjust test --------- Co-authored-by: Oliwia Gowor <72342415+OliwiaGowor@users.noreply.github.com> Co-authored-by: Małgorzata Świeca <malgorzata.swieca@sap.com>
1 parent 452b74c commit b94e97d

File tree

29 files changed

+772
-158
lines changed

29 files changed

+772
-158
lines changed

kyma/environments/dev/config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ config:
7070
isEnabled: false
7171
KYMA_COMPANION:
7272
isEnabled: true
73+
config:
74+
feedbackLink: https://www.youtube.com/watch?v=dQw4w9WgXcQ
7375
TRACKING:
7476
isEnabled: false
7577
GARDENER_LOGIN:

kyma/environments/prod/config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ config:
7373
isEnabled: false
7474
KYMA_COMPANION:
7575
isEnabled: false
76+
config:
77+
feedbackLink: ''
7678
GARDENER_LOGIN:
7779
isEnabled: false
7880
kubeconfig: null

kyma/environments/stage/config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ config:
7171
isEnabled: false
7272
KYMA_COMPANION:
7373
isEnabled: false
74+
config:
75+
feedbackLink: https://sapinsights.eu.qualtrics.com/jfe/form/SV_dmWATTfes5SstG6
7476
GARDENER_LOGIN:
7577
isEnabled: false
7678
kubeconfig: null

public/defaultConfig.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ config:
5454
isEnabled: false
5555
KYMA_COMPANION:
5656
isEnabled: false
57+
config:
58+
feedbackLink: https://sapinsights.eu.qualtrics.com/jfe/preview/previewId/1fa80b40-56c3-4b20-9902-877df3da3493/SV_dmWATTfes5SstG6?Q_CHL=preview&Q_SurveyVersionID=current
5759
TRACKING:
5860
isEnabled: false
5961
GARDENER_LOGIN:

public/i18n/en.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,12 @@ kubeconfig-id:
766766
error: "Couldn't load kubeconfig ID; configuration not changed (Error: ${{error}})"
767767
must-be-an-object: Kubeconfig must be a JSON or YAML object.
768768
kyma-companion:
769+
banner:
770+
title: Meet Joule
771+
description: Joule is your personal, contextual assistant, ready to help with all Kyma-related questions. Ask about Kyma features, Kubernetes best practices, step-by-step instructions, and more.
772+
buttons:
773+
try-joule: Try Out Joule
774+
feedback: Give Feedback
769775
name: Joule
770776
opener:
771777
use-ai: AI Companion

src/components/Clusters/views/ClusterOverview/ClusterOverview.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ import { DynamicPageComponent } from 'shared/components/DynamicPageComponent/Dyn
1818
import ClusterStats from './ClusterStats';
1919
import ClusterDetails from './ClusterDetails';
2020
import YamlUploadDialog from 'resources/Namespaces/YamlUpload/YamlUploadDialog';
21-
import BannerCarousel from 'components/Extensibility/components/FeaturedCard/BannerCarousel';
21+
import BannerCarousel from 'shared/components/FeatureCard/BannerCarousel';
2222
import { columnLayoutState } from 'state/columnLayoutAtom';
23+
import { AIBanner } from 'components/KymaCompanion/components/AIBanner/AIBanner';
2324

2425
import './ClusterOverview.scss';
2526
import { configFeaturesNames } from 'state/types';
@@ -30,6 +31,10 @@ const Injections = React.lazy(() =>
3031

3132
export function ClusterOverview() {
3233
const { t } = useTranslation();
34+
const {
35+
isEnabled: isKymaCompanionEnabled,
36+
config: companionConfig,
37+
} = useFeature(configFeaturesNames.KYMA_COMPANION);
3338
const clusterValidation = useFeature(configFeaturesNames.CLUSTER_VALIDATION);
3439
const clustersInfo = useClustersInfo();
3540
const currentCluster = clustersInfo?.currentCluster;
@@ -92,11 +97,16 @@ export function ClusterOverview() {
9297
<>
9398
<BannerCarousel
9499
children={
95-
<Injections
96-
destination="ClusterOverview"
97-
slot="banner"
98-
root=""
99-
/>
100+
<>
101+
{isKymaCompanionEnabled && (
102+
<AIBanner feedbackUrl={companionConfig?.feedbackLink} />
103+
)}
104+
<Injections
105+
destination="ClusterOverview"
106+
slot="banner"
107+
root=""
108+
/>
109+
</>
100110
}
101111
/>
102112
<Injections

src/components/Extensibility/components/FeaturedCard/assets/AI/AiIllustrationDark.svg

Lines changed: 38 additions & 30 deletions
Loading

src/components/Extensibility/components/FeaturedCard/assets/AI/AiIllustrationHCdark.svg

Lines changed: 38 additions & 25 deletions
Loading

src/components/Extensibility/components/FeaturedCard/assets/AI/AiIllustrationHClight.svg

Lines changed: 38 additions & 25 deletions
Loading

src/components/Extensibility/components/FeaturedCard/assets/AI/AiIllustrationLight.svg

Lines changed: 37 additions & 29 deletions
Loading

0 commit comments

Comments
 (0)