From 4130ba1aec44266158227f09b1c27b01c6bc2a9c Mon Sep 17 00:00:00 2001 From: Philipp Spiess Date: Wed, 7 May 2025 11:37:47 +0200 Subject: [PATCH 1/3] Update contribution docs --- .github/CONTRIBUTING.md | 72 ++++++++++++++++++++++++++++++-- .github/PULL_REQUEST_TEMPLATE.md | 22 +++++++++- 2 files changed, 89 insertions(+), 5 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 93e104db8d2d..470b02d4effb 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,5 +1,41 @@ # Contributing +## Requirements + +Before getting started, ensure your system has access to the following tools: + +- [Node.js](https://nodejs.org/) +- [Rustup](https://rustup.rs/) +- [pnpm](https://pnpm.io/) + +## Getting started + +```sh +# Install dependencies +pnpm install + +# Install Rust toolchain and WASM targets +rustup default stable +rustup target add wasm32-wasip1-threads + +# Build the project +pnpm build +``` + +## Development workflow + +During development, you can run tests in watch mode: + +```sh +pnpm tdd +``` + +The `playgrounds` directory contains example projects you can use to test your changes. To start the Vite playground, use: + +```sh +pnpm build && pnpm vite +``` + ## Bug fixes If you've found a bug in Tailwind that you'd like to fix, [submit a pull request](https://github.com/tailwindlabs/tailwindcss/pulls) with your changes. Include a helpful description of the problem and how your changes address it, and provide tests so we can verify the fix works as expected. @@ -28,10 +64,40 @@ pnpm run format ## Running tests -You can run the test suite using the following commands: +You can run the TypeScript and Rust test suites using the following command: + +```sh +pnpm test +``` + +To run the integration tests, use: + +```sh +pnpm build && pnpm test:integrations +``` + +Additionally, some features require testing in browsers (i.e to ensure CSS variable resolution works as expected). These can be run via: ```sh -pnpm build && pnpm test +pnpm build && pnpm test:ui ``` -Please ensure that the tests are passing when submitting a pull request. If you're adding new features to Tailwind, please include tests. +Please ensure that all tests are passing when submitting a pull request. If you're adding new features to Tailwind CSS, always include tests. + +After a successful build, you can also use the npm package tarballs created inside the `dist/` folder to install your build in other local projects. + +## Pull request process + +When submitting a pull request: + +- Ensure the pull request title and description explain the changes you made and why you made them. +- Include a test plan section that outlines how you tested your contributions. We do not accept contributions without tests. +- Ensure all tests pass. You can add the tag `[ci-all]` in your pull request description to run the test suites across all platforms. + +When a pull request is created, Tailwind CSS maintainers will be notified automatically. + +## Communication + +- **GitHub discussions**: For feature ideas and general questions +- **GitHub issues**: For bug reports +- **GitHub pull requests**: For code contributions diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ce7fafb97dc0..91ccc9c9bd7e 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,8 +4,26 @@ **Please ask first before starting work on any significant new features.** -It's never a fun experience to have your pull request declined after investing a lot of time and effort into a new feature. To avoid this from happening, we request that contributors create an issue to first discuss any significant new features. This includes things like adding new utilities, creating new at-rules, or adding new component examples to the documentation. +It's never a fun experience to have your pull request declined after investing a lot of time and effort into a new feature. To avoid this from happening, we request that contributors create an issue to first discuss any significant new features. -https://github.com/tailwindcss/tailwindcss/blob/master/.github/CONTRIBUTING.md +For more info, check out the contributing guide: + +https://github.com/tailwindcss/tailwindcss/blob/main/.github/CONTRIBUTING.md + +--> + +## Summary + + + +## Test plan + + From 70204071a273e2beb4a3d0dab30c81908f535322 Mon Sep 17 00:00:00 2001 From: Philipp Spiess Date: Wed, 7 May 2025 14:02:04 +0200 Subject: [PATCH 2/3] Update .github/PULL_REQUEST_TEMPLATE.md Co-authored-by: Robin Malfait --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 91ccc9c9bd7e..ee9d3f9abcc0 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,7 +4,7 @@ **Please ask first before starting work on any significant new features.** -It's never a fun experience to have your pull request declined after investing a lot of time and effort into a new feature. To avoid this from happening, we request that contributors create an issue to first discuss any significant new features. +It's never a fun experience to have your pull request declined after investing a lot of time and effort into a new feature. To avoid this from happening, we request that contributors create a discussion to first discuss any significant new features. For more info, check out the contributing guide: From 000d02b4c8da64a5286098b4fe1e05aeffcfd440 Mon Sep 17 00:00:00 2001 From: Philipp Spiess Date: Wed, 7 May 2025 17:35:19 +0200 Subject: [PATCH 3/3] clarify things --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 470b02d4effb..42645aa492d5 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -42,7 +42,7 @@ If you've found a bug in Tailwind that you'd like to fix, [submit a pull request ## New features -If there's a new feature you'd like to see added to Tailwind, [share your idea with us](https://github.com/tailwindlabs/tailwindcss/discussions/new?category=ideas) in our discussion forum to get it on our radar as something to consider for a future release. +If there's a new feature you'd like to see added to Tailwind, [share your idea with us](https://github.com/tailwindlabs/tailwindcss/discussions/new?category=ideas) in our discussion forum to get it on our radar as something to consider for a future release before starting work on it. **Please note that we don't often accept pull requests for new features.** Adding a new feature to Tailwind requires us to think through the entire problem ourselves to make sure we agree with the proposed API, which means the feature needs to be high on our own priority list for us to be able to give it the attention it needs.