Skip to content

Commit db995fa

Browse files
authored
add privacy disclaimer to AI Search overlay (#55051)
1 parent 26c96c4 commit db995fa

File tree

4 files changed

+47
-19
lines changed

4 files changed

+47
-19
lines changed

data/ui.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ search:
4343
view_all_search_results: View more results
4444
no_results_found: No results found
4545
search_docs_with_query: Search docs for "{{query}}"
46+
privacy_disclaimer: For product and service improvement purposes, the GitHub Docs team will retain questions and answers generated in the Docs search function. Please see the <a href="https://docs.github.com/privacy">GitHub Privacy Statement</a> to review how GitHub collects and uses your data.
4647
ai:
4748
disclaimer: Copilot uses AI. Check for mistakes by reviewing the links in the response.
4849
references: References from these articles

src/fixtures/fixtures/data/ui.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ search:
4343
view_all_search_results: View more results
4444
no_results_found: No results found
4545
search_docs_with_query: Search docs for "{{query}}"
46+
privacy_disclaimer: For product and service improvement purposes, the GitHub Docs team will retain questions and answers generated in the Docs search function. Please see the <a href="https://docs.github.com/privacy">GitHub Privacy Statement</a> to review how GitHub collects and uses your data.
4647
ai:
4748
disclaimer: Copilot uses AI. Check for mistakes by reviewing the links in the response.
4849
references: References from these articles

src/search/components/input/SearchOverlay.module.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@
7373
color: var(--fgColor-success, var(--fgColor-open, green)) !important;
7474
background-color: var(--overlay-bgColor);
7575
margin-right: 1em;
76+
height: 22px !important;
77+
font-weight: 700 !important;
78+
border-color: unset !important;
7679
}
7780

7881
.loadingContainer {

src/search/components/input/SearchOverlay.tsx

Lines changed: 42 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
Overlay,
1010
Spinner,
1111
Stack,
12+
Text,
1213
TextInput,
1314
Token,
1415
} from '@primer/react'
@@ -691,28 +692,50 @@ export function SearchOverlay({
691692
}}
692693
/>
693694
<footer key="description" className={styles.footer}>
694-
<Token
695-
as="span"
696-
text="Beta"
697-
className={styles.betaToken}
695+
<Box
698696
sx={{
699-
backgroundColor: 'var(--overlay-bg-color)',
697+
display: 'flex',
698+
alignContent: 'start',
699+
alignItems: 'start',
700700
}}
701-
/>
702-
<Link
703-
onClick={async () => {
704-
if (await getIsStaff()) {
705-
// Hubbers users use an internal discussion for feedback
706-
window.open('https://github.com/github/docs-engineering/discussions/5295', '_blank')
707-
} else {
708-
// TODO: On ship date set this value
709-
// window.open('TODO', '_blank')
710-
}
711-
}}
712-
as="button"
713701
>
714-
{t('search.overlay.give_feedback')}
715-
</Link>
702+
<Token
703+
as="span"
704+
text="Beta"
705+
className={styles.betaToken}
706+
sx={{
707+
backgroundColor: 'var(--overlay-bg-color)',
708+
}}
709+
/>
710+
<Link
711+
onClick={async () => {
712+
if (await getIsStaff()) {
713+
// Hubbers users use an internal discussion for feedback
714+
window.open(
715+
'https://github.com/github/docs-engineering/discussions/5295',
716+
'_blank',
717+
)
718+
} else {
719+
// TODO: On ship date set this value
720+
// window.open('TODO', '_blank')
721+
}
722+
}}
723+
as="button"
724+
>
725+
{t('search.overlay.give_feedback')}
726+
</Link>
727+
</Box>
728+
<Text
729+
as="p"
730+
sx={{
731+
// eslint-disable-next-line primer-react/new-color-css-vars
732+
color: 'var(--color-fg-muted)',
733+
marginTop: 2,
734+
marginBottom: 0,
735+
fontSize: 'small',
736+
}}
737+
dangerouslySetInnerHTML={{ __html: t('search.overlay.privacy_disclaimer') }}
738+
/>
716739
</footer>
717740
</Overlay>
718741
</>

0 commit comments

Comments
 (0)