From 70e9b4889781a5033d424bb13048e1a91a8e2357 Mon Sep 17 00:00:00 2001 From: fzaninotto Date: Wed, 13 May 2020 17:35:25 +0200 Subject: [PATCH] Minor doc tweaks --- docs/FAQ.md | 33 +++++---------------------------- docs/css/style-v4.css | 5 +++++ docs/navigation.html | 8 ++++---- 3 files changed, 14 insertions(+), 32 deletions(-) diff --git a/docs/FAQ.md b/docs/FAQ.md index cdbacc9c08e..60c973b6509 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -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? @@ -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: @@ -182,13 +169,3 @@ In order to have a specific resource without `list` prop listed on the menu, you ); ``` - -## 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. diff --git a/docs/css/style-v4.css b/docs/css/style-v4.css index 6981d5a1828..34477e08634 100644 --- a/docs/css/style-v4.css +++ b/docs/css/style-v4.css @@ -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; } diff --git a/docs/navigation.html b/docs/navigation.html index 48e444fc0dd..76828deb6ab 100644 --- a/docs/navigation.html +++ b/docs/navigation.html @@ -39,11 +39,11 @@
  • Reference
  • -
  • FAQ
  • Ecosystem
  • Unit - Testing
  • + Testing
  • Advanced - tutorials
  • + href="./AdvancedTutorials.html">Advanced + tutorials +
  • FAQ