Skip to content

Commit 6ab2455

Browse files
Release build 10.18.0 [ci release]
1 parent e7fdd32 commit 6ab2455

File tree

22 files changed

+361
-213
lines changed

22 files changed

+361
-213
lines changed

CHANGELOG.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
- NTP: Improve TabSwitcher hover interactions and visual design (#1853)
2-
- Update AI chat and search placeholders and add Duck.ai toggle labels in (#1852)
3-
- Fix WebKit blur event bug in omnibar components (#1851)
1+
- NTP: Address omnibar design feedback (#1860)
2+
- Fix disappearing search icon in WebKit (#1858)
3+
- Add building tips (#1807)
4+
- build(deps-dev): bump eslint from 9.31.0 to 9.32.0 in the eslint group (#1854)
5+
- build(deps-dev): bump wait-on from 8.0.3 to 8.0.4 (#1856)
6+
- build(deps-dev): bump typedoc in the typescript group (#1855)

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
* @duckduckgo/content-scope-scripts-owners
22

33
# Documentation - anyone can edit
4-
injected/docs/ *
4+
injected/docs/
55

66
# Feature owners
77
injected/src/features/fingerprinting-* @duckduckgo/content-scope-scripts-owners @jonathanKingston @englehardt

Sources/ContentScopeScripts/dist/pages/new-tab/dist/index.css

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,7 +1468,7 @@ body:not([data-platform-name]) .Button_button:active {
14681468
align-items: center;
14691469
display: flex;
14701470
flex-direction: column;
1471-
padding-bottom: calc(14px + 9px + var(--sp-7));
1471+
padding-bottom: calc(var(--sp-3) + var(--sp-7) + var(--sp-3));
14721472
}
14731473
.AiChatForm_textarea {
14741474
align-self: stretch;
@@ -1496,13 +1496,10 @@ body:not([data-platform-name]) .Button_button:active {
14961496
bottom: 0;
14971497
justify-content: space-between;
14981498
left: 0;
1499-
padding: 14px 9px 9px;
1499+
padding: var(--sp-3);
15001500
position: absolute;
15011501
right: 0;
15021502
}
1503-
.AiChatForm_hasScroll .AiChatForm_buttons {
1504-
padding-top: 9px;
1505-
}
15061503
.AiChatForm_submitButton {
15071504
align-items: center;
15081505
background: var(--color-blue-50);
@@ -1533,7 +1530,7 @@ body:not([data-platform-name]) .Button_button:active {
15331530
}
15341531
.Container_inner {
15351532
background: var(--ntp-surface-tertiary);
1536-
border-radius: 12px;
1533+
border-radius: 15px;
15371534
box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1), 0px 4px 8px 0px rgba(0, 0, 0, 0.08);
15381535
overflow: hidden;
15391536
position: relative;
@@ -1546,14 +1543,12 @@ body:not([data-platform-name]) .Button_button:active {
15461543
}
15471544
.Container_inner:not(:has([role=listbox])).Container_focusRing,
15481545
.Container_inner:not(:has([role=listbox])):focus-within:not(.Container_noFocusRing) {
1549-
border-radius: 15px;
15501546
box-shadow:
15511547
0 0 0 1px var(--ntp-surface-tertiary),
15521548
0 0 0 3px var(--ntp-color-primary),
1553-
0 0 0 7px rgba(57, 105, 239, 0.2);
1549+
0 0 0 5px rgba(57, 105, 239, 0.2);
15541550
}
15551551
.Container_inner:has([role=listbox]) {
1556-
border-radius: 15px;
15571552
box-shadow:
15581553
0 0 0 3px var(--ntp-surface-tertiary),
15591554
0px 4px 12px 3px rgba(0, 0, 0, 0.10),
@@ -1577,10 +1572,10 @@ body:not([data-platform-name]) .Button_button:active {
15771572
.SearchForm_inputContainer {
15781573
align-items: center;
15791574
display: flex;
1580-
padding: var(--sp-1);
1575+
padding: var(--sp-1) 7px;
15811576
}
15821577
.SearchForm_inputContainer svg {
1583-
flex-shrink: 0;
1578+
flex: none;
15841579
margin: var(--sp-2);
15851580
}
15861581
.SearchForm_input {
@@ -1589,13 +1584,13 @@ body:not([data-platform-name]) .Button_button:active {
15891584
color: var(--ntp-text-normal);
15901585
font-weight: 500;
15911586
height: var(--sp-8);
1592-
left: var(--sp-1);
1587+
left: 7px;
15931588
padding-bottom: 0;
15941589
padding-left: calc(var(--sp-2) + var(--sp-4) + var(--sp-2));
15951590
padding-right: var(--suffix-text-width);
15961591
padding-top: 0;
15971592
position: absolute;
1598-
right: var(--sp-1);
1593+
right: 7px;
15991594
}
16001595
.SearchForm_input::placeholder {
16011596
color: var(--ntp-text-muted);
@@ -1604,13 +1599,14 @@ body:not([data-platform-name]) .Button_button:active {
16041599
outline: none;
16051600
}
16061601
.SearchForm_suffixSpacer {
1602+
font-weight: 500;
16071603
overflow: hidden;
16081604
visibility: hidden;
1609-
white-space: pre;
1605+
white-space: nowrap;
16101606
}
16111607
.SearchForm_suffix {
16121608
color: var(--ntp-color-primary);
1613-
flex-shrink: 0;
1609+
flex: none;
16141610
}
16151611

16161612
/* pages/new-tab/app/omnibar/components/SuggestionsList.module.css */
@@ -1623,37 +1619,56 @@ body:not([data-platform-name]) .Button_button:active {
16231619
.SuggestionsList_item {
16241620
align-items: center;
16251621
background: none;
1622+
border-radius: 4px;
16261623
border: none;
16271624
color: var(--ntp-text-normal);
16281625
cursor: pointer;
16291626
display: flex;
16301627
height: var(--sp-8);
16311628
justify-content: flex-start;
1629+
padding: 0 var(--sp-2) 0 0;
16321630
}
16331631
.SuggestionsList_item svg {
1634-
flex-shrink: 0;
1632+
flex: none;
16351633
margin: var(--sp-2);
16361634
}
1637-
.SuggestionsList_item[aria-selected=true] {
1638-
background: var(--ddg-color-primary);
1639-
border-radius: 4px;
1635+
.SuggestionsList_item[aria-selected=true],
1636+
.SuggestionsList_item:active {
16401637
color: var(--color-white);
16411638
}
1642-
.SuggestionsList_item[aria-selected=true] .SuggestionsList_suffix {
1639+
:is(.SuggestionsList_item[aria-selected=true], .SuggestionsList_item:active) .SuggestionsList_suffix {
16431640
color: var(--color-white);
16441641
}
1642+
:is(.SuggestionsList_item[aria-selected=true], .SuggestionsList_item:active) .SuggestionsList_badge {
1643+
background: var(--color-white-at-30);
1644+
}
1645+
.SuggestionsList_item[aria-selected=true] {
1646+
background: var(--ddg-color-primary);
1647+
}
1648+
.SuggestionsList_item:active {
1649+
background: var(--color-blue-60);
1650+
}
16451651
.SuggestionsList_title {
1646-
white-space: pre;
1652+
flex: none;
1653+
max-width: 60%;
1654+
overflow: hidden;
1655+
text-overflow: ellipsis;
1656+
white-space: nowrap;
16471657
}
16481658
.SuggestionsList_suffix {
16491659
color: var(--ntp-text-muted);
1660+
flex: initial;
16501661
font-size: 12px;
1662+
overflow: hidden;
1663+
text-overflow: ellipsis;
1664+
white-space: nowrap;
16511665
}
16521666
.SuggestionsList_badge {
16531667
align-items: center;
16541668
background: var(--ntp-controls-raised-backdrop);
16551669
border-radius: var(--border-radius-sm);
16561670
display: flex;
1671+
flex: none;
16571672
gap: 6px;
16581673
height: 22px;
16591674
margin-left: auto;
@@ -1692,6 +1707,7 @@ body:not([data-platform-name]) .Button_button:active {
16921707
justify-content: center;
16931708
padding: 0 var(--sp-3);
16941709
position: relative;
1710+
transform: translateZ(0);
16951711
z-index: 1;
16961712
}
16971713
.TabSwitcher_tab:hover:not([aria-selected=true])::before {
@@ -1722,6 +1738,7 @@ body:not([data-platform-name]) .Button_button:active {
17221738
translate: calc(2px + var(--tab-index) * (100% + 2px));
17231739
width: calc((100% - 4px - (var(--tab-count) - 1) * 2px) / var(--tab-count));
17241740
will-change: translate;
1741+
z-index: 0;
17251742
}
17261743
[data-theme=dark] .TabSwitcher_blob {
17271744
box-shadow:

Sources/ContentScopeScripts/dist/pages/new-tab/dist/index.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7771,6 +7771,19 @@
77717771
textAreaRef.current.focus();
77727772
}
77737773
}, [autoFocus]);
7774+
_2(() => {
7775+
const textArea = textAreaRef.current;
7776+
const form = formRef.current;
7777+
if (!textArea || !form) return;
7778+
const { paddingTop, paddingBottom } = window.getComputedStyle(textArea);
7779+
textArea.style.height = "auto";
7780+
textArea.style.height = `calc(${textArea.scrollHeight}px - ${paddingTop} - ${paddingBottom})`;
7781+
if (textArea.scrollHeight > textArea.clientHeight) {
7782+
form.classList.add(AiChatForm_default.hasScroll);
7783+
} else {
7784+
form.classList.remove(AiChatForm_default.hasScroll);
7785+
}
7786+
}, [chat]);
77747787
const disabled = chat.length === 0;
77757788
const handleSubmit = (event) => {
77767789
event.preventDefault();
@@ -7799,19 +7812,6 @@
77997812
target: eventToTarget2(event, platformName)
78007813
});
78017814
};
7802-
const handleChange = (event) => {
7803-
const form = formRef.current;
7804-
const textArea = event.currentTarget;
7805-
const { paddingTop, paddingBottom } = window.getComputedStyle(textArea);
7806-
textArea.style.height = "auto";
7807-
textArea.style.height = `calc(${textArea.scrollHeight}px - ${paddingTop} - ${paddingBottom})`;
7808-
if (textArea.scrollHeight > textArea.clientHeight) {
7809-
form?.classList.add(AiChatForm_default.hasScroll);
7810-
} else {
7811-
form?.classList.remove(AiChatForm_default.hasScroll);
7812-
}
7813-
onChange(textArea.value);
7814-
};
78157815
return /* @__PURE__ */ _("form", { ref: formRef, class: AiChatForm_default.form, onClick: () => textAreaRef.current?.focus(), onSubmit: handleSubmit }, /* @__PURE__ */ _(
78167816
"textarea",
78177817
{
@@ -7826,7 +7826,7 @@
78267826
onBlurCapture: onBlur,
78277827
onInput,
78287828
onKeyDown: handleKeyDown,
7829-
onChange: handleChange
7829+
onChange: (event) => onChange(event.currentTarget.value)
78307830
}
78317831
), /* @__PURE__ */ _("div", { class: AiChatForm_default.buttons }, /* @__PURE__ */ _(
78327832
"button",
@@ -7949,8 +7949,8 @@
79497949
list: "SuggestionsList_list",
79507950
item: "SuggestionsList_item",
79517951
suffix: "SuggestionsList_suffix",
7952-
title: "SuggestionsList_title",
7953-
badge: "SuggestionsList_badge"
7952+
badge: "SuggestionsList_badge",
7953+
title: "SuggestionsList_title"
79547954
};
79557955
}
79567956
});
@@ -8525,7 +8525,7 @@
85258525
const canvas = document.createElement("canvas");
85268526
const context = canvas.getContext("2d");
85278527
if (!context) return 0;
8528-
context.font = "13px / 16px system-ui";
8528+
context.font = "500 13px / 16px system-ui";
85298529
return context.measureText(text2).width;
85308530
}
85318531
var init_SearchForm2 = __esm({
@@ -8628,7 +8628,7 @@
86288628
SearchForm,
86298629
{
86308630
key: `search-${resetKey}`,
8631-
term: query,
8631+
term: query.replace(/\n/g, ""),
86328632
autoFocus,
86338633
onChangeTerm: setQuery,
86348634
onOpenSuggestion: handleOpenSuggestion,

0 commit comments

Comments
 (0)