Skip to content

Commit da5b37f

Browse files
authored
Merge branch 'main' into refactor/maintainer-card-responsive-grid
2 parents 737eb23 + 7ed4232 commit da5b37f

6 files changed

Lines changed: 24 additions & 24 deletions

File tree

src/components/examples/ExampleWorkbench.client.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3023,7 +3023,7 @@ export function ExampleWorkbench({
30233023
if (element) notebookPaneRefs.current.set(pane.id, element)
30243024
else notebookPaneRefs.current.delete(pane.id)
30253025
}}
3026-
className="grid min-h-0 min-w-0 grid-rows-[2.5rem_minmax(0,1fr)] overflow-hidden bg-background-default"
3026+
className="grid min-h-0 min-w-0 grid-rows-[2.5rem_minmax(0,1fr)] overflow-hidden bg-background-default @min-[900px]:grid-rows-[2.25rem_minmax(0,1fr)]"
30273027
onPointerDownCapture={() => {
30283028
setNotebookTabs((current) =>
30293029
activateNotebookWorkbenchPane(current, pane.id),
@@ -3067,8 +3067,8 @@ export function ExampleWorkbench({
30673067
role="presentation"
30683068
className={`flex h-10 shrink-0 items-stretch overflow-hidden rounded-lg transition-colors duration-100 motion-reduce:transition-none @min-[900px]:h-8 ${
30693069
active
3070-
? 'bg-background-subtle text-text-primary'
3071-
: 'text-text-muted hover:bg-background-subtle hover:text-text-primary'
3070+
? 'bg-action-secondary text-text-primary'
3071+
: 'text-text-secondary hover:bg-surface-state-hover hover:text-text-primary'
30723072
} ${dragging ? 'opacity-50' : ''}`}
30733073
>
30743074
<button
@@ -3088,7 +3088,7 @@ export function ExampleWorkbench({
30883088
aria-label={label}
30893089
title={label}
30903090
tabIndex={active ? 0 : -1}
3091-
className="flex min-w-0 touch-pan-x items-center gap-2 px-2.5 text-sm focus-visible:z-10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-border-focus"
3091+
className="flex min-w-0 touch-pan-x items-center gap-1.5 px-2 text-xs focus-visible:z-10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-border-focus"
30923092
onClick={() => {
30933093
if (notebookTabDidDragRef.current) {
30943094
notebookTabDidDragRef.current = false
@@ -3106,12 +3106,12 @@ export function ExampleWorkbench({
31063106
onLostPointerCapture={cancelNotebookTabDrag}
31073107
>
31083108
{tab.kind === 'preview' ? (
3109-
<BrowserIcon className="size-4" aria-hidden="true" />
3109+
<BrowserIcon className="size-3.5" aria-hidden="true" />
31103110
) : tab.kind === 'editor' ? (
3111-
<CodeIcon className="size-4" aria-hidden="true" />
3111+
<CodeIcon className="size-3.5" aria-hidden="true" />
31123112
) : (
31133113
<TerminalWindowIcon
3114-
className="size-4"
3114+
className="size-3.5"
31153115
aria-hidden="true"
31163116
/>
31173117
)}
@@ -3197,7 +3197,7 @@ export function ExampleWorkbench({
31973197
color="gray"
31983198
size="icon-sm"
31993199
rounded="lg"
3200-
className="size-10 shrink-0 bg-background-subtle text-text-secondary transition-colors duration-100 hover:bg-surface-state-hover active:scale-95 motion-reduce:transition-none @min-[900px]:size-8"
3200+
className="size-10 shrink-0 bg-action-secondary text-text-primary transition-colors duration-100 hover:bg-action-secondary-hover active:scale-95 max-[899px]:bg-action-secondary max-[899px]:text-text-primary motion-reduce:transition-none @min-[900px]:size-8"
32013201
aria-label={newTabLabel}
32023202
>
32033203
<PlusIcon className="size-4" aria-hidden="true" />
@@ -3210,14 +3210,14 @@ export function ExampleWorkbench({
32103210
className="w-64 max-w-[calc(100vw-1rem)] origin-[var(--radix-dropdown-menu-content-transform-origin)] rounded-xl border-border-subtle p-1 shadow-xl duration-100 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 motion-reduce:animate-none"
32113211
>
32123212
<DropdownItem
3213-
className="min-h-10 gap-2.5 rounded-lg px-2.5 py-1 text-sm text-text-primary transition-colors duration-100 motion-reduce:transition-none"
3213+
className="min-h-10 gap-2 rounded-lg px-2 py-1 text-[13px] text-text-primary transition-colors duration-100 hover:bg-surface-state-hover focus:bg-surface-state-hover motion-reduce:transition-none min-[900px]:min-h-9"
32143214
onSelect={() => addNotebookTab({ kind: 'preview' }, pane.id)}
32153215
>
32163216
<BrowserIcon className="size-4" aria-hidden="true" />
32173217
Preview
32183218
</DropdownItem>
32193219
<DropdownItem
3220-
className="min-h-10 gap-2.5 rounded-lg px-2.5 py-1 text-sm text-text-primary transition-colors duration-100 motion-reduce:transition-none"
3220+
className="min-h-10 gap-2 rounded-lg px-2 py-1 text-[13px] text-text-primary transition-colors duration-100 hover:bg-surface-state-hover focus:bg-surface-state-hover motion-reduce:transition-none min-[900px]:min-h-9"
32213221
onSelect={() =>
32223222
addNotebookTab(
32233223
{
@@ -3233,7 +3233,7 @@ export function ExampleWorkbench({
32333233
Editor
32343234
</DropdownItem>
32353235
<DropdownItem
3236-
className="min-h-10 gap-2.5 rounded-lg px-2.5 py-1 text-sm text-text-primary transition-colors duration-100 motion-reduce:transition-none"
3236+
className="min-h-10 gap-2 rounded-lg px-2 py-1 text-[13px] text-text-primary transition-colors duration-100 hover:bg-surface-state-hover focus:bg-surface-state-hover motion-reduce:transition-none min-[900px]:min-h-9"
32373237
onSelect={() => addNotebookTab({ kind: 'console' }, pane.id)}
32383238
>
32393239
<TerminalWindowIcon className="size-4" aria-hidden="true" />
@@ -3257,7 +3257,7 @@ export function ExampleWorkbench({
32573257
color="gray"
32583258
size="icon-sm"
32593259
rounded="lg"
3260-
className="size-10 shrink-0 transition-colors duration-100 active:scale-95 motion-reduce:transition-none @min-[900px]:size-8"
3260+
className="size-10 shrink-0 bg-action-secondary text-text-primary transition-colors duration-100 hover:bg-action-secondary-hover active:scale-95 max-[899px]:bg-action-secondary max-[899px]:text-text-primary motion-reduce:transition-none @min-[900px]:size-8"
32613261
aria-label="Copy share link"
32623262
disabled={shareState === 'sharing'}
32633263
onClick={() => void share()}

src/components/examples/SandboxBrowser.client.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ export function SandboxBrowser({
240240
<div
241241
ref={rootRef}
242242
data-sandbox-browser=""
243-
className="relative grid size-full min-h-0 grid-rows-[2.5rem_minmax(0,1fr)] bg-background-default"
243+
className="relative grid size-full min-h-0 grid-rows-[2.5rem_minmax(0,1fr)] bg-background-default min-[900px]:grid-rows-[2.25rem_minmax(0,1fr)]"
244244
>
245245
<header className="flex min-w-0 items-center gap-1 border-b border-border-default bg-background-subtle px-1.5">
246246
{toolbarAction(
@@ -387,7 +387,7 @@ export function SandboxBrowser({
387387

388388
{error ? (
389389
<div
390-
className="absolute top-12 right-3 left-3 z-20 flex max-h-48 items-start gap-2 overflow-hidden rounded-lg border border-border-default border-l-2 border-l-border-error bg-background-elevated px-3 py-2 shadow-lg sm:left-auto sm:w-[26rem]"
390+
className="absolute top-12 right-3 left-3 z-20 flex max-h-48 items-start gap-2 overflow-hidden rounded-lg border border-border-default border-l-2 border-l-border-error bg-background-elevated px-3 py-2 shadow-lg sm:left-auto sm:w-[26rem] min-[900px]:top-11"
391391
role="alert"
392392
>
393393
<WarningCircleIcon

src/components/notebook/NotebookLoading.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ function LegacyNotebookWorkbenchSkeleton({
299299
</div>
300300
<div className="hidden border-x border-border-default lg:block" />
301301
<div className="min-h-0 min-w-0 bg-background-default">
302-
<div className="flex h-10 items-center gap-1 border-b border-border-default bg-background-subtle px-1.5">
302+
<div className="flex h-10 items-center gap-1 border-b border-border-default bg-background-subtle px-1.5 lg:h-9">
303303
<SkeletonBlock className="size-7 rounded-md" />
304304
<SkeletonBlock className="size-7 rounded-md" />
305305
<SkeletonBlock className="size-7 rounded-md" />
@@ -314,16 +314,16 @@ function LegacyNotebookWorkbenchSkeleton({
314314

315315
function WorkspaceTabSkeleton() {
316316
return (
317-
<div className="flex h-10 shrink-0 items-center gap-1 border-b border-border-default bg-background-default @min-[900px]:px-1">
317+
<div className="flex h-10 shrink-0 items-center gap-1 border-b border-border-default bg-background-default @min-[900px]:h-9 @min-[900px]:px-1">
318318
<div
319319
data-notebook-tab-skeleton="preview"
320-
className="flex h-10 min-w-0 items-center gap-2 rounded-lg bg-background-subtle px-3 text-sm font-medium text-text-secondary @min-[900px]:h-8"
320+
className="flex h-10 min-w-0 items-center gap-1.5 rounded-lg bg-action-secondary px-2 text-xs font-medium text-text-primary @min-[900px]:h-8"
321321
>
322322
<span className="truncate">Preview</span>
323323
<SkeletonBlock className="size-2.5 shrink-0 rounded-full" />
324324
</div>
325-
<span className="inline-flex size-10 shrink-0 items-center justify-center rounded-lg bg-background-subtle text-text-muted @min-[900px]:size-8">
326-
<PlusIcon className="size-4" aria-hidden="true" />
325+
<span className="inline-flex size-10 shrink-0 items-center justify-center rounded-lg bg-action-secondary text-text-primary @min-[900px]:size-8">
326+
<PlusIcon className="size-3.5" aria-hidden="true" />
327327
</span>
328328
</div>
329329
)
@@ -341,13 +341,13 @@ function PreviewWorkspaceSkeleton({
341341
data-notebook-workspace-skeleton=""
342342
className={`flex min-h-0 min-w-0 flex-col overflow-hidden ${
343343
assistant
344-
? 'border-b border-border-default @min-[900px]:order-2 @min-[900px]:border-b-0 @min-[900px]:border-l @min-[900px]:pt-10'
344+
? 'border-b border-border-default @min-[900px]:order-2 @min-[900px]:border-b-0 @min-[900px]:border-l @min-[900px]:pt-9'
345345
: ''
346346
}`}
347347
>
348348
{tabBar ? <WorkspaceTabSkeleton /> : null}
349349

350-
<div className="flex h-10 shrink-0 items-center gap-1 border-b border-border-default bg-background-subtle px-1.5">
350+
<div className="flex h-10 shrink-0 items-center gap-1 border-b border-border-default bg-background-subtle px-1.5 @min-[900px]:h-9">
351351
<SkeletonBlock className="size-7 rounded-md" />
352352
<SkeletonBlock className="size-7 rounded-md" />
353353
<SkeletonBlock className="size-7 rounded-md" />

src/utils/docs-cache-headers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { findLibrary, getBranch } from '~/libraries'
22
import { docsContentNegotiationVaryHeader } from './http'
33

44
const latestDocsCdnCacheControl =
5-
'public, max-age=60, stale-while-revalidate=60'
5+
'public, max-age=3600, stale-while-revalidate=86400'
66
const versionedDocsCdnCacheControl =
77
'public, max-age=300, stale-while-revalidate=300'
88

src/utils/docs.functions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ export const fetchDocs = createServerFn({ method: 'GET' })
435435
frontMatter.userDescription ?? removeMarkdown(frontMatter.excerpt ?? '')
436436
const keywords = extractFrontMatterKeywords(frontMatter.data.keywords)
437437

438-
setDocsCacheHeaders('public, max-age=60, stale-while-revalidate=60')
438+
setDocsCacheHeaders('public, max-age=3600, stale-while-revalidate=86400')
439439

440440
return {
441441
content: frontMatter.content,

tests/notebook-loading.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ test('the editor skeleton reserves the tabbed workspace and chat dock', () => {
114114
assert.match(editor, /@min-\[900px\]:order-2/)
115115
assert.match(editor, /@min-\[900px\]:right-0/)
116116
assert.match(editor, /@min-\[900px\]:w-\[62%\]/)
117-
assert.match(editor, /@min-\[900px\]:pt-10/)
117+
assert.match(editor, /@min-\[900px\]:pt-9/)
118118
assert.doesNotMatch(embedded, /data-notebook-chat-skeleton=""/)
119119
assert.doesNotMatch(draft, /data-notebook-chat-skeleton=""/)
120120
assert.doesNotMatch(embedded, /data-notebook-tab-skeleton="preview"/)

0 commit comments

Comments
 (0)