Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
2c7e674
close SearchMenu on client navigation
reidbarber Nov 5, 2025
5cb61c3
add footer
reidbarber Nov 6, 2025
33f0724
made Nav and ToC widths static
reidbarber Nov 6, 2025
35069c4
fix min-height issue on mobile
reidbarber Nov 6, 2025
5e84727
show Toast if route can't load
reidbarber Nov 6, 2025
9122573
add toast for clipboard copy failures
reidbarber Nov 6, 2025
45ec5f7
fix React insertion effect
reidbarber Nov 6, 2025
81f27fb
improve markdown menu
reidbarber Nov 6, 2025
c35adb7
add skeleton loading for client routing
reidbarber Nov 6, 2025
c7b2c20
copy update
reidbarber Nov 6, 2025
217f3df
Merge remote-tracking branch 'origin/main' into s2-docs-general-impro…
reidbarber Nov 6, 2025
df6fe71
remote extra startTransitions and use use hook
reidbarber Nov 7, 2025
2bbe51f
improve skeleton loading and optimistic render link selection + ToC
reidbarber Nov 7, 2025
93dca54
add delay to showing skeleton
reidbarber Nov 7, 2025
9338497
fix getPageInfo logic
reidbarber Nov 7, 2025
dc3309a
try fixing getPageInfo again
reidbarber Nov 7, 2025
25297d3
try fixing normalizePathname on build
reidbarber Nov 7, 2025
aa6ba15
add prefetch onPressStart
reidbarber Nov 7, 2025
9cd4e02
revert optimistic UI and show error toast if fetch fails
reidbarber Nov 7, 2025
fbd63dd
fix skeleton title
reidbarber Nov 10, 2025
31683a3
don't clear targetPathname until new navigation
reidbarber Nov 10, 2025
4970161
move prefetch to a global pointerover listener
reidbarber Nov 10, 2025
cf27fd3
close search menu when navigation starts
reidbarber Nov 10, 2025
8d77e46
show skeleton loading immediately when navigation starts
reidbarber Nov 10, 2025
de49692
Merge remote-tracking branch 'origin/main' into s2-docs-general-impro…
reidbarber Nov 11, 2025
d971a15
re-use tag group in SearchMenu and MobileSearchMenu
reidbarber Nov 11, 2025
7d2fb80
fix and extract out search logic
reidbarber Nov 11, 2025
5cfdd17
remove blog and releases index pages from search
reidbarber Nov 11, 2025
6c98a92
reduce size of icons in dnd blog post example
reidbarber Nov 11, 2025
537d8b1
fix Forms password example
reidbarber Nov 11, 2025
751fc05
centralize search logic
reidbarber Nov 11, 2025
77dd142
add escapeKeyBehavior="none" to tag groups
reidbarber Nov 11, 2025
0a7dcbc
fix toc scroll mask
reidbarber Nov 11, 2025
f4fd084
simplify pathname logic
reidbarber Nov 12, 2025
67a3b66
remove promises from prefetch cache once resolved
reidbarber Nov 12, 2025
aef8e3b
use useOptimistic
reidbarber Nov 12, 2025
f3b9f25
use fetchRSC promise as loading source
reidbarber Nov 12, 2025
839f0d3
avoid navigation race conditions
reidbarber Nov 12, 2025
80431b0
prefetch on focus (same as pointerover)
reidbarber Nov 12, 2025
512a045
function for checking if client link
reidbarber Nov 12, 2025
90abcd8
fix search results sorting for All tag
reidbarber Nov 12, 2025
b70d7d8
add message to currentAbortController.abort
reidbarber Nov 12, 2025
d01efc1
lint
reidbarber Nov 12, 2025
ff3c90c
Merge remote-tracking branch 'origin/main' into s2-docs-general-impro…
reidbarber Nov 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function BidirectionalDnDListBox(props) {
style={{width: 300, height: 300, overflow: 'auto'}}>
{item => (
<ListBoxItem textValue={item.name} style={{display: 'flex', alignItems: 'center', gap: 8, flexDirection: 'row', justifyContent: 'flex-start'}}>
{item.type === 'folder' ? <Folder /> : <File />}
{item.type === 'folder' ? <Folder size={16} /> : <File size={16} />}
<span>{item.name}</span>
</ListBoxItem>
)}
Expand Down
2 changes: 1 addition & 1 deletion packages/dev/s2-docs/pages/react-aria/blog/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default Layout;

export const section = 'Blog';
export const title = 'Blog';

export const hideFromSearch = true;
export const tags = ['blog', 'articles', 'posts'];

# Blog
Expand Down
1 change: 1 addition & 0 deletions packages/dev/s2-docs/pages/react-aria/releases/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default Layout;
export const section = 'Releases';
export const tags = ['changelog', 'versions', 'updates'];
export const title = 'Releases';
export const hideFromSearch = true;

# Releases

Expand Down
1 change: 1 addition & 0 deletions packages/dev/s2-docs/pages/s2/forms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ function Example() {

return (
<TextField
type="password"
label="Password"
placeholder="Choose a password"
/*- begin highlight -*/
Expand Down
1 change: 1 addition & 0 deletions packages/dev/s2-docs/pages/s2/releases/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default Layout;
export const section = 'Releases';
export const tags = ['changelog', 'versions', 'updates'];
export const title = 'Releases';
export const hideFromSearch = true;

# Releases

Expand Down
10 changes: 7 additions & 3 deletions packages/dev/s2-docs/src/CodePlatter.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import {ActionButton, ActionButtonGroup, Button, ButtonGroup, Content, createIcon, Dialog, DialogContainer, Heading, Link, Menu, MenuItem, MenuTrigger, Text, Tooltip, TooltipTrigger} from '@react-spectrum/s2';
import {ActionButton, ActionButtonGroup, Button, ButtonGroup, Content, createIcon, Dialog, DialogContainer, Heading, Link, Menu, MenuItem, MenuTrigger, Text, UNSTABLE_ToastQueue as ToastQueue, Tooltip, TooltipTrigger} from '@react-spectrum/s2';
import {CopyButton} from './CopyButton';
import {createCodeSandbox, getCodeSandboxFiles} from './CodeSandbox';
import {createStackBlitz} from './StackBlitz';
Expand Down Expand Up @@ -120,7 +120,9 @@ export function CodePlatter({children, type, showCoachMark}: CodePlatterProps) {
if (node instanceof HTMLHeadingElement && node.id) {
url.hash = '#' + node.id;
}
navigator.clipboard.writeText(url.toString());
navigator.clipboard.writeText(url.toString()).catch(() => {
ToastQueue.negative('Failed to copy link.');
});
}}>
<LinkIcon />
<Text slot="label">Copy link</Text>
Expand Down Expand Up @@ -300,7 +302,9 @@ function ShadcnDialog({registryUrl}) {
<Button
variant="accent"
onPress={() => {
navigator.clipboard.writeText(preRef.current!.textContent!);
navigator.clipboard.writeText(preRef.current!.textContent!).catch(() => {
ToastQueue.negative('Failed to copy command. Please try again.');
});
close();
}}>
Copy and close
Expand Down
4 changes: 2 additions & 2 deletions packages/dev/s2-docs/src/CopyButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import {ActionButton, Tooltip, TooltipTrigger} from '@react-spectrum/s2';
import {ActionButton, UNSTABLE_ToastQueue as ToastQueue, Tooltip, TooltipTrigger} from '@react-spectrum/s2';
import CheckmarkCircle from '@react-spectrum/s2/icons/CheckmarkCircle';
import Copy from '@react-spectrum/s2/icons/Copy';
import React, {useEffect, useRef, useState} from 'react';
Expand Down Expand Up @@ -44,7 +44,7 @@ export function CopyButton({text, getText, ariaLabel = 'Copy', tooltip = 'Copy',
setIsCopied(true);
timeout.current = setTimeout(() => setIsCopied(false), 2000);
}).catch(() => {
// noop
ToastQueue.negative('Failed to copy.');
});
};

Expand Down
2 changes: 0 additions & 2 deletions packages/dev/s2-docs/src/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import BetaApp from '@react-spectrum/s2/icons/BetaApp';
import {flushSync} from 'react-dom';
import {getLibraryFromPage, getLibraryIcon, getLibraryLabel} from './library';
import GithubLogo from './icons/GithubLogo';
import {MarkdownMenu} from './MarkdownMenu';
// @ts-ignore
import {PageProps} from '@parcel/rsc';
import React, {CSSProperties, useId, useState} from 'react';
Expand Down Expand Up @@ -115,7 +114,6 @@ export default function Header(props: PageProps) {
<BetaApp />
<Text>Beta Preview</Text>
</Badge>
<MarkdownMenu url={currentPage.url} />
<ActionButton aria-label="React Spectrum GitHub repo" size="L" isQuiet onPress={() => window.open('https://github.com/adobe/react-spectrum', '_blank', 'noopener,noreferrer')}>
<GithubLogo />
</ActionButton>
Expand Down
13 changes: 7 additions & 6 deletions packages/dev/s2-docs/src/IconSearchView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import {Autocomplete, GridLayout, ListBox, ListBoxItem, Size, useFilter, Virtualizer} from 'react-aria-components';
import CheckmarkCircle from '@react-spectrum/s2/icons/CheckmarkCircle';
import Close from '@react-spectrum/s2/icons/Close';
import {Content, Heading, IllustratedMessage, pressScale, SearchField, Skeleton, Text} from '@react-spectrum/s2';
import {Content, Heading, IllustratedMessage, pressScale, SearchField, Skeleton, Text, UNSTABLE_ToastQueue as ToastQueue} from '@react-spectrum/s2';
import {focusRing, iconStyle, style} from '@react-spectrum/s2/style' with {type: 'macro'};
import {iconAliases} from './iconAliases.js';
// @ts-ignore
Expand Down Expand Up @@ -50,7 +50,7 @@ export function useCopyImport() {
setCopiedId(id);
timeout.current = setTimeout(() => setCopiedId(null), 2000);
}).catch(() => {
// noop
ToastQueue.negative('Failed to copy import statement.');
});
}, []);

Expand Down Expand Up @@ -124,16 +124,17 @@ const itemStyle = style({
});

interface IconSearchViewProps {
filteredItems: typeof iconList
filteredItems: typeof iconList,
listBoxClassName?: string
}

export function IconSearchView({filteredItems}: IconSearchViewProps) {
export function IconSearchView({filteredItems, listBoxClassName}: IconSearchViewProps) {
let {copiedId, handleCopyImport} = useCopyImport();

return (
<>
<CopyInfoMessage />
<IconListBox items={filteredItems} copiedId={copiedId} onAction={handleCopyImport} />
<IconListBox items={filteredItems} copiedId={copiedId} onAction={handleCopyImport} listBoxClassName={listBoxClassName} />
</>
);
}
Expand Down Expand Up @@ -218,7 +219,7 @@ export function IconSearchSkeleton() {
<ListBox
items={mockItems}
layout="grid"
className={style({width: '100%', scrollPaddingY: 4, overflow: 'auto'})}>
className={style({flexGrow: 1, overflow: 'auto', width: '100%', scrollPaddingY: 4})}>
{(item) => <SkeletonIconItem item={item} />}
</ListBox>
</Virtualizer>
Expand Down
4 changes: 2 additions & 2 deletions packages/dev/s2-docs/src/IllustrationCards.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import {Autocomplete, GridLayout, ListBox, ListBoxItem, Size, useFilter, Virtualizer} from 'react-aria-components';
import {Content, Heading, IllustratedMessage, pressScale, ProgressCircle, Radio, RadioGroup, SearchField, SegmentedControl, SegmentedControlItem, Text} from '@react-spectrum/s2';
import {Content, Heading, IllustratedMessage, pressScale, ProgressCircle, Radio, RadioGroup, SearchField, SegmentedControl, SegmentedControlItem, Text, UNSTABLE_ToastQueue as ToastQueue} from '@react-spectrum/s2';
import {focusRing, style} from '@react-spectrum/s2/style' with {type: 'macro'};
// @ts-ignore
import Gradient from '@react-spectrum/s2/icons/Gradient';
Expand Down Expand Up @@ -100,7 +100,7 @@ let handleCopyImport = (id: string, variant: string, gradientStyle: string) => {
navigator.clipboard.writeText(importText).then(() => {
// noop
}).catch(() => {
// noop
ToastQueue.negative('Failed to copy import statement.');
});
};

Expand Down
Loading