SIGN IN SIGN UP
mui / material-ui UNCLAIMED

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.

0 0 0 JavaScript
# Contributing to Material UI and MUI System
If you're reading this, you're awesome!
Thank you for being a part of the community and helping us make these projects great.
Here are a few guidelines that will help you along the way.
## Summary
- [Code of conduct](#code-of-conduct)
- [A large spectrum of contributions](#a-large-spectrum-of-contributions)
- [Your first pull request](#your-first-pull-request)
- [Sending a pull request](#sending-a-pull-request)
- [Trying changes on the documentation site](#trying-changes-on-the-documentation-site)
- [Trying changes on the playground](#trying-changes-on-the-playground)
- [How to increase the chances of being accepted](#how-to-increase-the-chances-of-being-accepted)
- [CI checks and how to fix them](#ci-checks-and-how-to-fix-them)
- [Updating the component API documentation](#updating-the-component-api-documentation)
- [Coding style](#coding-style)
- [Contributing to the documentation](#contributing-to-the-documentation)
- [How to find docs issues to work on](#how-to-find-docs-issues-to-work-on)
- [How to add a new demo to the docs](#how-to-add-a-new-demo-to-the-docs)
- [How can I use a change that hasn't been released yet?](#how-can-i-use-a-change-that-hasnt-been-released-yet)
- [Roadmap](#roadmap)
- [License](#license)
## Code of conduct
2016-01-27 21:45:25 +00:00
We have adopted the [Contributor Covenant](https://www.contributor-covenant.org/) as our code of conduct, and we expect project participants to adhere to it.
Please read [the full text](https://github.com/mui/.github/blob/master/CODE_OF_CONDUCT.md) to understand what actions will and will not be tolerated.
2016-01-27 21:45:25 +00:00
## A large spectrum of contributions
2016-01-27 21:45:25 +00:00
There are [many ways](https://mui.com/material-ui/getting-started/faq/#mui-is-awesome-how-can-i-support-the-project) to contribute to the library, and writing code is only one part of the story—[documentation improvements](#contributing-to-the-documentation) can be just as important as code changes.
If you have an idea for an improvement to the code or the docs, we encourage you to open an issue as a first step, to discuss your proposed changes with the maintainers before proceeding.
2016-01-27 21:45:25 +00:00
## Your first pull request
Working on your first pull request? You can learn how in this free video series: [How to Contribute to an Open Source Project on GitHub](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github).
2018-03-16 20:17:16 +00:00
Get started with [good first issues](https://github.com/mui/material-ui/issues?q=is:open+is:issue+label:"good+first+issue"), which have a limited scope and a working solution that's already been discussed.
This makes them ideal for newer developers, or those who are new to these libraries and want to see how the contribution process works.
2016-01-27 21:45:25 +00:00
We also have a list of [ready to take issues](https://github.com/mui/material-ui/issues?q=is:open+is:issue+label:"ready+to+take"), which are issues that have already been at least partially resolved in discussion, to the point that it's clear what to do next.
These issues are great for developers who want to reduce their chances of falling down a rabbit hole in search of a solution.
Of course, you can work on any other issue you like—the "good first" and "ready to take" issues are simply those where the scope and timeline may be better defined.
Pull requests for other issues, or completely novel problems, may take a bit longer to review if they don't fit into our current development cycle.
If you decide to fix an issue, please make sure to check the comment thread in case somebody is already working on a fix.
If nobody is working on it at the moment, please leave a comment stating that you've started to work on it, so other people don't accidentally duplicate your effort.
If somebody claims an issue but doesn't follow up after more than a week, it's fine to take over, but you should still leave a comment.
If there has been no activity on the issue for 7 to 14 days, then it's safe to assume that nobody is working on it.
## Sending a pull request
MUI Core projects are community-driven, so pull requests are always welcome, but before working on a large change, it's best to open an issue first to discuss it with the maintainers.
When in doubt, keep your pull requests small.
For the best chances of being accepted, don't bundle more than one feature or bug fix per PR.
It's often best to create two smaller PRs rather than one big one.
2016-01-27 21:45:25 +00:00
1. Fork the repository.
2. Clone the fork to your local machine and add the upstream remote:
2016-01-27 21:45:25 +00:00
```bash
git clone https://github.com/<your username>/material-ui.git
cd material-ui
2022-02-06 16:32:18 +01:00
git remote add upstream https://github.com/mui/material-ui.git
```
<!-- #target-branch-reference -->
2024-08-27 14:15:20 +07:00
3. Synchronize your local `master` branch with the upstream one:
```bash
2024-08-27 14:15:20 +07:00
git checkout master
git pull upstream master
```
4. Install the dependencies with pnpm (yarn or npm aren't supported):
```bash
pnpm install
2016-01-27 21:45:25 +00:00
```
5. Create a new topic branch:
```bash
git checkout -b my-topic-branch
```
6. Make changes, commit, and push to your fork:
```bash
git push -u origin HEAD
```
7. Go to [the repository](https://github.com/mui/material-ui) and open a pull request.
The core team actively monitors for new pull requests.
We will review your PR and either merge it, request changes to it, or close it with an explanation.
### Trying changes on the documentation site
The documentation site is built with Material UI and contains examples of all of the components.
This is the best place to experiment with your changes—it's the local development environment used by the maintainers.
To get started, run:
```bash
pnpm start
```
You can now access the documentation site locally: http://localhost:3000.
Changes to the docs will hot reload the site.
### Trying changes on the playground
While we do recommend trying your changes on the documentation site, this is not always ideal.
You might face the following problems:
- Updating the existing demos prevents you from working in isolation on a single instance of the component
- Emptying an existing page to try your changes in isolation leads to a noisy `git diff`
- Static linters may report issues that you might not care about
To avoid these problems, you can use this playground:
```bash
pnpm docs:create-playground && pnpm start
```
Access it locally at: http://localhost:3000/playground/.
You can create as many playgrounds as you want by going to the `/docs/pages/playground/` folder and duplicating the `index.tsx` file with a different name: `<file_name>.tsx`.
The new playground will be accessible at: `http://localhost:3000/playground/<file_name>`.
### How to increase the chances of being accepted
Continuous Integration (CI) automatically runs a series of checks when a PR is opened.
If you're unsure whether your changes will pass, you can always open a PR, and the GitHub UI will display a summary of the results.
If any of these checks fail, refer to [CI checks and how to fix them](#ci-checks-and-how-to-fix-them).
Make sure the following is true:
<!-- #target-branch-reference -->
2024-08-27 14:15:20 +07:00
- The branch is targeted at `master` for ongoing development. All tests are passing. Code that lands in `master` must be compatible with the latest stable release. It may contain additional features but no breaking changes. We should be able to release a new minor version from the tip of `master` at any time.
- If a feature is being added:
- If the result was already achievable with the core library, you've explained why this feature needs to be added to the core.
- If this is a common use case, you've added an example to the documentation.
- If adding new features or modifying existing ones, you've included tests to confirm the new behavior. You can read more about our test setup in our test [README](https://github.com/mui/material-ui/blob/HEAD/test/README.md).
- If props were added or prop types were changed, you've updated the TypeScript declarations.
- If submitting a new component, you've added it to the [lab](https://github.com/mui/material-ui/tree/HEAD/packages/mui-lab).
- The branch is not [behind its target branch](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch).
We will only merge a PR when all tests pass.
The following statements must be true:
- The code is formatted. If the code was changed, run `pnpm prettier`.
- The code is linted. If the code was changed, run `pnpm eslint`.
- The code is type-safe. If TypeScript sources or declarations were changed, run `pnpm typescript` to confirm that the check passes.
- The API docs are up to date. If API was changed, run `pnpm proptypes && pnpm docs:api`.
- The demos are up to date. If demos were changed, run `pnpm docs:typescript:formatted`. See [about writing demos](#2-write-the-demo-code).
- The pull request title follows the pattern `[product-name][Component] Imperative commit message`. (See: [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/) for a great explanation).
Don't worry if you miss a step—the Continuous Integration will run a thorough set of tests on your commits, and the maintainers of the project can assist you if you run into problems.
If your pull request addresses an open issue, make sure to link the PR to that issue.
Use any [supported GitHub keyword](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) in the PR description to automatically link them.
This makes it easier to understand where the PR is coming from, and also speeds things up because the issue will be closed automatically when the PR is merged.
### CI checks and how to fix them
If any of the checks fail, click on the **Details** link and review the logs of the build to find out why it failed.
For CircleCI, you need to log in first.
No further permissions are required to view the build logs.
The following sections give an overview of what each check is responsible for.
#### Continuous Releases
This task publishes a preview for the packages to pkg.pr.new. It should not fail in isolation. Use it to test more complex scenarios.
#### ci/circleci: checkout
This is a preflight check to see if the dependencies and lockfile are ok.
Running `pnpm` and `pnpm deduplicate` should fix most issues.
#### ci/circleci: test_static
This checks code format and lints the repository.
The log of the failed build should explain how to fix any issues.
It also runs commands that generate or change some files (like `pnpm docs:api` for API documentation).
If the CI job fails, then you most likely need to run the commands that failed locally and commit the changes.
#### ci/circleci: test_unit-1
This runs the unit tests in a `jsdom` environment.
If it fails then `pnpm test:unit` should<sup>[1](test/README.md#accessibility-tree-exclusion)</sup> fail locally as well.
You can narrow the scope of tests run with `pnpm test:unit --grep ComponentName`.
If `pnpm test:unit` passes locally, but fails in CI, consider [Accessibility tree exclusion in CI](test/README.md#accessibility-tree-exclusion).
#### ci/circleci: test_browser
This runs the unit tests in multiple browsers (via Playwright).
The log of the failed build should list which browsers failed.
If Chrome failed then `pnpm test:browser` should<sup>[1](test/README.md#accessibility-tree-exclusion)</sup> fail locally as well.
If other browsers failed, you can debug using `VITEST_BROWSERS=firefox,webkit pnpm test:browser`.
#### ci/circleci: test_regression
This renders tests in `test/regressions/tests` and takes screenshots.
This step shouldn't fail if the others pass.
Otherwise, a maintainer will take a look.
The screenshots are evaluated in another step.
#### ci/circleci: test_types
This typechecks the repository.
The log of the failed build should list any issues.
#### ci/circleci: test_bundle_size_monitor
This task is primarily responsible for monitoring the bundle size.
It will only report the size if the change exceeds a certain threshold.
If it fails, then there's usually something wrong with the way the packages or docs were built.
#### argos
This evaluates the screenshots taken in `test/regressions/tests`, and fails if it detects
differences.
This doesn't necessarily mean that your PR will be rejected, as a failure might be intended.
Clicking on **Details** will show you the differences.
#### deploy/netlify
This renders a preview of the docs with your changes if it succeeds.
Otherwise `pnpm docs:build` usually fails locally as well.
#### codecov/project
This monitors coverage of the tests.
A reduction in coverage isn't necessarily bad, but it's always appreciated if it can be improved.
#### Misc
There are various other checks done by Netlify to validate the integrity of the docs.
Click on **Details** to find out more about them.
### Updating the component API documentation
2021-07-08 02:26:40 +02:00
The component API in the component `propTypes` and under `docs/pages/api-docs` is auto-generated from the [JSDoc](https://jsdoc.app/about-getting-started.html) in the TypeScript declarations.
2024-03-16 23:58:53 +01:00
Be sure to update the documentation in the corresponding `.d.ts` files (for example `packages/mui-material/src/Button/Button.d.ts` for `<Button>`) and then run:
```bash
$ pnpm proptypes
$ pnpm docs:api
```
### Coding style
2016-01-27 21:45:25 +00:00
Please follow the coding style of the project.
2024-08-25 13:41:38 +02:00
It uses Prettier and ESLint, so if possible, enable linting in your editor to get real-time feedback.
- `pnpm prettier` reformats the code.
- `pnpm eslint` runs the linting rules.
2016-01-27 21:45:25 +00:00
When you submit a PR, these checks are run again by our continuous integration tools, but hopefully your code is already clean!
## Contributing to the documentation
Contributing to open-source docs involves a lot more than just fixing typos—developers frequently request more in-depth explanations of component features, and this requires both coding and technical writing to accomplish.
Every documentation PR will be reviewed by an editor following [MUI's writing style guide](https://mui-org.notion.site/Writing-style-guide-2a957a4168a54d47b14bae026d06a24b), and if you plan to contribute regularly, you should familiarize yourself with this guide to speed up the editing process.
### How to find docs issues to work on
If you're interested in contributing to the docs but aren't sure where to start, you can use this search prompt in the GitHub repo to find open issues tagged with both `docs` and `ready to take`:
`is:issue is:open label:docs label:"ready to take"`
Or [follow this link directly to the results of that search](https://github.com/mui/material-ui/issues?q=is%3Aissue+is%3Aopen+label%3Adocs+label%3A%22ready+to+take%22).
### How to add a new demo to the docs
The following steps explain how to add a new demo to the docs using the Button component as an example:
#### 1. Add a new component file to the directory
Add the new file to the component's corresponding directory:
```bash
docs/src/pages/components/buttons/
```
[docs] AppBar and Textfield demos in TypeScript (#13229) * Squashed commit of the following: commit 2035e6daa1ceba1c78d3e8740af8d5f3066bc898 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Nov 5 10:16:31 2018 +0100 [docs] Fix undefined raw js commit 9ab3761e49d8682530543f1e6808d46cd955f32a Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Nov 5 10:07:38 2018 +0100 [docs] Enable textfield ts demos commit 8271f5cff4b3f6fe31b564a3f98ed69d8c09f3d6 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 30 11:58:29 2018 +0100 [docs] Port #13428 to typescript commit 8b808886235a3690b01335a5d3a6132209b87483 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Fri Oct 26 17:55:02 2018 +0200 [docs] Add typescript demos for TextField Takeaway: - inputProps, inputComponent is badly typed (needs generics though) - computed property keys support is bad in typescript commit 5ab9c988d259cd039e5b2735a47c1c89c9761eec Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 13:36:56 2018 +0200 [docs] Use esModuleInterop import conistently commit c9bca0824c0f81fe114f8976bc10464de94306b2 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 13:35:32 2018 +0200 [docs] Fix IE 11 compat issues commit b4dd772ee990dd0f9a042a8721aa7a665ded7fce Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 13:33:44 2018 +0200 [docs] Remove dead code commit f0a23cffb7a8e2c4faf5c2b4182919efb74d4bdd Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 08:21:07 2018 +0200 [ci] Fix job order Running git diff after yarn build will exit with 1 because the size snapshot was updated. commit 114022bd6d1ac98af330f6e7b57ba03062d120ff Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 21:32:54 2018 +0200 [docs] Disabled stackblitz for TS demos commit 7995d67cd09f08541f388124d535452054518d75 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 17:47:14 2018 +0200 [docs] Add guide about ts demos commit 0c65724f14c4de21ced8ce4e8ff91b2edce3b6d5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 17:09:39 2018 +0200 [docs] Sync demo changes from 06967ec3b2d01ff245879ffca8650471525a36f8 commit 7a0861d855d15bf281fde271e0028d0b1ba9dbb1 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 15:35:03 2018 +0200 [docs] Allow require default interop for ts demos Seems like codesandbox still has issues with this. Gonna investigate if we can fix this upstream commit c8a143e20735be14f692477fab40cd3d4a3040df Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 15:34:10 2018 +0200 [docs] Support types for scoped packages commit 48a425d19a53e77fa97692980e364f503491a91b Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Sat Oct 20 18:02:05 2018 +0200 [babel-plugin-unwrap-createStyles] Fix fixtures being transpiled with workspace config commit 03c1ac9d7575c9dc79e8253578dda60f39e33375 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Fri Oct 19 12:21:59 2018 +0200 [docs] Create ts specific codesandbox - needs babel plugin for synthetic default imports commit cdc393185a823bb684ff34be23f20d4897db8962 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Thu Oct 18 18:39:40 2018 +0200 [docs] Fire analytics event when clicking codeLanguage commit 6865f6488c27c1353cae108410d94a165343414b Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Thu Oct 18 18:15:05 2018 +0200 [docs] Add ts version for all app bar demos - Fixes menu not closing in PrimarySearchAppBar - removes some dead code from undefined classnames commit a189a173a371e785916b8797283798e45d4743d8 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Thu Oct 18 17:12:44 2018 +0200 [ci] Check compiled ts demos are equal to js demos commit 95706fdaaa1b6a56da239250b515a36459c87b8b Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 20:51:02 2018 +0200 [docs] Remove debug config commit a90c76a322104787837c1646fc400e84cdc77e6c Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 20:48:56 2018 +0200 [docs] github link and copy code depending on selected code language commit fafa284f397e66b0075a29823debc1c8dbd6b1fb Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 18:14:49 2018 +0200 [docs] Add feature flag for language switch Enabled on a per-component basis. commit 9ef68446d7e42347d30fc796d34f23f15eaf4405 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 18:10:20 2018 +0200 [docs] Add the ability to mark ts demos as outdated This should be used in-sync with ignored demos in transpilation. commit a7033f203278d6e462a016190790a3609aabded5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 17:18:10 2018 +0200 [docs] Add the ability to ignore ts demos from transpilation This can be useful to defer syncing them upwards from js. commit e7c19cb1f264bf9ec9b6884650b4e3ad8e6942f8 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 16:22:36 2018 +0200 Fix formatting errors commit ea9a6de935394d0c61eff974a8575165ae0ed1aa Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 10:33:23 2018 +0200 [docs] Disable ts switch if not ts version is available commit 5a58595c26108e8ccd18eacf3b16ae2ed40de0a5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 09:19:53 2018 +0200 [docs] Remove global code language switch Revisit this if we reach critical mass on ts docs commit aecb12fdf96aa761e543ba284d55ffd11a7970f1 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 09:15:52 2018 +0200 [docs] Improve code language switch commit 0a587ec8b0f97dfc05352856f7dec1c081e5275e Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 23:37:40 2018 +0200 Fix CI errors commit 82921d138f21272cef11c040ea7a578584563120 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 23:20:36 2018 +0200 [docs] Add local language switch and add language logos - color needs rework: it looks a little bit out of place, bad contrast commit 49861e54f5b5d2e54cac672c4f5a3377731e6255 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 20:45:25 2018 +0200 [docs] Language switch via redux It's pretty slow at the app level. While it is nice to have ts permanently enabled while browsing docs a switch at demo level might be better suited. commit 6a06a060ad17f44dab0d1cc49996455b37f8a2fc Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 19:14:55 2018 +0200 [docs] Another whitespace fix attempt commit fffed851504e587f2abadd6353318eaab9791fdb Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:46:46 2018 +0200 [docs] revert to function declaration propTypes in typescript are to strict commit ccb62823cbbacb5da109eb5275277a4ebf797533 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:32:38 2018 +0200 [core] Bump @types/react commit d3ac480d1966485b1c3d22672797110c26a82ef5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:25:06 2018 +0200 [babel-plugin-unwrap-createStyles] Fix lint errors commit 1998640e939bfb57e27c265c2e338ef6707bae5a Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:21:45 2018 +0200 [docs] Remove diff in trailing whitespace commit 912c2a8d060ff3de9a70eaefa62c011f2bdbc90d Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:20:13 2018 +0200 [docs] Write formatted js from ts demos commit 4dcd51f50252823ee5f40dd9e53bfd6821786d5f Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 17:28:08 2018 +0200 [core] Sync tslint with eslint concerning trailing-whitespace commit 05f3f3d78e333ed740f447a2e20724cc1624c363 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 13:59:47 2018 +0200 [core] docuent babel-plugin vs. ts-transformer commit 691a036456486b4cea411d435392746ad714817d Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 11:03:08 2018 +0200 [docs] Add babel plugin to unwrap createStyles calls This essentially strips them from the bundle commit a02ffd64a1defb4298030fd2d162c4a71c65b09a Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Sat Oct 13 16:02:11 2018 +0200 Move ts files next to js files commit 32a301a8eb2d0ed5e3b902313d5895dabcfbca32 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Sat Oct 13 14:35:14 2018 +0200 Working example without type checking and bad folder structure * removed the babel-generator-prettier plugin See https://github.com/eps1lon/material-ui/pull/1 * removed the babel-generator-prettier plugin in favor of running prettier after building the docs * Restore yarn integrity fields * [core] use link protocol for babel-plugin-unwrap-createStyles * [babel-plugin-unwrap-createStyles] Improve code docs * [docs] Sync ts and js demos * [ci] Use proper docs:ts:check command * [docs] Improve TS demo workflow * [docs] Cleanup merge commit * [docs] Cleanup TS demo testing * [docs] Furhter merge commit cleanup * [docs} Fix codesandbox demos * [docs] remove unused lint directives * [docs] Add analytics event to source switches * [core] cleanup tslint diff * [babel-plugin-unwrapCreateStyles] Cleanup package.json * [docs] fix bundle size limit * remove blank line * remove blank lines * Update README.md * [docs] exit with non-zero if ts scripts fail * [docs] Fix failing TS script * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Revert "remove blank lines" Fixes build * [docs] Update Hooks / JS / TS icons, remove code icon * [docs] Format code * [docs] Port #14266 to TS * [docs] Port #14281 to TS * [docs] Port #14023 to TS * [docs] Adjust bundle size * WIP dropdown WIP ToggleButtons * Add a transition, highlight the correct toggle-button when preferred code style not available * Remove comment Tooltips * docs bundle size * [docs] Update contributing with updated formatting ts demo task * [docs] Remove commented code * [docs] Update outdated API docs * [docs] Remove unnecessary fragment * [docs] Replace string literals with enum values * [docs] Removed explicit property initialization
2019-01-31 16:26:21 +01:00
and give it a name: how about `SuperButtons.tsx`?
#### 2. Write the demo code
We use TypeScript to document our components.
2024-03-16 23:58:53 +01:00
We prefer demos written in TypeScript (using the `.tsx` file format).
After creating a TypeScript demo, run `pnpm docs:typescript:formatted` to automatically create the JavaScript version, which is also required.
[docs] AppBar and Textfield demos in TypeScript (#13229) * Squashed commit of the following: commit 2035e6daa1ceba1c78d3e8740af8d5f3066bc898 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Nov 5 10:16:31 2018 +0100 [docs] Fix undefined raw js commit 9ab3761e49d8682530543f1e6808d46cd955f32a Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Nov 5 10:07:38 2018 +0100 [docs] Enable textfield ts demos commit 8271f5cff4b3f6fe31b564a3f98ed69d8c09f3d6 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 30 11:58:29 2018 +0100 [docs] Port #13428 to typescript commit 8b808886235a3690b01335a5d3a6132209b87483 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Fri Oct 26 17:55:02 2018 +0200 [docs] Add typescript demos for TextField Takeaway: - inputProps, inputComponent is badly typed (needs generics though) - computed property keys support is bad in typescript commit 5ab9c988d259cd039e5b2735a47c1c89c9761eec Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 13:36:56 2018 +0200 [docs] Use esModuleInterop import conistently commit c9bca0824c0f81fe114f8976bc10464de94306b2 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 13:35:32 2018 +0200 [docs] Fix IE 11 compat issues commit b4dd772ee990dd0f9a042a8721aa7a665ded7fce Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 13:33:44 2018 +0200 [docs] Remove dead code commit f0a23cffb7a8e2c4faf5c2b4182919efb74d4bdd Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 08:21:07 2018 +0200 [ci] Fix job order Running git diff after yarn build will exit with 1 because the size snapshot was updated. commit 114022bd6d1ac98af330f6e7b57ba03062d120ff Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 21:32:54 2018 +0200 [docs] Disabled stackblitz for TS demos commit 7995d67cd09f08541f388124d535452054518d75 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 17:47:14 2018 +0200 [docs] Add guide about ts demos commit 0c65724f14c4de21ced8ce4e8ff91b2edce3b6d5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 17:09:39 2018 +0200 [docs] Sync demo changes from 06967ec3b2d01ff245879ffca8650471525a36f8 commit 7a0861d855d15bf281fde271e0028d0b1ba9dbb1 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 15:35:03 2018 +0200 [docs] Allow require default interop for ts demos Seems like codesandbox still has issues with this. Gonna investigate if we can fix this upstream commit c8a143e20735be14f692477fab40cd3d4a3040df Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 15:34:10 2018 +0200 [docs] Support types for scoped packages commit 48a425d19a53e77fa97692980e364f503491a91b Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Sat Oct 20 18:02:05 2018 +0200 [babel-plugin-unwrap-createStyles] Fix fixtures being transpiled with workspace config commit 03c1ac9d7575c9dc79e8253578dda60f39e33375 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Fri Oct 19 12:21:59 2018 +0200 [docs] Create ts specific codesandbox - needs babel plugin for synthetic default imports commit cdc393185a823bb684ff34be23f20d4897db8962 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Thu Oct 18 18:39:40 2018 +0200 [docs] Fire analytics event when clicking codeLanguage commit 6865f6488c27c1353cae108410d94a165343414b Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Thu Oct 18 18:15:05 2018 +0200 [docs] Add ts version for all app bar demos - Fixes menu not closing in PrimarySearchAppBar - removes some dead code from undefined classnames commit a189a173a371e785916b8797283798e45d4743d8 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Thu Oct 18 17:12:44 2018 +0200 [ci] Check compiled ts demos are equal to js demos commit 95706fdaaa1b6a56da239250b515a36459c87b8b Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 20:51:02 2018 +0200 [docs] Remove debug config commit a90c76a322104787837c1646fc400e84cdc77e6c Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 20:48:56 2018 +0200 [docs] github link and copy code depending on selected code language commit fafa284f397e66b0075a29823debc1c8dbd6b1fb Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 18:14:49 2018 +0200 [docs] Add feature flag for language switch Enabled on a per-component basis. commit 9ef68446d7e42347d30fc796d34f23f15eaf4405 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 18:10:20 2018 +0200 [docs] Add the ability to mark ts demos as outdated This should be used in-sync with ignored demos in transpilation. commit a7033f203278d6e462a016190790a3609aabded5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 17:18:10 2018 +0200 [docs] Add the ability to ignore ts demos from transpilation This can be useful to defer syncing them upwards from js. commit e7c19cb1f264bf9ec9b6884650b4e3ad8e6942f8 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 16:22:36 2018 +0200 Fix formatting errors commit ea9a6de935394d0c61eff974a8575165ae0ed1aa Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 10:33:23 2018 +0200 [docs] Disable ts switch if not ts version is available commit 5a58595c26108e8ccd18eacf3b16ae2ed40de0a5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 09:19:53 2018 +0200 [docs] Remove global code language switch Revisit this if we reach critical mass on ts docs commit aecb12fdf96aa761e543ba284d55ffd11a7970f1 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 09:15:52 2018 +0200 [docs] Improve code language switch commit 0a587ec8b0f97dfc05352856f7dec1c081e5275e Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 23:37:40 2018 +0200 Fix CI errors commit 82921d138f21272cef11c040ea7a578584563120 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 23:20:36 2018 +0200 [docs] Add local language switch and add language logos - color needs rework: it looks a little bit out of place, bad contrast commit 49861e54f5b5d2e54cac672c4f5a3377731e6255 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 20:45:25 2018 +0200 [docs] Language switch via redux It's pretty slow at the app level. While it is nice to have ts permanently enabled while browsing docs a switch at demo level might be better suited. commit 6a06a060ad17f44dab0d1cc49996455b37f8a2fc Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 19:14:55 2018 +0200 [docs] Another whitespace fix attempt commit fffed851504e587f2abadd6353318eaab9791fdb Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:46:46 2018 +0200 [docs] revert to function declaration propTypes in typescript are to strict commit ccb62823cbbacb5da109eb5275277a4ebf797533 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:32:38 2018 +0200 [core] Bump @types/react commit d3ac480d1966485b1c3d22672797110c26a82ef5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:25:06 2018 +0200 [babel-plugin-unwrap-createStyles] Fix lint errors commit 1998640e939bfb57e27c265c2e338ef6707bae5a Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:21:45 2018 +0200 [docs] Remove diff in trailing whitespace commit 912c2a8d060ff3de9a70eaefa62c011f2bdbc90d Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:20:13 2018 +0200 [docs] Write formatted js from ts demos commit 4dcd51f50252823ee5f40dd9e53bfd6821786d5f Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 17:28:08 2018 +0200 [core] Sync tslint with eslint concerning trailing-whitespace commit 05f3f3d78e333ed740f447a2e20724cc1624c363 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 13:59:47 2018 +0200 [core] docuent babel-plugin vs. ts-transformer commit 691a036456486b4cea411d435392746ad714817d Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 11:03:08 2018 +0200 [docs] Add babel plugin to unwrap createStyles calls This essentially strips them from the bundle commit a02ffd64a1defb4298030fd2d162c4a71c65b09a Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Sat Oct 13 16:02:11 2018 +0200 Move ts files next to js files commit 32a301a8eb2d0ed5e3b902313d5895dabcfbca32 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Sat Oct 13 14:35:14 2018 +0200 Working example without type checking and bad folder structure * removed the babel-generator-prettier plugin See https://github.com/eps1lon/material-ui/pull/1 * removed the babel-generator-prettier plugin in favor of running prettier after building the docs * Restore yarn integrity fields * [core] use link protocol for babel-plugin-unwrap-createStyles * [babel-plugin-unwrap-createStyles] Improve code docs * [docs] Sync ts and js demos * [ci] Use proper docs:ts:check command * [docs] Improve TS demo workflow * [docs] Cleanup merge commit * [docs] Cleanup TS demo testing * [docs] Furhter merge commit cleanup * [docs} Fix codesandbox demos * [docs] remove unused lint directives * [docs] Add analytics event to source switches * [core] cleanup tslint diff * [babel-plugin-unwrapCreateStyles] Cleanup package.json * [docs] fix bundle size limit * remove blank line * remove blank lines * Update README.md * [docs] exit with non-zero if ts scripts fail * [docs] Fix failing TS script * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Revert "remove blank lines" Fixes build * [docs] Update Hooks / JS / TS icons, remove code icon * [docs] Format code * [docs] Port #14266 to TS * [docs] Port #14281 to TS * [docs] Port #14023 to TS * [docs] Adjust bundle size * WIP dropdown WIP ToggleButtons * Add a transition, highlight the correct toggle-button when preferred code style not available * Remove comment Tooltips * docs bundle size * [docs] Update contributing with updated formatting ts demo task * [docs] Remove commented code * [docs] Update outdated API docs * [docs] Remove unnecessary fragment * [docs] Replace string literals with enum values * [docs] Removed explicit property initialization
2019-01-31 16:26:21 +01:00
2024-03-16 23:58:53 +01:00
If you're not familiar with TypeScript, you can write the demo in JavaScript, and a core contributor may help you migrate it to TypeScript.
#### 3. Edit the page's Markdown file
The Markdown file in the component's respective folder—in this case, `/buttons/buttons.md`—is the source of content for the document.
Any changes you make there will be reflected on the website.
Add a header and a brief description of the demo and its use case, along with the `"demo"` code snippet to inject it into the page:
```diff
+### Super buttons
+
+To create a super button for a specific use case, add the `super` prop:
+
+{{"demo": "pages/components/buttons/SuperButtons.js"}}
```
#### 4. Submit your PR
[docs] AppBar and Textfield demos in TypeScript (#13229) * Squashed commit of the following: commit 2035e6daa1ceba1c78d3e8740af8d5f3066bc898 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Nov 5 10:16:31 2018 +0100 [docs] Fix undefined raw js commit 9ab3761e49d8682530543f1e6808d46cd955f32a Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Nov 5 10:07:38 2018 +0100 [docs] Enable textfield ts demos commit 8271f5cff4b3f6fe31b564a3f98ed69d8c09f3d6 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 30 11:58:29 2018 +0100 [docs] Port #13428 to typescript commit 8b808886235a3690b01335a5d3a6132209b87483 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Fri Oct 26 17:55:02 2018 +0200 [docs] Add typescript demos for TextField Takeaway: - inputProps, inputComponent is badly typed (needs generics though) - computed property keys support is bad in typescript commit 5ab9c988d259cd039e5b2735a47c1c89c9761eec Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 13:36:56 2018 +0200 [docs] Use esModuleInterop import conistently commit c9bca0824c0f81fe114f8976bc10464de94306b2 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 13:35:32 2018 +0200 [docs] Fix IE 11 compat issues commit b4dd772ee990dd0f9a042a8721aa7a665ded7fce Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 13:33:44 2018 +0200 [docs] Remove dead code commit f0a23cffb7a8e2c4faf5c2b4182919efb74d4bdd Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 08:21:07 2018 +0200 [ci] Fix job order Running git diff after yarn build will exit with 1 because the size snapshot was updated. commit 114022bd6d1ac98af330f6e7b57ba03062d120ff Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 21:32:54 2018 +0200 [docs] Disabled stackblitz for TS demos commit 7995d67cd09f08541f388124d535452054518d75 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 17:47:14 2018 +0200 [docs] Add guide about ts demos commit 0c65724f14c4de21ced8ce4e8ff91b2edce3b6d5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 17:09:39 2018 +0200 [docs] Sync demo changes from 06967ec3b2d01ff245879ffca8650471525a36f8 commit 7a0861d855d15bf281fde271e0028d0b1ba9dbb1 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 15:35:03 2018 +0200 [docs] Allow require default interop for ts demos Seems like codesandbox still has issues with this. Gonna investigate if we can fix this upstream commit c8a143e20735be14f692477fab40cd3d4a3040df Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 15:34:10 2018 +0200 [docs] Support types for scoped packages commit 48a425d19a53e77fa97692980e364f503491a91b Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Sat Oct 20 18:02:05 2018 +0200 [babel-plugin-unwrap-createStyles] Fix fixtures being transpiled with workspace config commit 03c1ac9d7575c9dc79e8253578dda60f39e33375 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Fri Oct 19 12:21:59 2018 +0200 [docs] Create ts specific codesandbox - needs babel plugin for synthetic default imports commit cdc393185a823bb684ff34be23f20d4897db8962 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Thu Oct 18 18:39:40 2018 +0200 [docs] Fire analytics event when clicking codeLanguage commit 6865f6488c27c1353cae108410d94a165343414b Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Thu Oct 18 18:15:05 2018 +0200 [docs] Add ts version for all app bar demos - Fixes menu not closing in PrimarySearchAppBar - removes some dead code from undefined classnames commit a189a173a371e785916b8797283798e45d4743d8 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Thu Oct 18 17:12:44 2018 +0200 [ci] Check compiled ts demos are equal to js demos commit 95706fdaaa1b6a56da239250b515a36459c87b8b Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 20:51:02 2018 +0200 [docs] Remove debug config commit a90c76a322104787837c1646fc400e84cdc77e6c Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 20:48:56 2018 +0200 [docs] github link and copy code depending on selected code language commit fafa284f397e66b0075a29823debc1c8dbd6b1fb Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 18:14:49 2018 +0200 [docs] Add feature flag for language switch Enabled on a per-component basis. commit 9ef68446d7e42347d30fc796d34f23f15eaf4405 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 18:10:20 2018 +0200 [docs] Add the ability to mark ts demos as outdated This should be used in-sync with ignored demos in transpilation. commit a7033f203278d6e462a016190790a3609aabded5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 17:18:10 2018 +0200 [docs] Add the ability to ignore ts demos from transpilation This can be useful to defer syncing them upwards from js. commit e7c19cb1f264bf9ec9b6884650b4e3ad8e6942f8 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 16:22:36 2018 +0200 Fix formatting errors commit ea9a6de935394d0c61eff974a8575165ae0ed1aa Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 10:33:23 2018 +0200 [docs] Disable ts switch if not ts version is available commit 5a58595c26108e8ccd18eacf3b16ae2ed40de0a5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 09:19:53 2018 +0200 [docs] Remove global code language switch Revisit this if we reach critical mass on ts docs commit aecb12fdf96aa761e543ba284d55ffd11a7970f1 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 09:15:52 2018 +0200 [docs] Improve code language switch commit 0a587ec8b0f97dfc05352856f7dec1c081e5275e Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 23:37:40 2018 +0200 Fix CI errors commit 82921d138f21272cef11c040ea7a578584563120 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 23:20:36 2018 +0200 [docs] Add local language switch and add language logos - color needs rework: it looks a little bit out of place, bad contrast commit 49861e54f5b5d2e54cac672c4f5a3377731e6255 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 20:45:25 2018 +0200 [docs] Language switch via redux It's pretty slow at the app level. While it is nice to have ts permanently enabled while browsing docs a switch at demo level might be better suited. commit 6a06a060ad17f44dab0d1cc49996455b37f8a2fc Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 19:14:55 2018 +0200 [docs] Another whitespace fix attempt commit fffed851504e587f2abadd6353318eaab9791fdb Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:46:46 2018 +0200 [docs] revert to function declaration propTypes in typescript are to strict commit ccb62823cbbacb5da109eb5275277a4ebf797533 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:32:38 2018 +0200 [core] Bump @types/react commit d3ac480d1966485b1c3d22672797110c26a82ef5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:25:06 2018 +0200 [babel-plugin-unwrap-createStyles] Fix lint errors commit 1998640e939bfb57e27c265c2e338ef6707bae5a Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:21:45 2018 +0200 [docs] Remove diff in trailing whitespace commit 912c2a8d060ff3de9a70eaefa62c011f2bdbc90d Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:20:13 2018 +0200 [docs] Write formatted js from ts demos commit 4dcd51f50252823ee5f40dd9e53bfd6821786d5f Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 17:28:08 2018 +0200 [core] Sync tslint with eslint concerning trailing-whitespace commit 05f3f3d78e333ed740f447a2e20724cc1624c363 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 13:59:47 2018 +0200 [core] docuent babel-plugin vs. ts-transformer commit 691a036456486b4cea411d435392746ad714817d Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 11:03:08 2018 +0200 [docs] Add babel plugin to unwrap createStyles calls This essentially strips them from the bundle commit a02ffd64a1defb4298030fd2d162c4a71c65b09a Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Sat Oct 13 16:02:11 2018 +0200 Move ts files next to js files commit 32a301a8eb2d0ed5e3b902313d5895dabcfbca32 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Sat Oct 13 14:35:14 2018 +0200 Working example without type checking and bad folder structure * removed the babel-generator-prettier plugin See https://github.com/eps1lon/material-ui/pull/1 * removed the babel-generator-prettier plugin in favor of running prettier after building the docs * Restore yarn integrity fields * [core] use link protocol for babel-plugin-unwrap-createStyles * [babel-plugin-unwrap-createStyles] Improve code docs * [docs] Sync ts and js demos * [ci] Use proper docs:ts:check command * [docs] Improve TS demo workflow * [docs] Cleanup merge commit * [docs] Cleanup TS demo testing * [docs] Furhter merge commit cleanup * [docs} Fix codesandbox demos * [docs] remove unused lint directives * [docs] Add analytics event to source switches * [core] cleanup tslint diff * [babel-plugin-unwrapCreateStyles] Cleanup package.json * [docs] fix bundle size limit * remove blank line * remove blank lines * Update README.md * [docs] exit with non-zero if ts scripts fail * [docs] Fix failing TS script * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Revert "remove blank lines" Fixes build * [docs] Update Hooks / JS / TS icons, remove code icon * [docs] Format code * [docs] Port #14266 to TS * [docs] Port #14281 to TS * [docs] Port #14023 to TS * [docs] Adjust bundle size * WIP dropdown WIP ToggleButtons * Add a transition, highlight the correct toggle-button when preferred code style not available * Remove comment Tooltips * docs bundle size * [docs] Update contributing with updated formatting ts demo task * [docs] Remove commented code * [docs] Update outdated API docs * [docs] Remove unnecessary fragment * [docs] Replace string literals with enum values * [docs] Removed explicit property initialization
2019-01-31 16:26:21 +01:00
Now you're ready to [open a PR](#sending-a-pull-request) to add your new demo to the docs.
[docs] AppBar and Textfield demos in TypeScript (#13229) * Squashed commit of the following: commit 2035e6daa1ceba1c78d3e8740af8d5f3066bc898 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Nov 5 10:16:31 2018 +0100 [docs] Fix undefined raw js commit 9ab3761e49d8682530543f1e6808d46cd955f32a Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Nov 5 10:07:38 2018 +0100 [docs] Enable textfield ts demos commit 8271f5cff4b3f6fe31b564a3f98ed69d8c09f3d6 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 30 11:58:29 2018 +0100 [docs] Port #13428 to typescript commit 8b808886235a3690b01335a5d3a6132209b87483 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Fri Oct 26 17:55:02 2018 +0200 [docs] Add typescript demos for TextField Takeaway: - inputProps, inputComponent is badly typed (needs generics though) - computed property keys support is bad in typescript commit 5ab9c988d259cd039e5b2735a47c1c89c9761eec Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 13:36:56 2018 +0200 [docs] Use esModuleInterop import conistently commit c9bca0824c0f81fe114f8976bc10464de94306b2 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 13:35:32 2018 +0200 [docs] Fix IE 11 compat issues commit b4dd772ee990dd0f9a042a8721aa7a665ded7fce Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 13:33:44 2018 +0200 [docs] Remove dead code commit f0a23cffb7a8e2c4faf5c2b4182919efb74d4bdd Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 08:21:07 2018 +0200 [ci] Fix job order Running git diff after yarn build will exit with 1 because the size snapshot was updated. commit 114022bd6d1ac98af330f6e7b57ba03062d120ff Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 21:32:54 2018 +0200 [docs] Disabled stackblitz for TS demos commit 7995d67cd09f08541f388124d535452054518d75 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 17:47:14 2018 +0200 [docs] Add guide about ts demos commit 0c65724f14c4de21ced8ce4e8ff91b2edce3b6d5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 17:09:39 2018 +0200 [docs] Sync demo changes from 06967ec3b2d01ff245879ffca8650471525a36f8 commit 7a0861d855d15bf281fde271e0028d0b1ba9dbb1 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 15:35:03 2018 +0200 [docs] Allow require default interop for ts demos Seems like codesandbox still has issues with this. Gonna investigate if we can fix this upstream commit c8a143e20735be14f692477fab40cd3d4a3040df Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 15:34:10 2018 +0200 [docs] Support types for scoped packages commit 48a425d19a53e77fa97692980e364f503491a91b Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Sat Oct 20 18:02:05 2018 +0200 [babel-plugin-unwrap-createStyles] Fix fixtures being transpiled with workspace config commit 03c1ac9d7575c9dc79e8253578dda60f39e33375 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Fri Oct 19 12:21:59 2018 +0200 [docs] Create ts specific codesandbox - needs babel plugin for synthetic default imports commit cdc393185a823bb684ff34be23f20d4897db8962 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Thu Oct 18 18:39:40 2018 +0200 [docs] Fire analytics event when clicking codeLanguage commit 6865f6488c27c1353cae108410d94a165343414b Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Thu Oct 18 18:15:05 2018 +0200 [docs] Add ts version for all app bar demos - Fixes menu not closing in PrimarySearchAppBar - removes some dead code from undefined classnames commit a189a173a371e785916b8797283798e45d4743d8 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Thu Oct 18 17:12:44 2018 +0200 [ci] Check compiled ts demos are equal to js demos commit 95706fdaaa1b6a56da239250b515a36459c87b8b Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 20:51:02 2018 +0200 [docs] Remove debug config commit a90c76a322104787837c1646fc400e84cdc77e6c Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 20:48:56 2018 +0200 [docs] github link and copy code depending on selected code language commit fafa284f397e66b0075a29823debc1c8dbd6b1fb Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 18:14:49 2018 +0200 [docs] Add feature flag for language switch Enabled on a per-component basis. commit 9ef68446d7e42347d30fc796d34f23f15eaf4405 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 18:10:20 2018 +0200 [docs] Add the ability to mark ts demos as outdated This should be used in-sync with ignored demos in transpilation. commit a7033f203278d6e462a016190790a3609aabded5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 17:18:10 2018 +0200 [docs] Add the ability to ignore ts demos from transpilation This can be useful to defer syncing them upwards from js. commit e7c19cb1f264bf9ec9b6884650b4e3ad8e6942f8 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 16:22:36 2018 +0200 Fix formatting errors commit ea9a6de935394d0c61eff974a8575165ae0ed1aa Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 10:33:23 2018 +0200 [docs] Disable ts switch if not ts version is available commit 5a58595c26108e8ccd18eacf3b16ae2ed40de0a5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 09:19:53 2018 +0200 [docs] Remove global code language switch Revisit this if we reach critical mass on ts docs commit aecb12fdf96aa761e543ba284d55ffd11a7970f1 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 09:15:52 2018 +0200 [docs] Improve code language switch commit 0a587ec8b0f97dfc05352856f7dec1c081e5275e Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 23:37:40 2018 +0200 Fix CI errors commit 82921d138f21272cef11c040ea7a578584563120 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 23:20:36 2018 +0200 [docs] Add local language switch and add language logos - color needs rework: it looks a little bit out of place, bad contrast commit 49861e54f5b5d2e54cac672c4f5a3377731e6255 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 20:45:25 2018 +0200 [docs] Language switch via redux It's pretty slow at the app level. While it is nice to have ts permanently enabled while browsing docs a switch at demo level might be better suited. commit 6a06a060ad17f44dab0d1cc49996455b37f8a2fc Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 19:14:55 2018 +0200 [docs] Another whitespace fix attempt commit fffed851504e587f2abadd6353318eaab9791fdb Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:46:46 2018 +0200 [docs] revert to function declaration propTypes in typescript are to strict commit ccb62823cbbacb5da109eb5275277a4ebf797533 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:32:38 2018 +0200 [core] Bump @types/react commit d3ac480d1966485b1c3d22672797110c26a82ef5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:25:06 2018 +0200 [babel-plugin-unwrap-createStyles] Fix lint errors commit 1998640e939bfb57e27c265c2e338ef6707bae5a Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:21:45 2018 +0200 [docs] Remove diff in trailing whitespace commit 912c2a8d060ff3de9a70eaefa62c011f2bdbc90d Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:20:13 2018 +0200 [docs] Write formatted js from ts demos commit 4dcd51f50252823ee5f40dd9e53bfd6821786d5f Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 17:28:08 2018 +0200 [core] Sync tslint with eslint concerning trailing-whitespace commit 05f3f3d78e333ed740f447a2e20724cc1624c363 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 13:59:47 2018 +0200 [core] docuent babel-plugin vs. ts-transformer commit 691a036456486b4cea411d435392746ad714817d Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 11:03:08 2018 +0200 [docs] Add babel plugin to unwrap createStyles calls This essentially strips them from the bundle commit a02ffd64a1defb4298030fd2d162c4a71c65b09a Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Sat Oct 13 16:02:11 2018 +0200 Move ts files next to js files commit 32a301a8eb2d0ed5e3b902313d5895dabcfbca32 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Sat Oct 13 14:35:14 2018 +0200 Working example without type checking and bad folder structure * removed the babel-generator-prettier plugin See https://github.com/eps1lon/material-ui/pull/1 * removed the babel-generator-prettier plugin in favor of running prettier after building the docs * Restore yarn integrity fields * [core] use link protocol for babel-plugin-unwrap-createStyles * [babel-plugin-unwrap-createStyles] Improve code docs * [docs] Sync ts and js demos * [ci] Use proper docs:ts:check command * [docs] Improve TS demo workflow * [docs] Cleanup merge commit * [docs] Cleanup TS demo testing * [docs] Furhter merge commit cleanup * [docs} Fix codesandbox demos * [docs] remove unused lint directives * [docs] Add analytics event to source switches * [core] cleanup tslint diff * [babel-plugin-unwrapCreateStyles] Cleanup package.json * [docs] fix bundle size limit * remove blank line * remove blank lines * Update README.md * [docs] exit with non-zero if ts scripts fail * [docs] Fix failing TS script * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Revert "remove blank lines" Fixes build * [docs] Update Hooks / JS / TS icons, remove code icon * [docs] Format code * [docs] Port #14266 to TS * [docs] Port #14281 to TS * [docs] Port #14023 to TS * [docs] Adjust bundle size * WIP dropdown WIP ToggleButtons * Add a transition, highlight the correct toggle-button when preferred code style not available * Remove comment Tooltips * docs bundle size * [docs] Update contributing with updated formatting ts demo task * [docs] Remove commented code * [docs] Update outdated API docs * [docs] Remove unnecessary fragment * [docs] Replace string literals with enum values * [docs] Removed explicit property initialization
2019-01-31 16:26:21 +01:00
Check out [this Toggle Button demo PR](https://github.com/mui/material-ui/pull/19582/files) for an example of what your new and edited files should look like when opening your own demo PR.
[docs] AppBar and Textfield demos in TypeScript (#13229) * Squashed commit of the following: commit 2035e6daa1ceba1c78d3e8740af8d5f3066bc898 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Nov 5 10:16:31 2018 +0100 [docs] Fix undefined raw js commit 9ab3761e49d8682530543f1e6808d46cd955f32a Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Nov 5 10:07:38 2018 +0100 [docs] Enable textfield ts demos commit 8271f5cff4b3f6fe31b564a3f98ed69d8c09f3d6 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 30 11:58:29 2018 +0100 [docs] Port #13428 to typescript commit 8b808886235a3690b01335a5d3a6132209b87483 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Fri Oct 26 17:55:02 2018 +0200 [docs] Add typescript demos for TextField Takeaway: - inputProps, inputComponent is badly typed (needs generics though) - computed property keys support is bad in typescript commit 5ab9c988d259cd039e5b2735a47c1c89c9761eec Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 13:36:56 2018 +0200 [docs] Use esModuleInterop import conistently commit c9bca0824c0f81fe114f8976bc10464de94306b2 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 13:35:32 2018 +0200 [docs] Fix IE 11 compat issues commit b4dd772ee990dd0f9a042a8721aa7a665ded7fce Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 13:33:44 2018 +0200 [docs] Remove dead code commit f0a23cffb7a8e2c4faf5c2b4182919efb74d4bdd Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 23 08:21:07 2018 +0200 [ci] Fix job order Running git diff after yarn build will exit with 1 because the size snapshot was updated. commit 114022bd6d1ac98af330f6e7b57ba03062d120ff Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 21:32:54 2018 +0200 [docs] Disabled stackblitz for TS demos commit 7995d67cd09f08541f388124d535452054518d75 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 17:47:14 2018 +0200 [docs] Add guide about ts demos commit 0c65724f14c4de21ced8ce4e8ff91b2edce3b6d5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 17:09:39 2018 +0200 [docs] Sync demo changes from 06967ec3b2d01ff245879ffca8650471525a36f8 commit 7a0861d855d15bf281fde271e0028d0b1ba9dbb1 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 15:35:03 2018 +0200 [docs] Allow require default interop for ts demos Seems like codesandbox still has issues with this. Gonna investigate if we can fix this upstream commit c8a143e20735be14f692477fab40cd3d4a3040df Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Mon Oct 22 15:34:10 2018 +0200 [docs] Support types for scoped packages commit 48a425d19a53e77fa97692980e364f503491a91b Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Sat Oct 20 18:02:05 2018 +0200 [babel-plugin-unwrap-createStyles] Fix fixtures being transpiled with workspace config commit 03c1ac9d7575c9dc79e8253578dda60f39e33375 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Fri Oct 19 12:21:59 2018 +0200 [docs] Create ts specific codesandbox - needs babel plugin for synthetic default imports commit cdc393185a823bb684ff34be23f20d4897db8962 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Thu Oct 18 18:39:40 2018 +0200 [docs] Fire analytics event when clicking codeLanguage commit 6865f6488c27c1353cae108410d94a165343414b Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Thu Oct 18 18:15:05 2018 +0200 [docs] Add ts version for all app bar demos - Fixes menu not closing in PrimarySearchAppBar - removes some dead code from undefined classnames commit a189a173a371e785916b8797283798e45d4743d8 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Thu Oct 18 17:12:44 2018 +0200 [ci] Check compiled ts demos are equal to js demos commit 95706fdaaa1b6a56da239250b515a36459c87b8b Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 20:51:02 2018 +0200 [docs] Remove debug config commit a90c76a322104787837c1646fc400e84cdc77e6c Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 20:48:56 2018 +0200 [docs] github link and copy code depending on selected code language commit fafa284f397e66b0075a29823debc1c8dbd6b1fb Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 18:14:49 2018 +0200 [docs] Add feature flag for language switch Enabled on a per-component basis. commit 9ef68446d7e42347d30fc796d34f23f15eaf4405 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 18:10:20 2018 +0200 [docs] Add the ability to mark ts demos as outdated This should be used in-sync with ignored demos in transpilation. commit a7033f203278d6e462a016190790a3609aabded5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 17:18:10 2018 +0200 [docs] Add the ability to ignore ts demos from transpilation This can be useful to defer syncing them upwards from js. commit e7c19cb1f264bf9ec9b6884650b4e3ad8e6942f8 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 16:22:36 2018 +0200 Fix formatting errors commit ea9a6de935394d0c61eff974a8575165ae0ed1aa Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 10:33:23 2018 +0200 [docs] Disable ts switch if not ts version is available commit 5a58595c26108e8ccd18eacf3b16ae2ed40de0a5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 09:19:53 2018 +0200 [docs] Remove global code language switch Revisit this if we reach critical mass on ts docs commit aecb12fdf96aa761e543ba284d55ffd11a7970f1 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Wed Oct 17 09:15:52 2018 +0200 [docs] Improve code language switch commit 0a587ec8b0f97dfc05352856f7dec1c081e5275e Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 23:37:40 2018 +0200 Fix CI errors commit 82921d138f21272cef11c040ea7a578584563120 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 23:20:36 2018 +0200 [docs] Add local language switch and add language logos - color needs rework: it looks a little bit out of place, bad contrast commit 49861e54f5b5d2e54cac672c4f5a3377731e6255 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 20:45:25 2018 +0200 [docs] Language switch via redux It's pretty slow at the app level. While it is nice to have ts permanently enabled while browsing docs a switch at demo level might be better suited. commit 6a06a060ad17f44dab0d1cc49996455b37f8a2fc Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 19:14:55 2018 +0200 [docs] Another whitespace fix attempt commit fffed851504e587f2abadd6353318eaab9791fdb Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:46:46 2018 +0200 [docs] revert to function declaration propTypes in typescript are to strict commit ccb62823cbbacb5da109eb5275277a4ebf797533 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:32:38 2018 +0200 [core] Bump @types/react commit d3ac480d1966485b1c3d22672797110c26a82ef5 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:25:06 2018 +0200 [babel-plugin-unwrap-createStyles] Fix lint errors commit 1998640e939bfb57e27c265c2e338ef6707bae5a Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:21:45 2018 +0200 [docs] Remove diff in trailing whitespace commit 912c2a8d060ff3de9a70eaefa62c011f2bdbc90d Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 18:20:13 2018 +0200 [docs] Write formatted js from ts demos commit 4dcd51f50252823ee5f40dd9e53bfd6821786d5f Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 17:28:08 2018 +0200 [core] Sync tslint with eslint concerning trailing-whitespace commit 05f3f3d78e333ed740f447a2e20724cc1624c363 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 13:59:47 2018 +0200 [core] docuent babel-plugin vs. ts-transformer commit 691a036456486b4cea411d435392746ad714817d Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Tue Oct 16 11:03:08 2018 +0200 [docs] Add babel plugin to unwrap createStyles calls This essentially strips them from the bundle commit a02ffd64a1defb4298030fd2d162c4a71c65b09a Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Sat Oct 13 16:02:11 2018 +0200 Move ts files next to js files commit 32a301a8eb2d0ed5e3b902313d5895dabcfbca32 Author: Sebastian Silbermann <silbermann.sebastian@gmail.com> Date: Sat Oct 13 14:35:14 2018 +0200 Working example without type checking and bad folder structure * removed the babel-generator-prettier plugin See https://github.com/eps1lon/material-ui/pull/1 * removed the babel-generator-prettier plugin in favor of running prettier after building the docs * Restore yarn integrity fields * [core] use link protocol for babel-plugin-unwrap-createStyles * [babel-plugin-unwrap-createStyles] Improve code docs * [docs] Sync ts and js demos * [ci] Use proper docs:ts:check command * [docs] Improve TS demo workflow * [docs] Cleanup merge commit * [docs] Cleanup TS demo testing * [docs] Furhter merge commit cleanup * [docs} Fix codesandbox demos * [docs] remove unused lint directives * [docs] Add analytics event to source switches * [core] cleanup tslint diff * [babel-plugin-unwrapCreateStyles] Cleanup package.json * [docs] fix bundle size limit * remove blank line * remove blank lines * Update README.md * [docs] exit with non-zero if ts scripts fail * [docs] Fix failing TS script * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Revert "remove blank lines" Fixes build * [docs] Update Hooks / JS / TS icons, remove code icon * [docs] Format code * [docs] Port #14266 to TS * [docs] Port #14281 to TS * [docs] Port #14023 to TS * [docs] Adjust bundle size * WIP dropdown WIP ToggleButtons * Add a transition, highlight the correct toggle-button when preferred code style not available * Remove comment Tooltips * docs bundle size * [docs] Update contributing with updated formatting ts demo task * [docs] Remove commented code * [docs] Update outdated API docs * [docs] Remove unnecessary fragment * [docs] Replace string literals with enum values * [docs] Removed explicit property initialization
2019-01-31 16:26:21 +01:00
## How can I use a change that hasn't been released yet?
We use [pkg.pr.new](https://pkg.pr.new) to publish a working version of the packages for each pull request as a "preview."
You can check the _Continuous Releases_ status of a pull request to get the URL needed to install these preview packages:
```diff
diff --git a//package.json b//package.json
index 791a7da1f4..a5db13b414 100644
--- a/package.json
+++ b/package.json
@@ -61,7 +61,7 @@
"dependencies": {
"@babel/runtime": "^7.4.4",
2021-09-01 10:27:09 +02:00
"@mui/styled-engine": "^5.0.0-alpha.16",
- "@mui/material": "^5.0.0-alpha.15",
+ "@mui/material": "https://pkg.pr.new/mui/material-ui/@mui/material@b0f26aa",
2021-09-01 10:27:09 +02:00
"@mui/system": "^5.0.0-alpha.16",
```
Alternatively, you can open the Netlify preview of the documentation, and open any demo in CodeSandbox or StackBlitz.
The documentation automatically configures the dependencies to use the preview packages.
You can also package and test your changes locally.
The following example shows how to package `@mui/material`, but you can package any npm package with this process:
```bash
$> cd packages/mui-material # or path to any other mui package
$packages\mui-material> pnpm build
$packages\mui-material> cd ./build
$packages\mui-material> pnpm pack
```
Navigate to the build folder of your respective package and locate a file with the format `mui-material-x.x.x.tar.gz`.
Copy this file and move it to the project directory you want to test in, then run:
```bash
$test-project> npm i ./path-to-file/mui-material-x.x.x.tar.gz
```
> **Note**
>
> If you've already installed this package, your changes will not be reflected when you reinstall it.
> As a quick fix, you can temporarily bump the version number in your `package.json` before running `pnpm build`.
## Roadmap
Learn more about the future by visiting our different projects' roadmaps:
- [Material UI roadmap](https://mui.com/material-ui/discover-more/roadmap/).
## License
2016-01-27 21:45:25 +00:00
2022-02-06 16:32:18 +01:00
By contributing your code to the [mui/material-ui](https://github.com/mui/material-ui) GitHub repository, you agree to license your contribution under the [MIT license](/LICENSE).