Skip to content

Commit

Permalink
[core] Enforce straight quote (#34686)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Oct 14, 2022
1 parent 15eb4ec commit c3d58bb
Show file tree
Hide file tree
Showing 11 changed files with 152 additions and 162 deletions.
28 changes: 28 additions & 0 deletions .markdownlint-cli2.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const straightQuotes = require('./packages/markdownlint-rule-mui/straight-quotes');

module.exports = {
config: {
default: true,
MD004: false, // MD004/ul-style. Buggy
MD013: false, // MD013/line-length. Already handled by Prettier.
MD014: false, // MD014/commands-show-output. It's OK.
MD024: { siblings_only: true }, // MD024/no-duplicate-heading/no-duplicate-header
MD025: {
// Heading level
level: 1,
// RegExp for matching title in front matter
front_matter_title: '',
},
MD033: false, // MD033/no-inline-html. We use it from time to time, it's fine.
MD034: false, // MD034/no-bare-urls. Not a concern for us, our Markdown interpreter supports it.
MD028: false, // MD028/no-blanks-blockquote prevent double blockquote
MD029: false, // MD029/ol-prefix. Buggy
MD031: false, // MD031/blanks-around-fences Some code blocks inside li
MD036: false, // MD036/no-emphasis-as-heading/no-emphasis-as-header. It's OK.
MD051: false, // MD051/link-fragments. Many false positives in the changelog.
MD052: false, // MD052/reference-links-images. Many false positives in the changelog.
straightQuotes: true,
},
customRules: [straightQuotes],
ignores: ['**/node_modules/**', '**/*-zh.md', '**/*-pt.md', '.github/PULL_REQUEST_TEMPLATE.md'],
};
34 changes: 0 additions & 34 deletions .markdownlint.jsonc

This file was deleted.

3 changes: 0 additions & 3 deletions .markdownlintignore

This file was deleted.

38 changes: 19 additions & 19 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ A big thanks to the 21 contributors who made this release possible. Here are som
- [TrapFocus] Rename TrapFocus to FocusTrap (#34216) @kabernardes

```diff
- import TrapFocus from @mui/base/TrapFocus;
+ import FocusTrap from @mui/base/FocusTrap;
-import TrapFocus from '@mui/base/TrapFocus';
+import FocusTrap from '@mui/base/FocusTrap';
```

#### Changes
Expand Down Expand Up @@ -437,7 +437,7 @@ _Aug 22, 2022_

A big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:

- ✨ @michaldudak synced the Material Icons set with the latest from Google (#33988).
- ✨ @michaldudak synced the Material Icons set with the latest from Google (#33988).\
A couple of icons changed their appearance. See the difference [on this Argos build](https://app.argos-ci.com/mui/material-ui/builds/4428]).

### `@mui/material@5.10.2`
Expand Down Expand Up @@ -2027,8 +2027,8 @@ A big thanks to the 16 contributors who made this release possible. Here are som
`unstable_ClassNameGenerator` has been moved from `utils` to `className` folder to prevent all MUI Base module imports. If you use the module, please update the import as suggested in the diff below:

```diff
- import { unstable_ClassNameGenerator } from '@mui/material/utils';
+ import { unstable_ClassNameGenerator } from '@mui/material/className';
-import { unstable_ClassNameGenerator } from '@mui/material/utils';
+import { unstable_ClassNameGenerator } from '@mui/material/className';
```

#### Changes
Expand Down Expand Up @@ -2370,8 +2370,8 @@ A big thanks to the 22 contributors who made this release possible. Here are som
3. Change the import paths of unstyled components from @mui/material to @mui/base, e.g.:

```diff
- @import ButtonUnstyled from '@mui/material/ButtonUnstyled';
+ @import ButtonUnstyled from '@mui/base/ButtonUnstyled';
-import ButtonUnstyled from '@mui/material/ButtonUnstyled';
+import ButtonUnstyled from '@mui/base/ButtonUnstyled';
```

#### Changes
Expand Down Expand Up @@ -4414,27 +4414,27 @@ A big thanks to the 13 contributors who made this release possible. Here are som
`span` element that wraps children has been removed. `wrapper` classKey is also removed. More details about [this change](https://github.com/mui/material-ui/pull/26666).

```diff
<button class="MuiTab-root">
- <span class="MuiTab-wrapper">
<button class="MuiTab-root">
- <span class="MuiTab-wrapper">
{icon}
{label}
- </span>
</button>
- </span>
</button>
```

- [BottomNavigation] Remove wrapper from BottomNavigationAction (#26923) @siriwatknp

`span` element that wraps children has been removed. `wrapper` classKey is also removed. More details about [this change](https://github.com/mui/material-ui/pull/26666).

```diff
<button class="MuiBottomNavigationAction-root">
- <span class="MuiBottomNavigationAction-wrapper">
{icon}
<span class="MuiBottomNavigationAction-label">
{label}
</span>
- </span>
</button>
<button class="MuiBottomNavigationAction-root">
- <span class="MuiBottomNavigationAction-wrapper">
{icon}
<span class="MuiBottomNavigationAction-label">
{label}
</span>
- </span>
</button>
```

#### Changes
Expand Down
16 changes: 8 additions & 8 deletions docs/pages/blog/aggregation-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ If you've ever worked with a data-heavy grid, then you understand how important
Basic functions like filtering and sorting barely scratch the surface of their needs.

The Premium Data Grid is all about enabling and empowering advanced use cases for data analysis.
And in that spirit, were overjoyed to announce that starting from [v5.15.0](https://github.com/mui/mui-x/releases/tag/v5.15.0), you can now use [aggregation functions](/x/react-data-grid/aggregation/), and with a couple of clicks, extract information like **sum**, **average**, **count**, and others.
And in that spirit, we're overjoyed to announce that starting from [v5.15.0](https://github.com/mui/mui-x/releases/tag/v5.15.0), you can now use [aggregation functions](/x/react-data-grid/aggregation/), and with a couple of clicks, extract information like **sum**, **average**, **count**, and others.

## Wait, what is an aggregation function?

Expand All @@ -24,7 +24,7 @@ For example, you might have a list of financial transactions, and you want to ge

## Intuitive end-user experience

The **Sum** function showing a **Total** in summary rows is one of the most common use cases. But users can employ multiple aggregation functions in different columns simultaneously, and even combine with row grouping to aggregate childrens data on each group.
The **Sum** function showing a **Total** in summary rows is one of the most common use cases. But users can employ multiple aggregation functions in different columns simultaneously, and even combine with row grouping to aggregate children's data on each group.

To make all that work well together, we knew that the focus had to be on creating the best end-user experience possible. The goal was to enable the majority of use cases right out of the box, without any need for significant customization.

Expand Down Expand Up @@ -71,7 +71,7 @@ const firstAlphabeticalAggregation: GridAggregationFunction<
<source src="/static/blog/aggregation-functions/with-custom-functions.mp4" type="video/mp4" />
</video>

## Okay, Im in! How can I get started?
## Okay, I'm in! How can I get started?

Aggregation functions are available in `@mui/x-data-grid-premium`, version `5.15.0` or later.

Expand All @@ -90,7 +90,7 @@ And that's it! That enables the **Aggregation** option on the column menu, which

We already mentioned that you could customize functions and use aggregation with row grouping. But there are a lot of other possibilities to explore!

Please check out the features [full documentation](/x/react-data-grid/aggregation/) to get a better overview of everything it has to offer.
Please check out the feature's [full documentation](/x/react-data-grid/aggregation/) to get a better overview of everything it has to offer.

## Row pinning

Expand All @@ -108,12 +108,12 @@ Check out more details in the [Row pinning documentation](/x/react-data-grid/row

## Share your feedback 🗣

**And if youre feeling generous, were recruiting users to interview!**
**And if you're feeling generous, we're recruiting users to interview!**

We hope youre excited about the new features as we are!
We hope you're excited about the new features as we are!

As always, were happy to hear from you.
As always, we're happy to hear from you.
Please feel free to open new issues to report bugs or suggest improvements.

Moreover, were planning MUI X v6, and wed love to hear more about your pain points and use cases.
Moreover, we're planning MUI X v6, and we'd love to hear more about your pain points and use cases.
If you want to help steer the direction of our components, please consider [contacting us](https://forms.gle/vsBv6CLPz9h57xg8A) to schedule a 30-minute user interview session.
14 changes: 7 additions & 7 deletions docs/pages/blog/date-pickers-stable-v5.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ card: true
---

About four months ago, we moved the date and time pickers from `@mui/lab` and released the first alpha version of the date pickers package.
We have focused on improving stability and developer experience since then, and now, were happy to announce the first official `@mui/x-date-pickers` [v5 release](https://github.com/mui/mui-x/releases/tag/v5.17.0).
We have focused on improving stability and developer experience since then, and now, we're happy to announce the first official `@mui/x-date-pickers` [v5 release](https://github.com/mui/mui-x/releases/tag/v5.17.0).

## TL;DR

Expand Down Expand Up @@ -36,7 +36,7 @@ A big thanks to all the contributors who took the time to clarify the edge cases

The property names and customization strategies were standardized to flatten the learning curve.

For example, the `MonthPicker`s prop `onMonthChange` and the `YearPicker`s prop `onYearChange` have both been renamed to `onChange`.
For example, the `MonthPicker`'s prop `onMonthChange` and the `YearPicker`'s prop `onYearChange` have both been renamed to `onChange`.

We also added new customizable slots:

Expand All @@ -46,7 +46,7 @@ We also added new customizable slots:

### Integrated localization

Its not obvious at first glance, but the pickers do contain some textual information, including action buttons as well as aria-labels for accessibility support.
It's not obvious at first glance, but the pickers do contain some textual information, including action buttons as well as aria-labels for accessibility support.

We integrated a [new localization](https://mui.com/x/react-date-pickers/localization/#translation-keys) pipeline similar to the one used by the Data Grid.
It lets you import translations directly into the main theme in a few lines.
Expand Down Expand Up @@ -88,14 +88,14 @@ Over 40% of users are already using the beta versions.
## Installation and migration from `@mui/lab`

You can find the installation instructions in our [getting started](https://mui.com/x/react-date-pickers/getting-started/) page.
If you are migrating from the `@mui/lab` package, weve prepared a [migration guide](https://mui.com/x/react-date-pickers/migration-lab/) to support you, including a codemod to replace the date pickers declarations.
If you are migrating from the `@mui/lab` package, we've prepared a [migration guide](https://mui.com/x/react-date-pickers/migration-lab/) to support you, including a codemod to replace the date pickers declarations.

## What to expect next?

After working on stability and developer experience, were now pushing to improve the usability of the components.
After working on stability and developer experience, we're now pushing to improve the usability of the components.

Weve been exploring different approaches and implementations for the date fields, and well soon release a v6 alpha version to start iterating on the new and improved components.
We've been exploring different approaches and implementations for the date fields, and we'll soon release a v6 alpha version to start iterating on the new and improved components.

You can expect support for v5 stable release with patches for critical bugs, but we encourage the community to help us build the next generation of date pickers and migrate whenever possible to the v6 pre-releases.

If you want to help steer the direction of the new components, please consider [contacting us](https://forms.gle/vsBv6CLPz9h57xg8A) to schedule a 30-minute user interview session. Were working on MUI X v6, and wed love to hear more about your pain points and use cases.
If you want to help steer the direction of the new components, please consider [contacting us](https://forms.gle/vsBv6CLPz9h57xg8A) to schedule a 30-minute user interview session. We're working on MUI X v6, and we'd love to hear more about your pain points and use cases.
Loading

0 comments on commit c3d58bb

Please sign in to comment.