Skip to content

Commit

Permalink
Merge pull request #9006 from marmelab/ee-webm
Browse files Browse the repository at this point in the history
[Doc] Use WebM and MP4 videos instead of GIF for EE components
  • Loading branch information
fzaninotto authored Jun 14, 2023
2 parents ac1f2a3 + 5add589 commit 1eac60f
Show file tree
Hide file tree
Showing 27 changed files with 168 additions and 33 deletions.
13 changes: 11 additions & 2 deletions docs/AccordionForm.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ title: "AccordionForm"

This [Enterprise Edition](https://marmelab.com/ra-enterprise)<img class="icon" src="./img/premium.svg" /> component offers an alternative layout for Edit and Create forms, where Inputs are grouped into expandable panels.

![AccordionForm](https://marmelab.com/ra-enterprise/modules/assets/ra-accordion-form-overview.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-accordion-form-overview.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-accordion-form-overview.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

Users can open or close each panel independently, and each panel has a header that gets highlighted when the section contains validation errors.

Expand Down Expand Up @@ -68,7 +72,11 @@ By default, each child accordion element handles its expanded state independentl

You can also use the `<AccordionSection>` component as a child of `<SimpleForm>` for secondary inputs:

![Accordion section](https://marmelab.com/ra-enterprise/modules/assets/ra-accordion-section-overview.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-accordion-section-overview.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-accordion-section-overview.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

Check [the `ra-form-layout` documentation](https://marmelab.com/ra-enterprise/modules/ra-form-layout##accordionform) for more details.

Expand Down Expand Up @@ -399,6 +407,7 @@ Renders children (Inputs) inside a MUI `<Accordion>` element without a Card styl
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-accordion-section-overview.webm" type="video/webm"/>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-accordion-section-overview.mp4" type="video/mp4"/>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-accordion-section-overview.mp4" type="video/mp4"/>
Your browser does not support the video tag.
</video>

Expand Down
6 changes: 5 additions & 1 deletion docs/AppBar.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,11 @@ export const MyAppBar = () => (

A common use case for app bar customization is to add a site-wide search engine. The `<Search>` component is a good starting point for this.

![ra-search](https://marmelab.com/ra-enterprise/modules/assets/ra-search-demo.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-search-demo.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-search-demo.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

```jsx
// in src/MyAppBar.jsx
Expand Down
1 change: 1 addition & 0 deletions docs/Breadcrumb.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The `<Breadcrumb>` component is designed to be integrated into the app layout. E

<video controls autoplay playsinline muted loop width="100%">
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-navigation/latest/breadcumb-nested-resource.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-navigation/latest/breadcumb-nested-resource.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

Expand Down
12 changes: 10 additions & 2 deletions docs/Buttons.md
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,17 @@ See [The theming documentation](./Theming.md#menuitemlink) for more details.

**Tip**: If you need a multi-level menu, or a Mega Menu opening panels with custom content, check out [the `ra-navigation`<img class="icon" src="./img/premium.svg" /> module](https://marmelab.com/ra-enterprise/modules/ra-navigation) (part of the [Enterprise Edition](https://marmelab.com/ra-enterprise))

![multi-level menu](https://marmelab.com/ra-enterprise/modules/assets/ra-multilevelmenu-item.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-multilevelmenu-item.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-multilevelmenu-item.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

![MegaMenu and Breadcrumb](https://marmelab.com/ra-enterprise/modules/assets/ra-multilevelmenu-categories.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-multilevelmenu-categories.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-multilevelmenu-categories.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

#### `sx`: CSS API

Expand Down
6 changes: 5 additions & 1 deletion docs/Calendar.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ title: "The Calendar Component"

This [Enterprise Edition](https://marmelab.com/ra-enterprise)<img class="icon" src="./img/premium.svg" /> component, part of [the `ra-calendar` module](https://marmelab.com/ra-enterprise/modules/ra-calendar), renders a list of events as a calendar.

![the `<Calendar>` component](https://marmelab.com/ra-enterprise/modules/assets/ra-calendar.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-calendar.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-calendar.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

The user interface offers everything you expect:

Expand Down
6 changes: 5 additions & 1 deletion docs/Create.md
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,11 @@ Note: In order to get the `mutationOptions` being considered, you have to set th

`<Create>` is designed to be a page component, passed to the `create` prop of the `<Resource>` component. But you may want to let users create a record from another page.

![CreateDialog](https://marmelab.com/ra-enterprise/modules/assets/create-dialog.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/create-dialog.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/create-dialog.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

* If you want to allow creation from the `list` page, use [the `<CreateDialog>` component](./CreateDialog.md)
* If you want to allow creation from another page, use [the `<CreateInDialogButton>` component](./CreateInDialogButton.md)
Expand Down
12 changes: 10 additions & 2 deletions docs/CreateDialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ title: "CreateDialog"

This [Enterprise Edition](https://marmelab.com/ra-enterprise)<img class="icon" src="./img/premium.svg" /> component offers a replacement to [the `<Create>` component](./Create.md) allowing users to create records without leaving the context of the list page.

![CreateDialog](https://marmelab.com/ra-enterprise/modules/assets/create-dialog.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/create-dialog.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/create-dialog.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

## Usage

Expand Down Expand Up @@ -75,7 +79,11 @@ This may not be what you want if you need to display the creation dialog in anot

In that case, use [the `<CreateInDialogButton>` component](./CreateInDialogButton.md), which doesn't create a route, but renders the dialog when the user clicks on it.

![CreateInDialogButton](https://marmelab.com/ra-enterprise/modules/assets/ra-form-layout/latest/CreateInDialogButton.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-form-layout/latest/CreateInDialogButton.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-form-layout/latest/CreateInDialogButton.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

Put `<CreateInDialogButton>` wherever you would put a `<CreateButton>`, and use the same children as you would for a `<Create>` component (e.g. a `<SimpleForm>`). Don't forget to preset the `record` prop if you want to initialize the form with a foreign key.

Expand Down
6 changes: 5 additions & 1 deletion docs/CreateInDialogButton.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ This [Enterprise Edition](https://marmelab.com/ra-enterprise)<img class="icon" s

It can be useful in case you want the ability to create a record linked by a reference to the currently edited record, or if you have a nested `<Datagrid>` inside a `<Show>` or an `<Edit>` view.

![CreateInDialogButton](https://marmelab.com/ra-enterprise/modules/assets/ra-form-layout/latest/CreateInDialogButton.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-form-layout/latest/CreateInDialogButton.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-form-layout/latest/CreateInDialogButton.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

Note that this component doesn't use routing, so it doesn't change the URL. It's therefore not possible to bookmark the creation dialog, or to link to it from another page. If you need that functionality, use [`<CreateDialog>`](./CreateDialog.md) instead.

Expand Down
6 changes: 5 additions & 1 deletion docs/Datagrid.md
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,11 @@ const PostList = () => (

You can combine a datagrid and an edition form into a unified spreadsheet view, "à la" Excel. This is useful when you want to let users edit a large number of records at once.

![Editable Datagrid](https://marmelab.com/ra-enterprise/modules/assets/ra-editable-datagrid-overview.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-editable-datagrid-overview.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-editable-datagrid-overview.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

`<EditableDatagrid>` is a drop-in replacement for `<Datagrid>`. It expects 2 additional props: `createForm` and `editForm`, the components to be displayed when a user creates or edits a row. The `<RowForm>` component allows to create such forms using react-admin Input components.

Expand Down
6 changes: 5 additions & 1 deletion docs/DualListInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ title: "The DualListInput Component"

This [Enterprise Edition](https://marmelab.com/ra-enterprise)<img class="icon" src="./img/premium.svg" /> component allows to edit array values, one-to-many or many-to-many relationships by moving items from one list to another.

![DualListInput](https://marmelab.com/ra-enterprise/modules/assets/ra-relationships-duallistinput.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-relationships-duallistinput.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-relationships-duallistinput.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

This input allows editing values that are arrays of scalar values, e.g. `[123, 456]`.

Expand Down
6 changes: 5 additions & 1 deletion docs/Edit.md
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,11 @@ You can do the same for error notifications, by passing a custom `onError` call

`<Edit>` is designed to be a page component, passed to the `edit` prop of the `<Resource>` component. But you may want to let users edit a record from another page.

![EditDialog](https://marmelab.com/ra-enterprise/modules/assets/edit-dialog.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/edit-dialog.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/edit-dialog.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

* If you want to allow edition from the `list` page, use [the `<EditDialog>` component](./EditDialog.md)
* If you want to allow edition from another page, use [the `<EditInDialogButton>` component](./EditInDialogButton.md)
Expand Down
12 changes: 10 additions & 2 deletions docs/EditDialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ title: "EditDialog"

This [Enterprise Edition](https://marmelab.com/ra-enterprise)<img class="icon" src="./img/premium.svg" /> component offers a replacement to [the `<Edit>` component](./Edit.md) allowing users to update records without leaving the context of the list page.

![EditDialog](https://marmelab.com/ra-enterprise/modules/assets/edit-dialog.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/edit-dialog.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/edit-dialog.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

## Usage

Expand Down Expand Up @@ -76,7 +80,11 @@ This may not be what you want if you need to display the edit dialog in another

In that case, use [the `<EditInDialogButton>` component](./EditInDialogButton.md), which doesn't create a route, but renders the dialog when the user clicks on it.

![EditInDialogButton](https://marmelab.com/ra-enterprise/modules/assets/ra-form-layout/latest/InDialogButtons.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-form-layout/latest/InDialogButtons.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-form-layout/latest/InDialogButtons.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

Put `<EditInDialogButton>` wherever you would put an `<EditButton>`, and use the same children as you would for an `<Edit>` component (e.g. a `<SimpleForm>`):

Expand Down
6 changes: 5 additions & 1 deletion docs/EditInDialogButton.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ This [Enterprise Edition](https://marmelab.com/ra-enterprise)<img class="icon" s

It can be useful in case you want the ability to edit a record linked by a reference to the currently edited record, or if you have a nested `<Datagrid>` inside a `<Show>` or an `<Edit>` view.

![EditInDialogButton](https://marmelab.com/ra-enterprise/modules/assets/ra-form-layout/latest/InDialogButtons.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-form-layout/latest/InDialogButtons.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-form-layout/latest/InDialogButtons.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

Note that this component doesn't use routing, so it doesn't change the URL. It's therefore not possible to bookmark the edit dialog, or to link to it from another page. If you need that functionality, use [`<EditDialog>`](./EditDialog.md) instead.

Expand Down
6 changes: 5 additions & 1 deletion docs/EditTutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,11 @@ Users often need to edit data from several resources in the same form. React-adm
- [`<ReferenceManyInput>`](./ReferenceManyInput.md) lets users edit a list of related records
- [`<ReferenceManyToManyInput>`](./ReferenceManyToManyInput.md) lets users edit a list of related records via an associative table

![EditInDialogButton](https://marmelab.com/ra-enterprise/modules/assets/ra-form-layout/latest/InDialogButtons.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-form-layout/latest/InDialogButtons.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-form-layout/latest/InDialogButtons.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

<video controls autoplay playsinline muted loop>
<source src="./img/reference-many-input.webm" type="video/webm"/>
Expand Down
6 changes: 5 additions & 1 deletion docs/EditableDatagrid.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ title: "The EditableDatagrid Component"

This [Enterprise Edition](https://marmelab.com/ra-enterprise)<img class="icon" src="./img/premium.svg" /> component offers an "edit-in-place" experience in a `<Datagrid>`.

![Editable Datagrid](https://marmelab.com/ra-enterprise/modules/assets/ra-editable-datagrid-overview.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-editable-datagrid-overview.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-editable-datagrid-overview.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

## Usage

Expand Down
18 changes: 15 additions & 3 deletions docs/Features.md
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,11 @@ To learn more about authentication, roles, and permissions, check out the follow

Most admin and B2B apps require that user actions are recorded for audit purposes. React-admin provides templates for displaying such audit logs, and helpers to automatically **record user actions**.

![Audit log](https://marmelab.com/ra-enterprise/modules/assets/ra-audit-log/latest/ra-audit-log.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-audit-log/latest/ra-audit-log.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-audit-log/latest/ra-audit-log.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

```jsx
import { useGetList } from "react-admin";
Expand Down Expand Up @@ -813,7 +817,11 @@ const dataProvider = addEventsForMutations(

If your app needs to display **events**, **appointments**, **time intervals**, or any other kind of time-based data, you can use the [`<Calendar>`](./Calendar.md) component.

![the `<Calendar>` component](https://marmelab.com/ra-enterprise/modules/assets/ra-calendar.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-calendar.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-calendar.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

```jsx
import { Calendar, getFilterValuesFromInterval } from '@react-admin/ra-calendar';
Expand Down Expand Up @@ -899,7 +907,11 @@ Check out the following components for displaying hierarchical data:

A UI kit like Material UI provides basic building blocks like a button, a form, a table, etc. React-admin goes one level higher and provides a set of **[application components](./Reference.md#components)** specifically designed for building admin and B2B *applications*.

![editable Datagrid](https://marmelab.com/ra-enterprise/modules/assets/ra-editable-datagrid/latest/ra-editable-datagrid-overview.gif)
<video controls autoplay playsinline muted loop>
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-editable-datagrid/latest/ra-editable-datagrid-overview.webm" type="video/webm" />
<source src="https://marmelab.com/ra-enterprise/modules/assets/ra-editable-datagrid/latest/ra-editable-datagrid-overview.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

These building blocks include:

Expand Down
Loading

0 comments on commit 1eac60f

Please sign in to comment.