Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] SEO fixes #4711

Merged
merged 4 commits into from
May 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/data/data-grid/getting-started/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ Please pay attention to the license.

### Plans

The component comes [in different plans](/pricing/):
The component comes [in different plans](https://mui.com/pricing/):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So that once this content is not longer the active version, developers will still land on the latest pricing page.


- **Community** Plan: [`@mui/x-data-grid`](https://www.npmjs.com/package/@mui/x-data-grid), published under the [MIT license](https://tldrlegal.com/license/mit-license) and [free forever](https://mui-org.notion.site/Stewardship-542a2226043d4f4a96dfb429d16cf5bd).
- **Pro** Plan: [`@mui/x-data-grid-pro`](https://www.npmjs.com/package/@mui/x-data-grid-pro) published under a [Commercial license](/x/license/).
- **Premium** Plan: [`@mui/x-data-grid-premium`](https://www.npmjs.com/package/@mui/x-data-grid-premium) published under a [Commercial license](/x/license/).
- **Pro** Plan: [`@mui/x-data-grid-pro`](https://www.npmjs.com/package/@mui/x-data-grid-pro) published under a [Commercial license](https://mui.com/store/legal/mui-x-eula/).
- **Premium** Plan: [`@mui/x-data-grid-premium`](https://www.npmjs.com/package/@mui/x-data-grid-premium) published under a [Commercial license](https://mui.com/store/legal/mui-x-eula/).

More information about the various plans on [the dedicated section](/x/advanced-components#plans)
More information about the various plans on [the dedicated section](/x/advanced-components/#plans)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reported the bug in https://answers.netlify.com/t/no-trailing-slash-when-using-proxies/48790/6?u=oliviertassinari, ahrefs should have found this, it didn't.


### Feature comparison

Expand Down Expand Up @@ -200,11 +200,11 @@ The enterprise components come in two plans: Pro and Premium.
| [Column virtualization](/x/react-data-grid/virtualization/#column-virtualization) | ✅ | ✅ | ✅ |
| [Row virtualization > 100 rows](/x/react-data-grid/virtualization/#row-virtualization) | ❌ | ✅ | ✅ |
| **Group & Pivot** | | | |
| [Tree data](/x/react-data-grid/tree-data) | ❌ | ✅ | ✅ |
| [Master detail](/x/react-data-grid/master-detail) | ❌ | ✅ | ✅ |
| [Row Grouping](/x/react-data-grid/row-grouping) | ❌ | ❌ | ✅ |
| [Aggregation](/x/react-data-grid/aggregation) | ❌ | ❌ | 🚧 |
| [Pivoting](/x/react-data-grid/pivoting) | ❌ | ❌ | 🚧 |
| [Tree data](/x/react-data-grid/tree-data/) | ❌ | ✅ | ✅ |
| [Master detail](/x/react-data-grid/master-detail/) | ❌ | ✅ | ✅ |
| [Row grouping](/x/react-data-grid/row-grouping/) | ❌ | ❌ | ✅ |
| [Aggregation](/x/react-data-grid/aggregation/) | ❌ | ❌ | 🚧 |
| [Pivoting](/x/react-data-grid/pivoting/) | ❌ | ❌ | 🚧 |
| **Misc** | | | |
| [Accessibility](/x/react-data-grid/accessibility/) | ✅ | ✅ | ✅ |
| [Keyboard navigation](/x/react-data-grid/accessibility/#keyboard-navigation) | ✅ | ✅ | ✅ |
Expand Down
14 changes: 0 additions & 14 deletions docs/data/data-grid/selection/selection.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,6 @@ title: Data Grid - Selection

## Row selection

<!--
- https://ag-grid.com/javascript-grid-selection/
- https://ej2.syncfusion.com/react/demos/#/material/grid/selection
- https://ant.design/components/table/#components-table-demo-row-selection
- https://demos.telerik.com/kendo-ui/grid/selection
- https://www.telerik.com/kendo-react-ui/components/grid/selection/
- https://js.devexpress.com/Demos/WidgetsGallery/Demo/DataGrid/RowSelection/React/Light/
- https://www.jqwidgets.com/react/react-grid/#https://www.jqwidgets.com/react/react-grid/react-grid-rowselection.htm
- http://tabulator.info/docs/4.5/select#setup-range
- https://devexpress.github.io/devextreme-reactive/react/grid/docs/guides/selection/
- https://ej2.syncfusion.com/react/demos/#/material/grid/checkbox-selection
- https://demos.telerik.com/kendo-ui/grid/checkbox-selection
-->

Row selection can be performed with a simple mouse click, or using the [keyboard shortcuts](/x/react-data-grid/accessibility/#selection). The grid supports single and multiple row selection.

### Single row selection
Expand Down
12 changes: 6 additions & 6 deletions docs/data/data-grid/tree-data/tree-data.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Data Grid - Tree Data
title: Data Grid - Tree data
---

# Data Grid - Tree Data [<span class="plan-pro"></span>](https://mui.com/store/items/material-ui-pro/)
# Data Grid - Tree data [<span class="plan-pro"></span>](https://mui.com/store/items/material-ui-pro/)

<p class="description">Use Tree Data to handle rows with parent / child relationship.</p>
<p class="description">Use Tree data to handle rows with parent / child relationship.</p>

To enable the Tree Data, you simply have to use the `treeData` prop as well as provide a `getTreeDataPath` prop.
To enable the Tree data, you simply have to use the `treeData` prop as well as provide a `getTreeDataPath` prop.
The `getTreeDataPath` function returns an array of strings which represents the path to a given row.

```tsx
Expand Down Expand Up @@ -53,7 +53,7 @@ const rows: GridRowsProp = [

## Custom grouping column

Same behavior as for the [Row grouping](#grouping-columns) except for the `leafField` and `mainGroupingCriteria` which are not applicable for the Tree Data.
Same behavior as for the [Row grouping](/x/react-data-grid/row-grouping/#grouping-columns) except for the `leafField` and `mainGroupingCriteria` which are not applicable for the Tree data.

{{"demo": "TreeDataCustomGroupingColumn.js", "bg": "inline", "defaultCodeOpen": false}}

Expand All @@ -75,7 +75,7 @@ If you want to access the grouping column field, for instance, to use it with co

## Group expansion

Same behavior as for the [Row grouping](#group-expansion).
Same behavior as for the [Row grouping](/x/react-data-grid/row-grouping/#group-expansion).

## Gaps in the tree

Expand Down
2 changes: 1 addition & 1 deletion docs/data/date-pickers/migration-lab/migration-lab.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Most of our components remains MIT and are accessible for free in `@mui/x-date-p
The range-picker components: `DateRangePicker`, `DateRangePickerDay`, `DesktopDateRangePicker`, `MobileDateRangePicker` and `StaticDateRangePicker`
were marked as "intended for MUI X Pro" in our documentation and are now part of MUI X Pro.

If you are using one of these components, you will have to take a Pro license in order to migrate to `@mui/x-date-pickers-pro` (see the [Pricing](/pricing/) page for more information).
If you are using one of these components, you will have to take a Pro license in order to migrate to `@mui/x-date-pickers-pro` (see the [Pricing](https://mui.com/pricing/) page for more information).

**Note**: If you already have a license for `@mui/x-data-grid-pro`, you can use the same one for `@mui/x-date-pickers-pro` with no additional fee!

Expand Down
27 changes: 18 additions & 9 deletions docs/public/_redirects
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
# Proxies
/ /x/advanced-components/

## mui-x is configured to be hosted at the root.
/static/* https://material-ui-docs.netlify.app/static/:splat 200
# For links that we can't edit later on, e.g. hosted in the code published on npm or sent by email
# should all be prefixed with x-
/r/x-get-license scope=pro https://mui.com/store/items/material-ui-pro/ 302
/r/x-get-license scope=premium https://mui.com/store/items/mui-x-premium/ 302
/r/x-get-license https://mui.com/pricing/ 302
/r/x-license-eula https://mui.com/store/legal/mui-x-eula/ 302
/r/x-license-key-installation https://mui.com/x/advanced-components/#license-key-installation 302

## Localization
# Legacy redirection
# 2021
/fr/* /:splat 200
/de/* /:splat 200
/ja/* /:splat 200
# 2022
/x/license/ https://mui.com/store/legal/mui-x-eula/ 301
/x/react-data-grid/group-pivot/ /x/react-data-grid/tree-data/ 301
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the idea here that it's better to redirect to something than 404?
I was thinking about adding client-side redirects for urls with # that were moved to separate pages (like group & pivot split)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, my assumption is that 404 is worse than not linking the exact correct content.

For the client side fragment redirections, why not, we never implemented this before it could help, we had this pain multiple times now. From an SEO perspective, I doubt that Google will ever be able to update it's index from it, so we still need to server side redirect to a working page.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From an SEO perspective, I doubt that Google will ever be able to update it's index from it, so we still need to server side redirect to a working page.

Right.

/:lang/x/react-data-grid/group-pivot/ /:lang/x/react-data-grid/tree-data/ 301
# 2023

# Redirections

/ /x/react-data-grid/
# Proxies

## Redirections have to be done in the core repository, it owns the domain name.
## e.g. https://github.com/mui/material-ui/blob/HEAD/docs/public/_redirects#L31
## mui-x is configured to be hosted at the root.
oliviertassinari marked this conversation as resolved.
Show resolved Hide resolved
/static/* https://material-ui-docs.netlify.app/static/:splat 200
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this redirect necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be clear this line is moved, I think that it's beyond the scope of this PR.


MUI X duplicates all the @mui/monorepo static files. So this line is not necessary under the current approach, we could remove it. But is the current approach the right one? I propose an alternative in #4790.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I didn't notice that it was moved. Diffs are hard :D

4 changes: 2 additions & 2 deletions packages/grid/x-data-grid-premium/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ Commercial License
Copyright (c) 2020 Material-UI SAS

MUI X Premium (https://mui.com/pricing/) is commercial software. You must purchase
a license and agree to the End User License Agreement (EULA: https://mui.com/x/license/)
a license and agree to the End User License Agreement (EULA: https://mui.com/r/x-license-eula)
to be able to use the software.

Commercial licenses can be obtained at https://mui.com/store/items/material-ui-premium/.
Commercial licenses can be obtained at https://mui.com/r/x-get-license?scope=premium.
You are free to install and try the software without a license key as long as it
is not used for the development of a feature intended for production use. You can
find more details under the "Evaluation (trial) licenses" section of the EULA.
4 changes: 2 additions & 2 deletions packages/grid/x-data-grid-pro/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ Commercial License
Copyright (c) 2020 Material-UI SAS

MUI X Pro (https://mui.com/pricing/) is commercial software. You must purchase
a license and agree to the End User License Agreement (EULA: https://mui.com/x/license/)
a license and agree to the End User License Agreement (EULA: https://mui.com/r/x-license-eula)
to be able to use the software.

Commercial licenses can be obtained at https://mui.com/store/items/material-ui-pro/.
Commercial licenses can be obtained at https://mui.com/r/x-get-license?scope=pro.
You are free to install and try the software without a license key as long as it
is not used for the development of a feature intended for production use. You can
find more details under the "Evaluation (trial) licenses" section of the EULA.
4 changes: 2 additions & 2 deletions packages/x-date-pickers-pro/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ Commercial License
Copyright (c) 2020 Material-UI SAS

MUI X Pro (https://mui.com/pricing/) is commercial software. You must purchase
a license and agree to the End User License Agreement (EULA: https://mui.com/x/license/)
a license and agree to the End User License Agreement (EULA: https://mui.com/r/x-license-eula)
to be able to use the software.

Commercial licenses can be obtained at https://mui.com/store/items/material-ui-pro/.
Commercial licenses can be obtained at https://mui.com/r/x-get-license?scope=pro.
You are free to install and try the software without a license key as long as it
is not used for the development of a feature intended for production use. You can
find more details under the "Evaluation (trial) licenses" section of the EULA.
4 changes: 2 additions & 2 deletions packages/x-license-pro/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ Commercial License
Copyright (c) 2020 Material-UI SAS

MUI X Pro (https://mui.com/pricing/) is commercial software. You must purchase
a license and agree to the End User License Agreement (EULA: https://mui.com/x/license/)
a license and agree to the End User License Agreement (EULA: https://mui.com/r/x-license-eula)
to be able to use the software.

Commercial licenses can be obtained at https://mui.com/store/items/material-ui-pro/.
Commercial licenses can be obtained at https://mui.com/r/x-get-license?scope=pro.
You are free to install and try the software without a license key as long as it
is not used for the development of a feature intended for production use. You can
find more details under the "Evaluation (trial) licenses" section of the EULA.
6 changes: 3 additions & 3 deletions packages/x-license-pro/src/utils/licenseErrorMessageUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function showInvalidLicenseError() {
'MUI: Invalid license.',
'',
'Your license for MUI X is not valid, please visit',
'https://mui.com/r/x-license to get a valid license.',
'https://mui.com/r/x-get-license to get a valid license.',
]);
}

Expand All @@ -30,15 +30,15 @@ export function showNotFoundLicenseError() {
'development use on projects intended for production.',
'',
'To purchase a license, please visit',
'https://mui.com/r/x-license to get a valid license.',
'https://mui.com/r/x-get-license to get a valid license.',
]);
}

export function showExpiredLicenseError() {
showError([
'MUI: License key expired.',
'',
'Please visit https://mui.com/r/x-license to renew',
'Please visit https://mui.com/r/x-get-license to renew',
'your subscription and get the latest version of MUI X.',
]);
}