Skip to content

Commit ef3ff3d

Browse files
authored
docs: Refine typography (#9216)
* docs: Refine typography * Mark examples as sub-pages * Use text-wrap: balance * widen layout, improve spacing and wrapping, add SEO tags * Fix root page * revert changes to link props * fix * Update skeleton * Add RSS feeds * fix * Use serif font for body text
1 parent bd16e0c commit ef3ff3d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+636
-292
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ build-s2-docs:
156156
yarn workspace @react-spectrum/s2-docs generate:og
157157
REGISTRY_URL=$(PUBLIC_URL)/registry node scripts/buildRegistry.mjs
158158
REGISTRY_URL=$(PUBLIC_URL)/registry yarn build:s2-docs --public-url $(PUBLIC_URL)
159+
node scripts/createFeedS2.mjs
159160
mkdir -p $(DIST_DIR)
160161
mv packages/dev/s2-docs/dist/* $(DIST_DIR)
161162
mkdir -p $(DIST_DIR)/registry

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@
185185
"recast": "^0.23",
186186
"recursive-readdir": "^2.2.2",
187187
"regenerator-runtime": "0.13.3",
188+
"rehype-stringify": "^9.0.4",
188189
"rimraf": "^6.0.1",
189190
"sharp": "^0.33.5",
190191
"storybook": "^8.6.14",

packages/@react-spectrum/s2/src/Content.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ interface ContentProps extends UnsafeStyles, SlotProps {
2424
children: ReactNode,
2525
styles?: StyleString,
2626
isHidden?: boolean,
27-
id?: string
27+
id?: string,
28+
itemProp?: string,
29+
itemScope?: boolean,
30+
itemType?: string,
31+
itemID?: string,
32+
itemRef?: string
2833
}
2934

3035
interface HeadingProps extends Omit<ContentProps, 'children'> {

packages/dev/docs/pages/assets/rtl-actual-placeholder.svg

Lines changed: 1 addition & 1 deletion
Loading

packages/dev/docs/pages/assets/rtl-timefield.svg

Lines changed: 1 addition & 1 deletion
Loading

packages/dev/s2-docs/pages/react-aria/blog/ColorEditorExample.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ export function ColorEditorExample() {
7575
padding: {
7676
default: 12,
7777
lg: 24
78-
}
78+
},
79+
maxWidth: '--text-width',
80+
marginX: 'auto'
7981
})}>
8082
<ColorPicker defaultValue="#5100FF">
8183
{({color}) => (

packages/dev/s2-docs/pages/react-aria/blog/SubmenuAnimation.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ export function SubmenuAnimation(): JSX.Element {
120120
className={style({
121121
backgroundColor: 'layer-1',
122122
borderRadius: 'xl',
123-
marginY: 32,
124123
padding: {
125124
default: 12,
126125
lg: 24

packages/dev/s2-docs/pages/react-aria/blog/accessible-color-descriptions.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export default Layout;
1616

1717
import docs from 'docs:@react-spectrum/s2';
1818
import React from 'react';
19-
import {Byline} from '../../../src/BlogList';
2019
import {ColorEditorExample} from './ColorEditorExample';
2120

2221
export const hideNav = true;
@@ -29,7 +28,6 @@ export const section = 'Blog';
2928
export const isSubpage = true;
3029

3130
# Accessible Color Descriptions for Improved Color Pickers
32-
<Byline author={author} authorLink={authorLink} date={date} />
3331

3432
Recently, we released a suite of color picker components in React Aria and React Spectrum. These components help users choose a color in various ways, including a 2D [ColorArea](../ColorArea.html), channel-based [ColorSlider](../ColorSlider.html), circular [ColorWheel](../ColorWheel.html), preset [ColorSwatchPicker](../ColorSwatchPicker.html), and a hex value [ColorField](../ColorField.html). You can compose these individual pieces together to create a full [ColorPicker](../ColorPicker.html) with whatever custom layout or configuration you need.
3533

packages/dev/s2-docs/pages/react-aria/blog/building-a-button-part-1.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export default Layout;
1616

1717
import docs from 'docs:@react-spectrum/s2';
1818
import React from 'react';
19-
import {Byline} from '../../../src/BlogList';
2019

2120
export const hideNav = true;
2221
export const tags = ['react aria', 'react spectrum', 'react', 'spectrum', 'interactions', 'button', 'touch'];
@@ -28,7 +27,6 @@ export const section = 'Blog';
2827
export const isSubpage = true;
2928

3029
# Building a Button Part 1: Press Events
31-
<Byline author={author} authorLink={authorLink} date={date} />
3230

3331
UI development is really hard. While building components has become much easier with modern UI frameworks like React, handling interactions across devices and supporting proper accessibility and internationalization is still extraordinarily difficult. Building UIs has a very [long tail](https://en.wikipedia.org/wiki/Long_tail): it's fairly easy to get the basics for a given component working, but there are many details to consider, and these add up to a majority of the work.
3432

packages/dev/s2-docs/pages/react-aria/blog/building-a-button-part-2.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export default Layout;
1515

1616
import docs from 'docs:@react-spectrum/s2';
1717
import React from 'react';
18-
import {Byline} from '../../../src/BlogList';
1918

2019
export const hideNav = true;
2120
export const tags = ['react aria', 'react spectrum', 'react', 'interactions', 'button', 'touch', 'hover', 'web development', 'javascript', 'css'];
@@ -27,7 +26,6 @@ export const section = 'Blog';
2726
export const isSubpage = true;
2827

2928
# Building a Button Part 2: Hover Interactions
30-
<Byline author={author} authorLink={authorLink} date={date} />
3129

3230
This is the second post in our three part series on building a button component. In the [first post](building-a-button-part-1.html), we covered how React Spectrum and React Aria implement adaptive press events across mouse, touch, keyboard, and screen readers. Today, we'll cover hover interactions.
3331

0 commit comments

Comments
 (0)