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

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 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
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",
"@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