Skip to content

Commit

Permalink
[docs] Move v1-beta to master (#11354)
Browse files Browse the repository at this point in the history
* [docs] Move v1-beta to master

* clear ROADMAP
  • Loading branch information
oliviertassinari committed May 12, 2018
1 parent 51ecd64 commit ab47058
Show file tree
Hide file tree
Showing 107 changed files with 119 additions and 230 deletions.
2 changes: 1 addition & 1 deletion GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ also contribute in the following ways.
and [issues](https://github.com/mui-org/material-ui/issues).
- Reporting bugs or missing features by [creating an issue](https://github.com/mui-org/material-ui/issues/new).
- Fixing bugs, adding features, and
[improving our documentation](https://github.com/mui-org/material-ui/tree/v1-beta/docs) by
[improving our documentation](https://github.com/mui-org/material-ui/tree/master/docs) by
[submitting a pull request](https://github.com/mui-org/material-ui/pulls).

### Committers
Expand Down
111 changes: 0 additions & 111 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,114 +1,3 @@
# Roadmap

The roadmap is a living document, and it is likely that priorities will change, but the list below should give some indication of our plans for the next major release, and for the future.

## Version 1 (published on NPM under the `next` tag)

Releasing stable v1 is our top priority. It's going to be huge ✨.
We are just at the beginning, we hope to make it:
- the **simplest** React UI library available for new Front-End developers to start with.
- **very customizable** so highly UI demanding production applications can save time building on top of it.

Material-UI was started [3 years ago](https://github.com/mui-org/material-ui/commit/28b768913b75752ecf9b6bb32766e27c241dbc46).
The ecosystem has evolved a lot since then, we have also learned a lot.
[@nathanmarks](https://github.com/nathanmarks/) started an ambitious task, rebuilding Material-UI from the **ground-up**
taking advantage of this knowledge to address long-standing issues.
Expect various **breaking changes**.

The core team has been dedicated to the rewrite effort for one and a half years.
If you are interested in following our progress or if you want to help us reach that goal faster, you can have a look at the following milestones:
- ~~[v1.0.0-beta](https://github.com/mui-org/material-ui/milestone/22?closed=1)~~ - reached!
- [v1.0.0-prerelease](https://github.com/mui-org/material-ui/milestone/14)
- [v1.0.0](https://github.com/mui-org/material-ui/milestone/23)

## Q&A with the v1 version

The v1-beta version has matured, so we think that it's time to communicate more on this effort. The following Q&A is an attempt at answering some of your questions.

### Summarizing, what are our main problems with CSS?

The CSS (cascading style sheets) specification emerged in 1994.
At that time, a bunch of others specifications were competing.
It was the cascading concept that made CSS succeed over its competitors, by allowing users to provide their own style-sheet, that will be later combined with browsers and authors style-sheets.
That feature was removed 2 years ago from the most popular browser.
My point is, our needs have evolved quite a bit since then.

Back in the beginning of Material-UI, we had many issues with the first **LESS approach**.
Aside from [the problem with CSS at scale](https://speakerdeck.com/vjeux/react-css-in-js) raised by @vjeux, we had the following ones:
- We had a **dependency** on the LESS build chain with no way to abstract it away.
Users needed to change their theme variables. @gpbl was maintaining a [SASS version]( https://github.com/gpbl/material-ui-sass). (Today, we could be using *[cssnext](http://cssnext.io/)*).
- The theme was computed at **build time** but a Material component must be able to render quite differently depending on his context that can only be known at runtime.
(Tomorrow, CSS variables will help a lot)
- We were shipping a **big monolithic** CSS file.
That's not great for performance (for example it goes against the [PRPL pattern](https://www.polymer-project.org/1.0/toolbox/server) suggested by the Polymer team).
That was also an issue for users wanting to use a single component without paying for all the CSS upfront.
- We used multi-level selectors, making the **override** of styles challenging.

We later came up with an **inline-style approach** solving the majority of our issues.
But:
- We had lost around 25% of the performance 🐢.
Computing the inline-style at each render with no caching isn't really efficient.
- Some more advanced CSS feature weren't available, e.g. keyframes, pseudo-elements, pseudo-classes 💅.
- Media queries weren't available on the server. At least [not yet](http://caniuse.com/#feat=client-hints-dpr-width-viewport).
- Debugging was really challenging. Browser dev tools aren't tuned for inline-styles.
- React v15 has changed the method of injecting styles into the DOM meaning, for example, that prefixing all browsers for `display:flex` is no longer possible 💥.

### Does JSS solve them?

Yes, it does. You can have a look at [this presentation](https://github.com/oliviertassinari/a-journey-toward-better-style) for more details.

### When do we intend to release stable v1?

We don't have an ETA for the release of the `v1`, however, we are going to try to follow this plan and hope for a Q1-Q2 2018 release:

1. ~~We completely address the styling issue before moving from *alpha* to [*beta*](https://github.com/mui-org/material-ui/milestone/22).~~
2. ~~We publish our first beta releases.~~
3. We merge the v1-beta branch into master
5. We publish our first pre-releases, if all goes well, we move to the next step.
6. We publish v1 🎉

At that point, some features and components from Material-UI v0.x will be missing in the v1.
So, what about them?
- First, both versions can be used at the same time, people can progressively migrate, one component at the time.
- Then, **with the help of the community** and over time, we will support more and more components.
- We would rather **support few use-cases very well** and allow people to build on top of it **than many poorly**.

### Have we ever considered using the best libraries for each piece of functionality and provide only a wrapper for the UI?

We have, it really depends on the problem we are trying to solve.
For UI related things, providing a wrapper for the functionality is often the wrong approach.
We think that it should be done the other way around, i.e. providing a low-level API that can be combined with third-party libraries, e.g.:
- [react-virtualized](https://github.com/bvaughn/react-virtualized)
- [react-swipeable-views](https://github.com/oliviertassinari/react-swipeable-views)
- [react-autosuggest](https://github.com/moroshko/react-autosuggest)
- [react-popper](https://github.com/souporserious/react-popper)
- [downshift](https://github.com/paypal/downshift)
- [react-dnd](https://github.com/gaearon/react-dnd)

On the other hand, using a smart date library for the DatePicker / TimePicker would probably be much better as date management is tricky and not a core business.

## Breaking changes before v1

It's time to look at the last breaking changes needed before releasing Material-UI v1.
Users trying out and using v1-beta and giving feedback has been a tremendous help. Thank you!

This feedback has guided the following list of important breaking changes
that **are needed for the stable version**:

- None

These breaking changes will be spread into different releases over the next few months to make the upgrade path as smooth as possible.
Not only does the Material-UI project have to be upgraded for each breaking change,
but we also have to upgrade our own projects.
**We don't take making breaking changes lightly**, it's very costly with UI components.
For users, test coverage is hard to raise without tools like [visual regression tests](https://www.argos-ci.com/mui-org/material-ui).

**Let us know** by [commenting on this PR](https://github.com/mui-org/material-ui/pull/10348) what you think we should or shouldn't do, what's important, and what's missing!

## After stable v1

- **Theming**. We will invest in the theming solution. We would love to see **non Material Design UI** built with Material-UI. [@oliviertassinari](https://github.com/oliviertassinari/) is working on a proof of concept.
- **Type checking**. We need to improve TypeScript and Flow coverage of the library.
- **Bundle size**. We need the library to be as small as possible. We already monitor the bundle size with size-limit. We need to think of the solutions. For instance, supporting preact can help.
- **Performance**. We can't optimize something we can't measure. We don't have any CI performance benchmark. We will need to build one and start investigating bottlenecks.
- **Learning materials**. The documentation is equally as important as the quality of the implementation. We could be authoring a [learning tutorial](https://learnnextjs.com/) like Next.js is doing, or some [egghead.io](https://egghead.io/) courses.
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ npm run docs:dev

## How can I add a new demo in the documentation?

[You can follow this guide](https://github.com/mui-org/material-ui/blob/v1-beta/CONTRIBUTING.md)
[You can follow this guide](https://github.com/mui-org/material-ui/blob/master/CONTRIBUTING.md)
on how to get started contributing to Material-UI.
4 changes: 2 additions & 2 deletions docs/src/modules/components/HomeFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function HomeFooter(props) {
<Link href="https://twitter.com/MaterialUI">Twitter</Link>
</li>
<li className={classes.listItem}>
<Link href="https://github.com/mui-org/material-ui/tree/v1-beta/examples">
<Link href="https://github.com/mui-org/material-ui/tree/master/examples">
Examples
</Link>
</li>
Expand All @@ -70,7 +70,7 @@ function HomeFooter(props) {
</Typography>
<Typography className={classes.version}>
{`Currently v${process.env.LIB_VERSION}. Released under the `}
<Link href="https://github.com/mui-org/material-ui/blob/v1-beta/LICENSE">MIT License</Link>
<Link href="https://github.com/mui-org/material-ui/blob/master/LICENSE">MIT License</Link>
{'.'}
</Typography>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/MarkdownDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const styles = theme => ({
});

const demoRegexp = /^"demo": "(.*)"/;
const SOURCE_CODE_ROOT_URL = 'https://github.com/mui-org/material-ui/tree/v1-beta';
const SOURCE_CODE_ROOT_URL = 'https://github.com/mui-org/material-ui/tree/master';

function MarkdownDocs(props, context) {
const { classes, demos, disableCarbon, markdown, markdownLocation: markdownLocationProp } = props;
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/Notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async function getMessages() {
if (!messages) {
await pause(1e3); // Soften the pressure on the main thread.
const result = await fetch(
'https://raw.githubusercontent.com/mui-org/material-ui/v1-beta/docs/notifications.json',
'https://raw.githubusercontent.com/mui-org/material-ui/master/docs/notifications.json',
);
messages = await result.json();
}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/utils/generateMarkdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import recast from 'recast';
import kebabCase from 'lodash/kebabCase';
import { pageToTitle } from './helpers';

const SOURCE_CODE_ROOT_URL = 'https://github.com/mui-org/material-ui/tree/v1-beta';
const SOURCE_CODE_ROOT_URL = 'https://github.com/mui-org/material-ui/tree/master';
const PATH_REPLACE_REGEX = /\\/g;
const PATH_SEPARATOR = '/';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ Tip: you can play with the theme object in your console too.
Please take note that the documentation site is using a custom theme. As a result, the demos
you see here might disagree with the values above.

If you want to learn more about how the theme is assembled, take a look at [`material-ui/style/createMuiTheme.js`](https://github.com/mui-org/material-ui/blob/v1-beta/packages/material-ui/src/styles/createMuiTheme.js),
If you want to learn more about how the theme is assembled, take a look at [`material-ui/style/createMuiTheme.js`](https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/styles/createMuiTheme.js),
and the related imports which `createMuiTheme` uses.
2 changes: 1 addition & 1 deletion docs/src/pages/customization/overrides/overrides.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ When the `className` property isn't enough, and you need to access deeper elemen
The list of classes for each
component is documented in the **Component API** section.
For instance, you can have a look at the [Button CSS API](/api/button#css-api).
Alternatively, you can always look at the [implementation details](https://github.com/mui-org/material-ui/blob/v1-beta/packages/material-ui/src/Button/Button.js).
Alternatively, you can always look at the [implementation details](https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Button/Button.js).

This example also uses `withStyles()` (see above), but here, `OverridesClasses` is using `Button`'s `classes` prop to
provide an object that maps the **names of classes to override** (keys) to the **CSS class names to apply** (values).
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/customization/themes/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ const theme = createMuiTheme({

The list of these customization points for each component is documented under the **Component API** section.
For instance, you can have a look at the [Button](/api/button#css-api).
Alternatively, you can always have a look at the [implementation](https://github.com/mui-org/material-ui/blob/v1-beta/packages/material-ui/src/Button/Button.js).
Alternatively, you can always have a look at the [implementation](https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Button/Button.js).

### Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

Are you looking for an example project to get started?

We host some example projects which you can find in the [GitHub repository](https://github.com/mui-org/material-ui) under the [`/examples`](https://github.com/mui-org/material-ui/tree/v1-beta/examples) folder:
- [Create React App](https://github.com/mui-org/material-ui/tree/v1-beta/examples/create-react-app)
- [Next.js](https://github.com/mui-org/material-ui/tree/v1-beta/examples/nextjs)
- [Gatsby](https://github.com/mui-org/material-ui/tree/v1-beta/examples/gatsby)
- [CDN](https://github.com/mui-org/material-ui/tree/v1-beta/examples/cdn)
We host some example projects which you can find in the [GitHub repository](https://github.com/mui-org/material-ui) under the [`/examples`](https://github.com/mui-org/material-ui/tree/master/examples) folder:
- [Create React App](https://github.com/mui-org/material-ui/tree/master/examples/create-react-app)
- [Next.js](https://github.com/mui-org/material-ui/tree/master/examples/nextjs)
- [Gatsby](https://github.com/mui-org/material-ui/tree/master/examples/gatsby)
- [CDN](https://github.com/mui-org/material-ui/tree/master/examples/cdn)
- And more

Create React App is an awesome project for learning React.
Have a look at [the alternatives available](https://github.com/facebook/create-react-app/blob/master/README.md#popular-alternatives) to see which project best fits your needs.

The source code for this documentation site is also included in the repository.
This is a slightly more complex project.
Check out the [`/docs`](https://github.com/mui-org/material-ui/tree/v1-beta/docs) folder for
Check out the [`/docs`](https://github.com/mui-org/material-ui/tree/master/docs) folder for
build instructions.
8 changes: 4 additions & 4 deletions docs/src/pages/getting-started/faq/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ It's highly recommended:
- It comes built in, so carries no additional bundle size overhead.
- It's fast & memory efficient.
- It has a clean, consistent [API](http://cssinjs.org/json-api/).
- It supports a number of advanced features, either natively, or through [plugins](http://cssinjs.org/plugins/).
- It supports a number of advanced features, either natively, or through [plugins](http://cssinjs.org/plugins/).

However perhaps you're adding some Material-UI components to an app that already uses another styling solution,
or are already familiar with a different API, and don't want to learn a new one? In that case, head over to the
[Style Library Interoperability](/guides/interoperability) section,
or are already familiar with a different API, and don't want to learn a new one? In that case, head over to the
[Style Library Interoperability](/guides/interoperability) section,
where we show how simple it is to restyle Material-UI components with alternative style libraries.

## When should I use inline-style vs `withStyles()`?
Expand Down Expand Up @@ -122,7 +122,7 @@ page](/customization/themes) to learn about theme customization.
## Material-UI is awesome. How can I support the project?

There are many ways to support Material-UI:
- Improve [the documentation](https://github.com/mui-org/material-ui/tree/v1-beta/docs).
- Improve [the documentation](https://github.com/mui-org/material-ui/tree/master/docs).
- Help others to get started.
- [Spread the word](https://twitter.com/MaterialUI).
- Answer [StackOverflow questions](https://stackoverflow.com/questions/tagged/material-ui) or [issues marked as question](https://github.com/mui-org/material-ui/issues?q=is%3Aopen+is%3Aissue+label%3Aquestion) in the repository.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/guides/flow/flow.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Flow

You can add static typing to JavaScript to improve developer productivity and code quality thanks to [Flow](https://github.com/facebook/flow).
Have a look at the [Create React App with Flow](https://github.com/mui-org/material-ui/tree/v1-beta/examples/create-react-app-with-flow) example.
Have a look at the [Create React App with Flow](https://github.com/mui-org/material-ui/tree/master/examples/create-react-app-with-flow) example.

## flow-typed

Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/guides/migration-v0.x/migration-v0.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Curious to learn more about it? You can checkout our [Q&A on the v1 version](/di
import Button from 'material-ui-next/Button'; // v1.x
```

2. Run [the migration helper](https://github.com/mui-org/material-ui/tree/v1-beta/packages/material-ui-codemod) on your project.
2. Run [the migration helper](https://github.com/mui-org/material-ui/tree/master/packages/material-ui-codemod) on your project.
3. `MuiThemeProvider` is optional for v1.x. Still, you are free to use v0.x and v1.x versions of the component at the same time like so:

```jsx
Expand Down Expand Up @@ -96,7 +96,7 @@ In the future, we will look into providing a simple component to solve the simpl
### Svg Icon
First, run [the migration helper](https://github.com/mui-org/material-ui/tree/v1-beta/packages/material-ui-codemod) on your project.
First, run [the migration helper](https://github.com/mui-org/material-ui/tree/master/packages/material-ui-codemod) on your project.
However, this might not be enough when using the svg icons.
The `@material-ui/icons` package has a dependency on the `material-ui/SvgIcon` module.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
The bundle size of Material-UI is taken very seriously, so
[size-limit](https://github.com/ai/size-limit) is used to prevent introducing any size regression.
The size of the bundle is checked at each commit:
- When importing **all the components**. This lets us spot any [unwanted bundle size increase](https://github.com/mui-org/material-ui/blob/v1-beta/.size-limit#L4).
- When importing **a single component**. This lets us estimate [the overhead of our core dependencies](https://github.com/mui-org/material-ui/blob/v1-beta/.size-limit#L8). (styling, theming, etc.: ~20 kB gzipped)
- When importing **all the components**. This lets us spot any [unwanted bundle size increase](https://github.com/mui-org/material-ui/blob/master/.size-limit#L4).
- When importing **a single component**. This lets us estimate [the overhead of our core dependencies](https://github.com/mui-org/material-ui/blob/master/.size-limit#L8). (styling, theming, etc.: ~20 kB gzipped)

## How to reduce the bundle size?

Expand All @@ -31,7 +31,7 @@ import Button from '@material-ui/core/Button';
import TextField from '@material-ui/core/TextField';
```

While importing directly in this manner doesn't use the exports in [`material-ui/index.js`](https://github.com/mui-org/material-ui/blob/v1-beta/packages/material-ui/src/index.js), this file can serve as a handy reference as to which modules are public.
While importing directly in this manner doesn't use the exports in [`material-ui/index.js`](https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/index.js), this file can serve as a handy reference as to which modules are public.
Anything not listed there should be considered **private**, and subject to change without notice.
For example, the `Tabs` component is a public module while `TabIndicator` is private.

Expand Down
Loading

0 comments on commit ab47058

Please sign in to comment.