Skip to content

Commit

Permalink
Minor doc tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
fzaninotto committed May 13, 2020
1 parent 70e00f5 commit 70e9b48
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 32 deletions.
33 changes: 5 additions & 28 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ title: "FAQ"

# FAQ

- [FAQ](#faq)
- [Can I have custom identifiers/primary keys for my resources?](#can-i-have-custom-identifiersprimary-keys-for-my-resources)
- [I get warning about unique key for child in array](#i-get-warning-about-unique-key-for-child-in-array)
- [How can I customize the UI depending on the user permissions?](#how-can-i-customize-the-ui-depending-on-the-user-permissions)
- [How can I customize forms depending on its inputs values?](#how-can-i-customize-forms-depending-on-its-inputs-values)
- [UI in production build is empty or broke](#ui-in-production-build-is-empty-or-broke)
- [My Resource is defined but not displayed on the Menu](#my-resource-is-defined-but-not-displayed-on-the-menu)
- [Why Doesn't React Admin Support The Latest Version Of Material-UI?](#why-doesnt-react-admin-support-the-latest-version-of-material-ui)
- [Can I have custom identifiers/primary keys for my resources?](#can-i-have-custom-identifiersprimary-keys-for-my-resources)
- [I get warning about unique key for child in array](#i-get-warning-about-unique-key-for-child-in-array)
- [How can I customize forms depending on its inputs values?](#how-can-i-customize-forms-depending-on-its-inputs-values)
- [UI in production build is empty or broke](#ui-in-production-build-is-empty-or-broke)
- [My Resource is defined but not displayed on the Menu](#my-resource-is-defined-but-not-displayed-on-the-menu)

## Can I have custom identifiers/primary keys for my resources?

Expand Down Expand Up @@ -130,16 +127,6 @@ When displaying a `Datagrid` component, you get the following warning:
This is most probably because the resource does not have an `id` property as expected by react-admin. See the previous FAQ to see how to resolve this: [Can I have custom identifiers/primary keys for my resources?](#can-i-have-custom-identifiersprimary-keys-for-my-resources)

## How can I customize the UI depending on the user permissions?

Some fairly common use cases which may be dependent on the user permissions:

- Specific views
- Having parts of a view (fields, inputs) differents for specific users
- Hiding or displaying menu items

For all those cases, you can use the [aor-permissions](https://github.com/marmelab/aor-permissions) addon.

## How can I customize forms depending on its inputs values?

Some use cases:
Expand Down Expand Up @@ -182,13 +169,3 @@ In order to have a specific resource without `list` prop listed on the menu, you
</div>
);
```

## Why Doesn't React Admin Support The Latest Version Of Material-UI?

React Admin users and third-party libraries maintainers might have noticed that the default UI template `ra-ui-materialui` [has `@material-ui/core@^1.4.0` as dependency](https://github.com/marmelab/react-admin/blob/ae45a2509b391a6ea81cdf9c248ff9d28364b6e1/packages/ra-ui-materialui/package.json#L44) even though the latest version of Material UI is already 3.x.

We chose not to upgrade to Material UI v3 when it was released because the MUI team was already hard at work preparing the next major version ([which includes major breaking changes](https://github.com/mui-org/material-ui/issues/13663)). In fact, material-ui published a release schedule for one major version every 6 months. This means that developers using material-ui have to upgrade their codebase every six months to get the latest updates. On the other hand, react-admin plans to release a major version once every year, minimizing the upgrade work for developers. This gain in stability is a trade-off - react-admin users can't use the latest version of material-ui for about half a year.

Feel free to discuss this policy in [issue #2399](https://github.com/marmelab/react-admin/issues/2399).

If you are a maintainer of a third-party library based on React Admin, your library has to add material-ui v1.x as a peer dependency.
5 changes: 5 additions & 0 deletions docs/css/style-v4.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ footer {
fill: rgba(0, 0, 0, 0.6);
}

.sidenav li > a {
height: 40px;
line-height: 40px;
}

.sidenav.sidenav-fixed ul.collapsible-accordion a.collapsible-header {
padding: 0 30px;
}
Expand Down
8 changes: 4 additions & 4 deletions docs/navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
</li>
<li {% if page.path contains 'Reference.md' %} class="active" {% endif %}><a href="./Reference.html">Reference</a>
</li>
<li {% if page.path contains 'FAQ.md' %} class="active" {% endif %}><a href="./FAQ.html">FAQ</a></li>
<li {% if page.path contains 'Ecosystem.md' %} class="active" {% endif %}><a href="./Ecosystem.html">Ecosystem</a>
</li>
<li {% if page.path contains 'UnitTesting.md' %} class="active" {% endif %}><a href="./UnitTesting.html">Unit
Testing</a></li>
Testing</a></li>
<li {% if page.path contains 'AdvancedTutorials.md' %} class="active" {% endif %}><a
href="./AdvancedTutorials.html">Advanced
tutorials</a></li>
href="./AdvancedTutorials.html">Advanced
tutorials</a></li>
<li {% if page.path contains 'FAQ.md' %} class="active" {% endif %}><a href="./FAQ.html">FAQ</a></li>

0 comments on commit 70e9b48

Please sign in to comment.