Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
869b8e8
init Typography search view
reidbarber Jan 26, 2026
58c8a59
have text inherit color
reidbarber Jan 26, 2026
852e6ea
add to mobile search menu
reidbarber Jan 26, 2026
3894694
make copy info messages consistent (start-aligned)
reidbarber Jan 26, 2026
d33822d
Merge remote-tracking branch 'origin/main' into typography-search-menu
reidbarber Jan 26, 2026
4a8c507
fix search tags overflowing
reidbarber Jan 27, 2026
80fdc2f
use search value to filter list instead of update preview text
reidbarber Jan 27, 2026
837aaf2
update placeholder
reidbarber Jan 28, 2026
84f63c8
allow editing sample text via RAC TextField
reidbarber Jan 29, 2026
c317617
add syntax highlighting to code sample
reidbarber Jan 29, 2026
6f3e0d7
fix scrolling issues
reidbarber Jan 30, 2026
6e55d42
add padding around toggle button group
reidbarber Jan 30, 2026
173ff01
add aria-label to textfield
reidbarber Jan 30, 2026
241328a
Merge remote-tracking branch 'origin/main' into typography-search-menu
reidbarber Feb 3, 2026
2a64673
disable virtual focus for the Autocomplete when Typography is selected
reidbarber Feb 3, 2026
0d8c403
make layout styles consistent with other resource tabs
reidbarber Feb 3, 2026
035d7fc
allow sample text to take the full width of the container
reidbarber Feb 3, 2026
eb714d8
Merge branch 'main' into typography-search-menu
reidbarber Feb 4, 2026
7575c4a
add paddingX to ToggleButtonGroup to prevent ToggleButtonGroup clipping
reidbarber Feb 5, 2026
3706a8d
Merge branch 'main' into typography-search-menu
reidbarber Feb 9, 2026
db83739
Merge branch 'typography-search-menu' of https://github.com/adobe/rea…
reidbarber Feb 10, 2026
2c3cc83
remove contextual helps from header
reidbarber Feb 10, 2026
941f647
reorder fonts for better visuals
reidbarber Feb 10, 2026
47db034
cleanup styles
reidbarber Feb 10, 2026
ea133e4
fix tag textValue warning
reidbarber Feb 10, 2026
3bdc3bf
add ActionButton to indicate sample text is editable
reidbarber Feb 10, 2026
52cf38e
Merge remote-tracking branch 'origin/main' into typography-search-menu
reidbarber Feb 24, 2026
da4f1ce
remove element picker
reidbarber Feb 24, 2026
d5f17ed
render preview/code panel right under list content
reidbarber Feb 24, 2026
8a3911e
clear overlay context "Edit sample text" action ActionButton
reidbarber Feb 24, 2026
4b9b4d7
center sample text
reidbarber Feb 24, 2026
413fcbd
clean up listbox styles
reidbarber Feb 24, 2026
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
7 changes: 4 additions & 3 deletions packages/dev/s2-docs/src/ColorSearchView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,11 @@ interface ColorSearchViewProps {
/** Names of colors that exactly match the searched hex value. */
exactMatches?: Set<string>,
/** Names of the closest matching colors when no exact matches exist. */
closestMatches?: Set<string>
closestMatches?: Set<string>,
listBoxClassName?: string
}

export function ColorSearchView({filteredItems, exactMatches = new Set(), closestMatches = new Set()}: ColorSearchViewProps) {
export function ColorSearchView({filteredItems, exactMatches = new Set(), closestMatches = new Set(), listBoxClassName}: ColorSearchViewProps) {
const [copiedId, setCopiedId] = useState<string | null>(null);
const timeout = useRef<ReturnType<typeof setTimeout> | null>(null);

Expand Down Expand Up @@ -261,7 +262,7 @@ export function ColorSearchView({filteredItems, exactMatches = new Set(), closes
}
}}
layout="grid"
className={style({
className={listBoxClassName || style({
width: 'full',
display: 'flex',
flexDirection: 'column',
Expand Down
2 changes: 1 addition & 1 deletion packages/dev/s2-docs/src/IconSearchView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function IconListBox({items, copiedId, onAction, listBoxClassName}: IconListBoxP
onAction={(item) => onAction(item.toString())}
items={items}
layout="grid"
className={listBoxClassName || style({width: '100%', scrollPaddingY: 4, overflow: 'auto'})}
className={listBoxClassName || style({width: '100%', scrollPaddingY: 4, padding: 8})}
dependencies={[copiedId]}
renderEmptyState={() => (
<IllustratedMessage styles={style({marginX: 'auto', marginY: 32})}>
Expand Down
20 changes: 17 additions & 3 deletions packages/dev/s2-docs/src/MobileSearchMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {IconSearchSkeleton, useIconFilter} from './IconSearchView';
import {type Library} from './constants';
import React, {cloneElement, CSSProperties, ReactElement, ReactNode, Suspense, useContext, useEffect, useRef, useState} from 'react';
import {SearchTagGroups} from './SearchTagGroups';
import {TypographySearchView} from './TypographySearchView';
import {useId} from '@react-aria/utils';
import {useRouter} from './Router';

Expand Down Expand Up @@ -242,6 +243,7 @@ function MobileNav({initialTag}: {initialTag?: string}) {

const filteredColors = useFilteredColors(searchValue);
const isColorsSelected = selectedSection === 'colors';
const isTypographySelected = selectedSection === 'typography';

let handleSearchFocus = () => {
setSearchFocused(true);
Expand Down Expand Up @@ -311,7 +313,10 @@ function MobileNav({initialTag}: {initialTag?: string}) {
const showIcons = isIconsSelected && library.id === 'react-spectrum';
return (
<MobileTabPanel key={library.id} id={library.id}>
<Autocomplete filter={showIcons ? iconFilter : undefined}>
<Autocomplete
key={isTypographySelected ? 'typography' : 'default'}
filter={showIcons ? iconFilter : undefined}
disableVirtualFocus={isTypographySelected}>
<div className={stickySearchContainer}>
<SearchField
aria-label="Search"
Expand Down Expand Up @@ -359,10 +364,19 @@ function MobileNav({initialTag}: {initialTag?: string}) {
<LazyColorSearchView
filteredItems={filteredColors.sections}
exactMatches={filteredColors.exactMatches}
closestMatches={filteredColors.closestMatches} />
closestMatches={filteredColors.closestMatches}
listBoxClassName={style({
flexGrow: 1,
overflow: 'auto',
width: '100%',
scrollPaddingY: 4
})} />
</Suspense>
)}
{!showIcons && (!isColorsSelected || library.id !== 'react-spectrum') && (
{!showIcons && isTypographySelected && library.id === 'react-spectrum' && (
<TypographySearchView searchValue={searchValue} />
)}
{!showIcons && !isColorsSelected && !isTypographySelected && (
<ComponentCardView
currentUrl={currentUrl}
onAction={key => {
Expand Down
21 changes: 18 additions & 3 deletions packages/dev/s2-docs/src/SearchMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {SearchTagGroups} from './SearchTagGroups';
import {style} from '@react-spectrum/s2/style' with { type: 'macro' };
import {Tab, TabList, TabPanel, Tabs} from './Tabs';
import {TextFieldRef} from '@react-types/textfield';
import {TypographySearchView} from './TypographySearchView';
import {useRouter} from './Router';
import './SearchMenu.css';
import {preloadComponentImages} from './ComponentCard';
Expand Down Expand Up @@ -160,7 +161,10 @@ export function SearchMenu(props: SearchMenuProps) {
const placeholderText = getPlaceholderText(tab.label);
return (
<TabPanel key={tab.id} id={tab.id}>
<Autocomplete filter={isIconsSelected ? iconFilter : undefined}>
<Autocomplete
key={selectedTagId === 'typography' ? 'typography' : 'default'}
filter={isIconsSelected ? iconFilter : undefined}
disableVirtualFocus={selectedTagId === 'typography'}>
<div className={style({display: 'flex', flexDirection: 'column', height: 'full'})}>
<div className={style({flexShrink: 0, marginStart: 16, marginEnd: 64})}>
<SearchField
Expand All @@ -182,6 +186,8 @@ export function SearchMenu(props: SearchMenuProps) {
selectedTagId={selectedTagId}
onSectionSelectionChange={handleTagSelectionChange}
onResourceSelectionChange={handleTagSelectionChange}
wrapperClassName={style({paddingTop: 16, flexShrink: 0, zIndex: 1})}
contentClassName={style({display: 'flex', flexDirection: 'row', alignItems: 'center', gap: 8, marginX: 16})}
onHover={tag => {
preloadComponentImages(sections.find(s => s.id === tag)?.children?.map(c => c.name) || []);
}} />
Expand All @@ -198,11 +204,20 @@ export function SearchMenu(props: SearchMenuProps) {
{selectedTagId === 'colors' && (
<div className={style({flexGrow: 1, overflow: 'auto', display: 'flex', flexDirection: 'column'})}>
<Suspense fallback={<ColorSearchSkeleton />}>
<LazyColorSearchView filteredItems={filteredColors.sections} exactMatches={filteredColors.exactMatches} closestMatches={filteredColors.closestMatches} />
<LazyColorSearchView
filteredItems={filteredColors.sections}
exactMatches={filteredColors.exactMatches}
closestMatches={filteredColors.closestMatches}
listBoxClassName={style({flexGrow: 1, overflow: 'auto', width: '100%', scrollPaddingY: 4})} />
</Suspense>
</div>
)}
{selectedTagId !== 'icons' && selectedTagId !== 'colors' && (
{selectedTagId === 'typography' && (
<div className={style({flexGrow: 1, overflow: 'auto', display: 'flex', flexDirection: 'column'})}>
<TypographySearchView searchValue={searchValue} />
</div>
)}
{selectedTagId !== 'icons' && selectedTagId !== 'colors' && selectedTagId !== 'typography' && (
<ComponentCardView
key={selectedLibrary + selectedTagId}
currentUrl={currentUrl}
Expand Down
2 changes: 1 addition & 1 deletion packages/dev/s2-docs/src/SearchTagGroups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function SearchTagGroups({
items={resourceTags}
UNSAFE_style={{whiteSpace: 'nowrap'}}>
{(tag) => (
<Tag key={tag.id} id={tag.id} href={tag.href} target="_blank">
<Tag key={tag.id} id={tag.id} href={tag.href} target="_blank" textValue={tag.href ?? tag.name}>
{tag.name}
{tag.href &&
<LinkOutIcon
Expand Down
Loading