Skip to content

Commit

Permalink
Merge branch 'main' into clean-up-lint-warnings
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/@react-aria/focus/src/useFocusable.tsx
#	packages/@react-aria/interactions/src/useInteractOutside.ts
#	packages/@react-spectrum/utils/src/Slots.tsx
  • Loading branch information
snowystinger committed Sep 1, 2021
2 parents 874011a + de64434 commit 2166816
Show file tree
Hide file tree
Showing 705 changed files with 22,167 additions and 4,372 deletions.
57 changes: 0 additions & 57 deletions .chromatic/custom-addons/chromatic/chromatic.css

This file was deleted.

1 change: 0 additions & 1 deletion .chromatic/custom-addons/chromatic/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {locales, scales, themes} from '../../constants';
import {makeDecorator} from '@storybook/addons';
import {Provider, View} from '@adobe/react-spectrum';
import React, {useEffect} from 'react';
import styles from './chromatic.css';

export const withChromaticProvider = makeDecorator({
name: 'withChromaticProvider',
Expand Down
23 changes: 23 additions & 0 deletions .chromatic/preview-head.html
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
<link rel="preload" href="https://use.typekit.net/uma8ayv.css" as="style" />

<link rel="preload" href="https://use.typekit.net/af/cb695f/000000000000000000017701/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3" as="font" crossorigin="anonymous" />
<link rel="preload" href="https://use.typekit.net/af/cb695f/000000000000000000017701/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3" as="font" crossorigin="anonymous" />
<link rel="preload" href="https://use.typekit.net/af/cb695f/000000000000000000017701/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3" as="font" crossorigin="anonymous" />

<link rel="preload" href="https://use.typekit.net/af/74ffb1/000000000000000000017702/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3" as="font" crossorigin="anonymous" />
<link rel="preload" href="https://use.typekit.net/af/74ffb1/000000000000000000017702/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3" as="font" crossorigin="anonymous" />
<link rel="preload" href="https://use.typekit.net/af/74ffb1/000000000000000000017702/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3" as="font" crossorigin="anonymous" />

<link rel="preload" href="https://use.typekit.net/af/eaf09c/000000000000000000017703/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3" as="font" crossorigin="anonymous" />
<link rel="preload" href="https://use.typekit.net/af/eaf09c/000000000000000000017703/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3" as="font" crossorigin="anonymous" />
<link rel="preload" href="https://use.typekit.net/af/eaf09c/000000000000000000017703/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3" as="font" crossorigin="anonymous" />

<link rel="preload" href="https://use.typekit.net/af/40207f/0000000000000000000176ff/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3" as="font" crossorigin="anonymous" />
<link rel="preload" href="https://use.typekit.net/af/40207f/0000000000000000000176ff/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3" as="font" crossorigin="anonymous" />
<link rel="preload" href="https://use.typekit.net/af/40207f/0000000000000000000176ff/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3" as="font" crossorigin="anonymous" />

<link rel="preload" href="https://use.typekit.net/af/505d17/00000000000000003b9aee44/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3" as="font" crossorigin="anonymous" />
<link rel="preload" href="https://use.typekit.net/af/505d17/00000000000000003b9aee44/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3" as="font" crossorigin="anonymous" />
<link rel="preload" href="https://use.typekit.net/af/505d17/00000000000000003b9aee44/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3" as="font" crossorigin="anonymous" />


<link rel="stylesheet" href="https://use.typekit.net/uma8ayv.css" />
120 changes: 35 additions & 85 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@
version: 2.1

orbs:
azure-cli: circleci/[email protected]
jobs:
install:

executors:
rsp:
docker:
- image: circleci/node:12
- image: cimg/node:12.22
environment:
CACHE_VERSION: v1
working_directory: ~/react-spectrum

rsp-large:
docker:
- image: cimg/node:12.22
resource_class: large
environment:
CACHE_VERSION: v1
working_directory: ~/react-spectrum

rsp-xlarge:
docker:
- image: cimg/node:12.22
resource_class: xlarge
environment:
CACHE_VERSION: v1
working_directory: ~/react-spectrum

jobs:
install:
executor: rsp-large
steps:
- checkout
- restore_cache:
Expand Down Expand Up @@ -41,13 +61,7 @@ jobs:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

install-17:
docker:
- image: circleci/node:12
resource_class: large
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
executor: rsp-large
steps:
- checkout
- restore_cache:
Expand All @@ -67,13 +81,7 @@ jobs:
key: react-spectrum17-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

test-ssr:
docker:
- image: circleci/node:12
resource_class: xlarge
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
executor: rsp-xlarge
steps:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
Expand All @@ -84,13 +92,7 @@ jobs:

test:
parallelism: 3
docker:
- image: circleci/node:12
resource_class: xlarge
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
executor: rsp-xlarge
steps:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
Expand All @@ -115,13 +117,7 @@ jobs:
path: ~/junit

test-ssr-17:
docker:
- image: circleci/node:12
resource_class: xlarge
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
executor: rsp-xlarge
steps:
- restore_cache:
key: react-spectrum17-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
Expand All @@ -133,13 +129,7 @@ jobs:
test-17:
parallelism: 3
docker:
- image: circleci/node:12
resource_class: xlarge
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
executor: rsp-xlarge
steps:
- restore_cache:
key: react-spectrum17-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
Expand All @@ -162,12 +152,7 @@ jobs:
path: ~/junit

lint:
docker:
- image: circleci/node:12
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
executor: rsp
steps:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
Expand All @@ -177,13 +162,7 @@ jobs:
command: yarn lint

storybook:
docker:
- image: circleci/node:12
resource_class: large
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
executor: rsp-large
steps:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
Expand All @@ -198,13 +177,7 @@ jobs:
- '*/storybook/'

storybook-17:
docker:
- image: circleci/node:12
resource_class: large
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
executor: rsp-large
steps:
- restore_cache:
key: react-spectrum17-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
Expand All @@ -219,13 +192,7 @@ jobs:
- '*/storybook-17/'

docs:
docker:
- image: circleci/node:12
resource_class: xlarge
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
executor: rsp-xlarge
steps:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
Expand All @@ -240,13 +207,7 @@ jobs:
- '*/docs/'

docs-production:
docker:
- image: circleci/node:12
resource_class: xlarge
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
executor: rsp-xlarge
steps:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
Expand Down Expand Up @@ -282,12 +243,7 @@ jobs:
command: az storage blob upload-batch -d "\$web" -s /tmp/dist/production/docs --account-name reactspectrum

comment:
docker:
- image: circleci/node:12
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
executor: rsp
steps:
- checkout
- restore_cache:
Expand All @@ -301,13 +257,7 @@ jobs:
fi
publish-nightly:
docker:
- image: circleci/node:12
resource_class: xlarge
environment:
CACHE_VERSION: v1

working_directory: ~/react-spectrum
executor: rsp-xlarge
steps:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
Expand Down
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ module.exports = {
// enable this rule to see literally everything missing jsdocs, this rule needs some refinement but is good as a sanity check.
// 'jsdoc/require-jsdoc': [ERROR, {contexts:['TSInterfaceDeclaration TSPropertySignature', 'TSInterfaceDeclaration TSMethodSignature']}],
'jsdoc/require-description': [ERROR, {exemptedBy: ['deprecated'], checkConstructors: false}],
'no-redeclare': OFF,
'@typescript-eslint/no-redeclare': ERROR,
'no-unused-vars': OFF,
'@typescript-eslint/no-unused-vars': ERROR,
'@typescript-eslint/member-delimiter-style': [ERROR, {
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
packages/@adobe/spectrum-css-temp/** @lazd @garthdb
packages/** @LFDanLu @ktabors @snowystinger @dannify @devongovett @pst67662 @MilanBrkicFON @MidnightCoder06
packages/** @LFDanLu @ktabors @snowystinger @dannify @devongovett @reidbarber
** @snowystinger @dannify @devongovett
1 change: 1 addition & 0 deletions .parcelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "@parcel/config-default",
"resolvers": ["parcel-resolver-docs", "..."],
"transformers": {
"apiCheck:*.{js,ts,tsx,json}": ["parcel-transformer-docs"],
"docs:*.{js,ts,tsx,json}": ["parcel-transformer-docs", "@parcel/transformer-inline"],
"docs-json:*.{js,ts,tsx,json}": ["parcel-transformer-docs"],
"*.{md,mdx}": ["parcel-transformer-mdx-docs"],
Expand Down
2 changes: 1 addition & 1 deletion .storybook/theme.register.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {themes} from '@storybook/theming';
import addons from '@storybook/addons';
import {FORCE_RE_RENDER} from '@storybook/core-events';
// temporary until we have a better place to grab it from
import * as packageJSON from '../packages/@react-spectrum/alert/package.json';
import * as packageJSON from '../packages/@adobe/react-spectrum/package.json';

// Automatically switch light/dark theme based on system pref.
addons.register('theme-switcher', api => {
Expand Down
28 changes: 27 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Lastly, please follow the pull request template when submitting a pull request!
All third-party contributions to this project must be accompanied by a signed contributor license agreement. This gives Adobe permission to redistribute your contributions as part of the project. [Sign our CLA](https://opensource.adobe.com/cla.html). You only need to submit an Adobe CLA one time, so if you have submitted one previously, you are good to go!

## Where to start
There are many places to dive into react-spectrum to help out. Before you take on a feature or issue, make sure you become familiar with [our architecture](architecture.html).
There are many places to dive into react-spectrum to help out. Before you take on a feature or issue, make sure you become familiar with [our architecture](https://react-spectrum.adobe.com/architecture.html).

If you are looking for place to start, consider the following options:
- Look for issues tagged with help wanted and/or good first issue.
Expand Down Expand Up @@ -77,6 +77,32 @@ Or run the documentation and browse to [http://localhost:1234/](http://localhost
yarn start:docs
```

### Component/Hook scaffolding
If you are looking to contribute a brand new component or Hook in a package that does not exist yet, please run the following command.
```bash
yarn plop
```
This will start a series of cli prompts to determine what template files and folders should be generated to help quick start your contribution.
The prompts are as follows:

1. What type of project are you setting up?
- Select "React Spectrum v3"

2. Scope name(s)
- Select the package scopes that make sense for your contribution (e.g. react-spectrum if you are contributing a component, react-aria for an aria Hook, etc)

3. Package name, all lowercase (e.g. textfield)

4. Component name, please use appropriate uppercase (e.g. TextField)
- If you are contributing a non-component Hook, just enter the name of your Hook.

5. Component css module name, blank if N/A. If unsure, check @adobe/spectrum-css-temp/components for a module containing the desired css (e.g. textfield)
- If you cannot find the component CSS module name in @adobe/spectrum-css-temp/components, feel free to reach out to a team member via GitHub Issues or Discussions.

Upon answering all the prompts, the appropriate package(s) should be generated and ready for modification.

**Note:** With regards to the generated docs files, please feel free to remove them if you won't be contributing docs. If you are contributing docs for a new component or Hook, please submit them in a separate pull request so that we can decide when to deploy them to our docs site.

### Tests
We use [jest](https://jestjs.io/) for unit tests and [react-testing-library](https://testing-library.com/docs/react-testing-library/intro) for rendering and writing assertions. Please make sure you include tests with your pull requests. Our CI will run the tests on PRs as well as the linter and type checker. You can see on each PR whether you have passed all our checks. We split the tests into 2 groups.

Expand Down
Loading

0 comments on commit 2166816

Please sign in to comment.