Skip to content

feat: Setup new S2 docs website #8300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 95 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
f09c1a5
wip
devongovett Mar 20, 2025
bac6c20
sidenav
devongovett Mar 21, 2025
9221705
Merge branch 'main' of github.com:adobe/react-spectrum into s2-docs2
devongovett Mar 31, 2025
cab4121
bump parcel
devongovett Mar 31, 2025
baecba8
wip
devongovett Apr 2, 2025
f583194
wip
devongovett Apr 5, 2025
6c15ea1
19.1
devongovett Apr 7, 2025
f1e4055
wip
devongovett Apr 8, 2025
e595703
more wip
devongovett Apr 9, 2025
28a4099
Merge branch 'main' of github.com:adobe/react-spectrum into s2-docs2
devongovett May 9, 2025
9ca4746
wip
devongovett May 9, 2025
8becd12
Merge branch 'main' of github.com:adobe/react-spectrum into s2-docs2
devongovett May 22, 2025
53b3153
Merge branch 'main' of github.com:adobe/react-spectrum into s2-docs2
devongovett May 23, 2025
ee7c836
Merge branch 'main' of github.com:adobe/react-spectrum into s2-docs2
devongovett May 23, 2025
31fb448
Merge branch 'main' of github.com:adobe/react-spectrum into s2-docs2
devongovett May 23, 2025
b932653
cleanup
devongovett May 23, 2025
1bedcec
build in circleci
devongovett May 23, 2025
1d63a4e
yarn is a jerk
devongovett May 23, 2025
8acc9c4
update parcel to latest
devongovett May 23, 2025
3f6a70d
gdi yarn
devongovett May 23, 2025
96474a4
temporarily fix self reference resolution
devongovett May 23, 2025
c95b7c4
fixes
devongovett May 23, 2025
c36c7e8
dedupe lightningcss
devongovett May 23, 2025
76716d9
lint
devongovett May 23, 2025
dd85983
Revert "temporarily fix self reference resolution"
devongovett May 24, 2025
5bd60e1
bump parcel
devongovett May 25, 2025
2379778
Merge branch 'main' of github.com:adobe/react-spectrum into s2-docs2
devongovett May 27, 2025
e67eeb6
reorganize
devongovett May 27, 2025
b6cf2f2
Fix indented props
devongovett May 27, 2025
6149339
Create common code platter component
devongovett May 27, 2025
21ebe9f
Content improvements
devongovett May 28, 2025
3847b6a
dnd and gridlist
devongovett May 30, 2025
0b21732
table
devongovett Jun 2, 2025
d5bdc85
Select and ComboBox updates
devongovett Jun 3, 2025
e0a055f
remove features section
devongovett Jun 3, 2025
ccc76ff
display relevant part of code block when collapsed
devongovett Jun 5, 2025
02f86f2
More components
devongovett Jun 6, 2025
d447037
ignore example folder in tsconfig
devongovett Jun 6, 2025
c8a923c
Merge branch 'main' of github.com:adobe/react-spectrum into s2-docs2
devongovett Jun 6, 2025
b109b75
eslintignore
devongovett Jun 6, 2025
eea3394
Show check mark in copy button when copied
reidbarber Jun 6, 2025
edcf4fc
add anchor links to headings
reidbarber Jun 6, 2025
f60ba0b
Fix empty codeProps
devongovett Jun 7, 2025
017577a
use link icon on headings
reidbarber Jun 9, 2025
be3884f
Merge branch 'main' of github.com:adobe/react-spectrum into s2-docs2
devongovett Jun 9, 2025
54f5ced
more content
devongovett Jun 9, 2025
8829e96
initialize search menu
reidbarber Jun 9, 2025
3bef29e
search menu styles
reidbarber Jun 10, 2025
e535d31
add aria-labels to heading anchor links
reidbarber Jun 10, 2025
fb54ac8
mobile layout
devongovett Jun 11, 2025
f1b4670
filter cards in search menu by selected library
reidbarber Jun 11, 2025
d99352e
use sections in search menu
reidbarber Jun 11, 2025
b891f79
generate OG images
reidbarber Jun 11, 2025
2e4d447
fix og font
reidbarber Jun 12, 2025
06ca736
lint
reidbarber Jun 12, 2025
e27ea28
tabs fix
reidbarber Jun 12, 2025
05b5647
lock file
reidbarber Jun 12, 2025
0717145
Add codesandbox, stackblitz, and download zip
devongovett Jun 12, 2025
c9fcdda
tabs type fix
reidbarber Jun 12, 2025
e8807bd
centralize all menu show/hide logic in view transition
reidbarber Jun 12, 2025
2c46fc7
fix 'esc' handling to only close
reidbarber Jun 12, 2025
5460306
fix view transitions
reidbarber Jun 12, 2025
49d59db
close button on search menu
reidbarber Jun 12, 2025
b4932f9
add view transition to search field
reidbarber Jun 12, 2025
774281c
cleanup
reidbarber Jun 13, 2025
fdb5e95
tabs cleanup
reidbarber Jun 13, 2025
71cf053
fix submenu search field position
reidbarber Jun 13, 2025
fe290e8
Add shadcn registry and improve share links
devongovett Jun 13, 2025
0f8ced7
layout fixes
reidbarber Jun 13, 2025
852f7d0
fix header alignment
reidbarber Jun 16, 2025
5f56778
improve nav scrolling mask
reidbarber Jun 16, 2025
09316dd
remove submenu TOC feature
reidbarber Jun 16, 2025
3ee221b
add script to generate markdown docs
reidbarber Jun 17, 2025
ce268e4
handle StateTable in markdown script
reidbarber Jun 17, 2025
8b9841e
md script: support text-based PageDescription
reidbarber Jun 17, 2025
b943beb
md script: fix remaining missing page descriptions
reidbarber Jun 17, 2025
fe6464e
md script: fix missing slider description
reidbarber Jun 17, 2025
92f1c7e
cleanup
reidbarber Jun 17, 2025
7d20f93
md script: handle ExampleSwitcher and VisualExample
reidbarber Jun 17, 2025
2e02e61
md script: add 'Related Types' with tables for TypeLinks on page
reidbarber Jun 17, 2025
82a1191
add button to copy markdown
reidbarber Jun 17, 2025
ff22225
add meta tag for llm-friendly version
reidbarber Jun 18, 2025
e0d38a1
md script: fix default className rendering in StateTable
reidbarber Jun 18, 2025
3f2b74b
md script: fix missing PickerItem/PickerSection prop tables
reidbarber Jun 18, 2025
d0ef39a
md script: fix TypeLink for hooks
reidbarber Jun 18, 2025
dbbb4db
lint
reidbarber Jun 18, 2025
146b177
Merge branch 'main' of github.com:adobe/react-spectrum into s2-docs2
devongovett Jun 20, 2025
cea28cd
Merge branch 's2-docs2' into s2-docs-3
devongovett Jun 20, 2025
76c6dea
fixes
devongovett Jun 20, 2025
7b3ac32
layout chaneg
devongovett Jun 20, 2025
3cd6227
lint
devongovett Jun 20, 2025
ac2d1c9
build registry in ci
devongovett Jun 20, 2025
9048375
add correct registry url
devongovett Jun 20, 2025
422fd4a
upgrade parcel
devongovett Jun 20, 2025
1563dff
fix scrolling
devongovett Jun 21, 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
3 changes: 2 additions & 1 deletion .circleci/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ async function run() {

* [View the storybook](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook/index.html)
* [View the S2 storybook](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook-s2/index.html)
* [View the documentation](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/docs/index.html)`
* [View the documentation](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/docs/index.html)
* [View the S2 docs](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/s2-docs/index.html)`
});
} catch (err) {
console.error(err)
Expand Down
19 changes: 19 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,21 @@ jobs:
paths:
- '*/docs/'

s2-docs:
executor: rsp-xlarge
steps:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- run:
name: build s2 docs
command: make s2-docs

- persist_to_workspace:
root: dist
paths:
- '*/s2-docs/'

verdaccio:
executor: rsp-xlarge
steps:
Expand Down Expand Up @@ -869,6 +884,9 @@ workflows:
- docs:
requires:
- install
- s2-docs:
requires:
- install
- verdaccio:
filters:
branches:
Expand Down Expand Up @@ -923,6 +941,7 @@ workflows:
- storybook
- storybook-s2
- docs
- s2-docs
- deploy-verdaccio:
requires:
- v-docs
Expand Down
11 changes: 11 additions & 0 deletions .yarn/patches/@parcel-rsc-npm-2.14.4-224743f6b2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff --git a/lib/client.d.ts b/lib/client.d.ts
index abfc3ae8bc4cee00f322501e209bc8a63ee3a1d1..cfe5e732732d857804b87ec2534e90aea6749330 100644
--- a/lib/client.d.ts
+++ b/lib/client.d.ts
@@ -1,6 +1,5 @@
/* @jsxRuntime automatic */ import { ReactNode } from 'react';
import { HydrationOptions } from 'react-dom/client';
-type CallServerCallback = <T>(id: string, args: any[]) => Promise<T>;
export declare function setServerCallback(cb: CallServerCallback): void;
export type CallServerCallback = <T>(id: string, args: any[]) => Promise<T>;
export interface HydrateOptions extends HydrationOptions {
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ website-production:
cp packages/dev/docs/pages/robots.txt dist/production/docs/robots.txt
$(MAKE) starter-zip
$(MAKE) tailwind-starter
$(MAKE) s2-docs
$(MAKE) s2-storybook-docs

check-examples:
node scripts/extractExamples.mjs
Expand All @@ -135,9 +135,15 @@ tailwind-starter:
cd starters/tailwind && yarn build-storybook
mv starters/tailwind/storybook-static dist/production/docs/react-aria-tailwind-starter

s2-docs:
yarn build:s2-docs -o dist/production/docs/s2
s2-storybook-docs:
yarn build:s2-storybook-docs -o dist/production/docs/s2

s2-api-diff:
node scripts/buildBranchAPI.js
node scripts/api-diff.js --skip-same --skip-style-props

s2-docs:
node scripts/extractStarter.mjs
yarn build:s2-docs --public-url /reactspectrum/$$(git rev-parse HEAD)/s2-docs
mkdir -p dist/$$(git rev-parse HEAD)
mv packages/dev/s2-docs/dist dist/$$(git rev-parse HEAD)/s2-docs
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ export default [{
}],
},
}, {
files: ["packages/@react-spectrum/s2/**"],
files: ["packages/@react-spectrum/s2/**", "packages/dev/s2-docs/**"],

rules: {
"react/react-in-jsx-scope": OFF,
Expand Down
43 changes: 25 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
"build:chromatic-fc": "CHROMATIC=1 storybook build -c .chromatic-fc -o dist/$(git rev-parse HEAD)/chromatic-fc",
"start:s2": "NODE_ENV=storybook storybook dev -p 6006 --ci -c '.storybook-s2'",
"build:storybook-s2": "NODE_ENV=storybook storybook build -c .storybook-s2 -o dist/$(git rev-parse HEAD)/storybook-s2",
"build:s2-docs": "NODE_ENV=storybook storybook build -c .storybook-s2 --docs",
"build:s2-storybook-docs": "NODE_ENV=storybook storybook build -c .storybook-s2 --docs",
"start:docs": "DOCS_ENV=dev parcel 'packages/@react-{spectrum,aria,stately}/*/docs/*.mdx' 'packages/react-aria-components/docs/**/*.mdx' 'packages/@internationalized/*/docs/*.mdx' 'packages/dev/docs/pages/**/*.mdx'",
"build:docs": "DOCS_ENV=staging parcel build 'packages/@react-{spectrum,aria,stately}/*/docs/*.mdx' 'packages/react-aria-components/docs/**/*.mdx' 'packages/@internationalized/*/docs/*.mdx' 'packages/dev/docs/pages/**/*.mdx'",
"start:s2-docs": "yarn workspace @react-spectrum/s2-docs start",
"build:s2-docs": "yarn workspace @react-spectrum/s2-docs build",
"test": "cross-env STRICT_MODE=1 yarn jest",
"test:lint": "node packages/**/*.test-lint.js",
"test-loose": "cross-env VIRT_ON=1 yarn jest",
Expand Down Expand Up @@ -85,19 +87,21 @@
"@faker-js/faker": "^8.4.1",
"@jdb8/eslint-plugin-monorepo": "^1.0.1",
"@octokit/rest": "*",
"@parcel/bundler-library": "^2.14.0",
"@parcel/config-default": "^2.14.0",
"@parcel/config-storybook": "0.0.2",
"@parcel/core": "^2.14.0",
"@parcel/optimizer-data-url": "^2.14.0",
"@parcel/optimizer-terser": "^2.14.0",
"@parcel/packager-ts": "^2.14.0",
"@parcel/reporter-cli": "^2.14.0",
"@parcel/resolver-glob": "^2.14.0",
"@parcel/transformer-inline": "^2.14.0",
"@parcel/transformer-inline-string": "^2.14.0",
"@parcel/transformer-svg-react": "^2.14.0",
"@parcel/transformer-typescript-types": "^2.14.0",
"@parcel/bundler-library": "^2.15.1",
"@parcel/config-default": "^2.15.1",
"@parcel/config-storybook": "^0.0.2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The range on this doesn't mean anything, do you want this instead?

Suggested change
"@parcel/config-storybook": "^0.0.2",
"@parcel/config-storybook": ">=0.0.2",

"@parcel/core": "^2.15.1",
"@parcel/optimizer-data-url": "^2.15.1",
"@parcel/optimizer-terser": "^2.15.1",
"@parcel/packager-react-static": "^2.15.1",
"@parcel/packager-ts": "^2.15.1",
"@parcel/reporter-cli": "^2.15.1",
"@parcel/resolver-glob": "^2.15.1",
"@parcel/transformer-inline": "^2.15.1",
"@parcel/transformer-inline-string": "^2.15.1",
"@parcel/transformer-react-static": "^2.15.1",
"@parcel/transformer-svg-react": "^2.15.1",
"@parcel/transformer-typescript-types": "^2.15.1",
"@react-spectrum/s2-icon-builder": "^0.2.0",
"@spectrum-css/component-builder": "workspace:^",
"@spectrum-css/vars": "^2.3.0",
Expand All @@ -121,7 +125,7 @@
"@stylistic/eslint-plugin-ts": "^2.9.0",
"@swc/core": "^1.3.36",
"@swc/jest": "^0.2.36",
"@tailwindcss/postcss": "^4.0.0",
"@tailwindcss/postcss": "^4.0.17",
"@testing-library/dom": "^10.1.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^16.0.0",
Expand Down Expand Up @@ -177,7 +181,7 @@
"npm-cli-login": "^1.0.0",
"nyc": "^10.2.0",
"p-queue": "^6.2.1",
"parcel": "^2.14.0",
"parcel": "^2.15.1",
"parcel-optimizer-strict-mode": "workspace:^",
"patch-package": "^6.2.0",
"playwright": "^1.45.3",
Expand Down Expand Up @@ -238,7 +242,8 @@
"@types/node@npm:>= 8": "^22",
"micromark-extension-mdxjs": "patch:micromark-extension-mdxjs@npm%3A1.0.0#~/.yarn/patches/micromark-extension-mdxjs-npm-1.0.0-d2b6b69e4a.patch",
"remark-mdx": "patch:remark-mdx@npm%3A2.0.0-rc.2#~/.yarn/patches/remark-mdx-npm-2.0.0-rc.2-7a71234e1f.patch",
"remark-parse": "patch:remark-parse@npm%3A10.0.1#~/.yarn/patches/remark-parse-npm-10.0.1-e654d7df78.patch"
"remark-parse": "patch:remark-parse@npm%3A10.0.1#~/.yarn/patches/remark-parse-npm-10.0.1-e654d7df78.patch",
"lightningcss": "1.30.1"
},
"@parcel/transformer-css": {
"cssModules": {
Expand All @@ -252,7 +257,9 @@
"packages/@react-spectrum/color/src/*.tsx",
"packages/@react-spectrum/s2/**/*.{js,ts,tsx}",
"packages/@react-spectrum/s2/stories/**",
".storybook-s2/**"
".storybook-s2/**",
"packages/dev/s2-docs/**",
"starters/**"
]
},
"drafts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@react-aria/breadcrumbs/docs/anatomy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/@react-aria/calendar/docs/calendar-anatomy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/@react-aria/checkbox/docs/checkbox-anatomy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/@react-aria/color/docs/ColorAreaAnatomy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/@react-aria/color/docs/ColorFieldAnatomy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/@react-aria/color/docs/ColorSliderAnatomy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/@react-aria/color/docs/ColorWheelAnatomy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/@react-aria/combobox/docs/anatomy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/@react-aria/datepicker/docs/datefield-anatomy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/@react-aria/datepicker/docs/timefield-anatomy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/@react-aria/dialog/docs/anatomy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/@react-aria/disclosure/docs/anatomy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/@react-aria/dnd/docs/Anatomy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/@react-aria/dnd/docs/DragAffordance.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading