Skip to content

Commit 2dc53a5

Browse files
chalintiffany76
andauthored
Add Kapa assistant in-page button (#9651)
Co-authored-by: Tiffany Hrabusa <30397949+tiffany76@users.noreply.github.com>
1 parent 8f304ea commit 2dc53a5

File tree

4 files changed

+26
-16
lines changed

4 files changed

+26
-16
lines changed

assets/scss/_styles_project.scss

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Docsy-delta full file override: we're not tracking changes to the Docsy file of the same name. */
2-
// cSpell:ignore docsy
2+
// cSpell:ignore docsy kapa
33

44
@import 'registry';
55
@import 'tabs';
@@ -60,3 +60,14 @@ body.td-page--draft .td-content {
6060
padding-left: 0.6rem;
6161
}
6262
}
63+
64+
// Kapa widget
65+
66+
#kapa-widget-container {
67+
--modal-inner-align: flex-end !important;
68+
}
69+
70+
// Alternative to the above:
71+
// #kapa-widget-container::part(modal-inner) {
72+
// align-items: flex-end !important;
73+
// }

i18n/en.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,9 @@ community_guideline: Contributing
1919
ui_search_ai_modal_title: OpenTelemetry's AI Assistant
2020

2121
ui_search_ai_modal_disclaimer: >-
22-
This **experimental feature** uses AI to answer questions based on the site's
23-
documentation, OpenTelemetry GitHub, Stack Overflow, and other resources. The
24-
AI may not always provide accurate or relevant information. Share your
25-
thoughts by providing
26-
[feedback](https://github.com/open-telemetry/opentelemetry.io/discussions/6802).
22+
Get answers based on the site docs, OpenTelemetry GitHub, Stack Overflow, and
23+
other resources. [Share
24+
feedback](https://github.com/open-telemetry/opentelemetry.io/discussions/6802).
2725
ui_search_ai_popover_content: >-
2826
<a id='ask-ai-trigger' href='#'>Ask AI</a> (&#x2318;-K)
2927

layouts/_partials/hooks/head-end.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@
3232
data-website-id="2b645d39-e001-4c2b-bfbd-aa4f25453385"
3333
data-project-name="OpenTelemetry"
3434
data-project-color="#f5a800"
35-
data-project-logo="https://opentelemetry.io/img/logos/opentelemetry-logo-nav.png"
36-
data-button-hide="true"
35+
data-project-logo="{{ "img/logos/opentelemetry-logo-nav.png" | relURL }}"
3736
data-modal-open-on-command-k="true"
3837
data-modal-override-open-id="ask-ai-trigger"
39-
data-modal-border-radius="8px"
40-
data-modal-header-bg-color="#4f62ad"
41-
data-modal-title='{{ T "ui_search_ai_modal_title" }}'
42-
data-modal-title-color="#ffffff"
43-
data-modal-body-bg-color="#ffffff"
44-
data-query-input-border-color="#f5a800"
45-
data-modal-disclaimer="{{ T "ui_search_ai_modal_disclaimer" }}"
46-
data-font-family="system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif">
38+
data-chat-disclaimer="{{ T "ui_search_ai_modal_disclaimer" }}"
39+
data-example-questions="What is OpenTelemetry?,How can I instrument my app?"
40+
data-user-analytics-fingerprint-enabled="true"
41+
data-modal-size="80%"
42+
data-launcher-button-image="{{ "img/logos/opentelemetry-icon-white.svg" | relURL }}"
43+
xx-DISABLED-data-launcher-button-text=""
44+
xx-DOES-NOT-WORK-data-launcher-button-font-size="1rem"
45+
data-font-size-lg="1rem"
46+
>
4747
</script>
4848
{{/* */ -}}
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)