You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+77-5Lines changed: 77 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,14 @@
2
2
3
3
Thanks for your interest in contributing to Headless UI! Please take a moment to review this document **before submitting a pull request**.
4
4
5
+
-[Pull requests](#pull-requests)
6
+
-[Monorepo](#monorepo)
7
+
-[Installation](#installation)
8
+
-[Coding standards](#coding-standards)
9
+
-[Running tests](#running-tests)
10
+
-[Running playgrounds](#running-playgrounds)
11
+
-[Scripts summary](#scripts-summary)
12
+
5
13
## Pull requests
6
14
7
15
**Please ask first before starting work on any significant new features.**
@@ -11,22 +19,28 @@ Also make sure that you are making changes to both the `React` and `Vue` version
11
19
12
20
## Monorepo
13
21
14
-
The Headless UI repo is a monorepo using `yarn` workspaces. Note that we are using `yarn` version 1.
22
+
The Headless UI repo is a monorepo using `yarn` workspaces. Note that we are using `yarn`**version 1**.
15
23
16
-
## Coding standards
24
+
## Installation
17
25
18
-
Our code formatting rules are defined by TSDX, which uses `eslint` and we also use `prettier`. You can check your code against these standards by running:
26
+
You only require a `yarn install` in the root directory to install everything you need.
19
27
20
28
```sh
21
-
yarn lint
29
+
yarn install
22
30
```
23
31
32
+
## Coding standards
33
+
34
+
We use `prettier` for making sure that the codebase is formatted consistently.
24
35
To automatically fix any style violations in your code, you can run:
25
36
26
37
```sh
27
-
yarn lint --fix
38
+
yarn lint
28
39
```
29
40
41
+
**Note**: Whenever you commit, the lint check will run on all staged files.
42
+
**Note**: In CI, we will only check your code, and not write with the formatted files. If you want to just check, then you can either run `yarn lint-check` or `CI=true yarn lint`
43
+
30
44
## Running tests
31
45
32
46
You can run the test suite using the following commands:
@@ -47,3 +61,61 @@ yarn vue test
47
61
48
62
Please ensure that the tests are passing when submitting a pull request. If you're adding new features to Headless UI, please include tests.
49
63
64
+
## Running playgrounds
65
+
66
+
Currently the `React` playground (located in `packages/playground-react`) is a Next.js app that contains some examples which you can find in the `pages` directory. The `Vue` playground (located in `packages/playground-vue`) is a Vite app that contains some examples which you can find in the `src/components` directory.
67
+
68
+
You can launch them by running:
69
+
70
+
```sh
71
+
yarn react playground
72
+
73
+
# or
74
+
75
+
yarn vue playground
76
+
```
77
+
78
+
This will also start the necessary watchers so that you don't have to care about them.
79
+
80
+
## Scripts summary
81
+
82
+
Global scripts, and some aliases:
83
+
84
+
-`yarn install`: install all dependencies for all packages
85
+
-`yarn clean`: this will call all `yarn {package} clean` commands
86
+
-`yarn build`: this will call all `yarn {package} build` commands
87
+
-`yarn lint`: this will `lint` all packages
88
+
-`yarn test`: this will `test` all packages
89
+
-`yarn test`: run all jest tests
90
+
-`yarn test --watch`: run all jest tests in interactive mode
91
+
-`yarn test tabs`: run all jest tests filtered by `tabs`
92
+
-`yarn test tabs --watch`: run all jest tests in interactive mode filtered by `tabs`
93
+
94
+
Scripts per package:
95
+
96
+
-`yarn react`: Prefix to run anything in the `@headlessui/react` package
97
+
-`yarn react test`: run all jest tests
98
+
-`yarn react test --watch`: run all jest tests in interactive mode
99
+
-`yarn react test tabs`: run all jest tests filtered by `tabs`
100
+
-`yarn react test tabs --watch`: run all jest tests in interactive mode filtered by `tabs`
101
+
-`yarn react build`: build the final artefacts
102
+
-`yarn react lint`: validate and fix the react codebase using prettier
103
+
-`yarn react watch`: start a watcher for the react esm build
104
+
-**Note**: this will be executed for you when using the `yarn react playground`
105
+
-**Note**: this is not required for jest. You will probably never need this
106
+
-`yarn react playground`: (alias) start a development server in the `playground-react` package
107
+
-**Note**: this will also run `yarn react watch` for you, which means that you only need to execute `yarn react playground`
108
+
-`yarn react clean`: this will remove `dist` files
109
+
-`yarn vue`: Prefix to run anything in the `@headlessui/vue` package
110
+
-`yarn vue test`: run all jest tests
111
+
-`yarn vue test --watch`: run all jest tests in interactive mode
112
+
-`yarn vue test tabs`: run all jest tests filtered by `tabs`
113
+
-`yarn vue test tabs --watch`: run all jest tests in interactive mode filtered by `tabs`
114
+
-`yarn vue build`: build the final artefacts
115
+
-`yarn vue lint`: validate and fix the vue codebase using prettier
116
+
-`yarn vue watch`: start a watcher for the vue esm build
117
+
-**Note**: this will be executed for you when using the `yarn vue playground`
118
+
-**Note**: this is not required for jest. You will probably never need this
119
+
-`yarn vue playground`: (alias) start a development server in the `playground-vue` package
120
+
-**Note**: this will also run `yarn vue watch` for you, which means that you only need to execute `yarn react playground`
Copy file name to clipboardExpand all lines: CHANGELOG.md
+14-5Lines changed: 14 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
12
12
- Ensure correct order when conditionally rendering `Menu.Item`, `Listbox.Option` and `RadioGroup.Option` ([#1045](https://github.com/tailwindlabs/headlessui/pull/1045))
- Ensure correct order when conditionally rendering `MenuItem`, `ListboxOption` and `RadioGroupOption` ([#1045](https://github.com/tailwindlabs/headlessui/pull/1045))
@@ -88,7 +98,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
98
- Add `aria-orientation` to `Listbox`, which swaps Up/Down with Left/Right keys ([#683](https://github.com/tailwindlabs/headlessui/pull/683))
89
99
- Expose `close` function from the render prop for `Disclosure`, `Disclosure.Panel`, `Popover` and `Popover.Panel` ([#697](https://github.com/tailwindlabs/headlessui/pull/697))
90
100
91
-
92
101
## [@headlessui/vue@v1.4.0] - 2021-07-29
93
102
94
103
### Added
@@ -100,7 +109,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
100
109
101
110
## [@headlessui/react@v1.3.0] - 2021-06-21
102
111
103
-
### Added
112
+
### Added
104
113
105
114
- Ensure that you can use `Transition.Child` when using implicit Transitions ([#503](https://github.com/tailwindlabs/headlessui/pull/503))
106
115
- Add new `entered` prop for `Transition` and `Transition.Child` components ([#504](https://github.com/tailwindlabs/headlessui/pull/504))
@@ -120,7 +129,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
120
129
121
130
## [@headlessui/vue@v1.3.0] - 2021-06-21
122
131
123
-
### Added
132
+
### Added
124
133
125
134
- Ensure that you can use `TransitionChild` when using implicit Transitions ([#503](https://github.com/tailwindlabs/headlessui/pull/503))
126
135
- Add new `entered` prop for `Transition` and `TransitionChild` components ([#504](https://github.com/tailwindlabs/headlessui/pull/504))
@@ -134,7 +143,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
134
143
135
144
## [@headlessui/react@v1.2.0] - 2021-05-10
136
145
137
-
### Added
146
+
### Added
138
147
139
148
- Introduce Open/Closed state, to simplify component communication ([#466](https://github.com/tailwindlabs/headlessui/pull/466))
140
149
@@ -146,7 +155,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
146
155
147
156
## [@headlessui/vue@v1.2.0] - 2021-05-10
148
157
149
-
### Added
158
+
### Added
150
159
151
160
- Introduce Open/Closed state, to simplify component communication ([#466](https://github.com/tailwindlabs/headlessui/pull/466))
Copy file name to clipboardExpand all lines: README.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,4 +49,3 @@ For casual chit-chat with others using the library:
49
49
## Contributing
50
50
51
51
If you're interested in contributing to Headless UI, please read our [contributing docs](https://github.com/tailwindlabs/headlessui/blob/main/.github/CONTRIBUTING.md)**before submitting a pull request**.
0 commit comments