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] Replace use of e.g. with for example #15572

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oliviertassinari
Copy link
Member

Allow to smoothly upgrade docs-infra for when mui/material-ui#44513 lands.

@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation label Nov 23, 2024
@oliviertassinari oliviertassinari added the bug 🐛 Something doesn't work label Nov 23, 2024
@samuelsycamore
Copy link
Contributor

I think in all cases here it'd be preferable to replace the colon with a comma.

- for example:
+ for example,

Copy link
Member

@flaviendelangle flaviendelangle left a comment

Choose a reason for hiding this comment

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

A lot of : seemed weird to me

EDIT: I didn't see @samuelsycamore comment sorry.
I'm fine with always adding for example,

@@ -158,7 +158,7 @@ If you are using TypeScript, please make sure to add the [theme augmentation](/x

The picker components no longer have a keyboard view to render the input inside the modal on mobile.

- If your date is easier to edit with the keyboard (e.g: a birthdate), you can directly use the new field components:
- If your date is easier to edit with the keyboard (for example: a birthdate), you can directly use the new field components:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- If your date is easier to edit with the keyboard (for example: a birthdate), you can directly use the new field components:
- If your date is easier to edit with the keyboard (for example a birthdate), you can directly use the new field components:

@@ -83,7 +83,7 @@ Starting with version `v8.x`, all the field and picker components come with a ne
### Migrate `slotProps.field`

When using `slotProps.field` to pass props to your field component,
the field consumes some props (e.g: `shouldRespectLeadingZeros`) and forwards the rest to the `TextField`.
the field consumes some props (for example: `shouldRespectLeadingZeros`) and forwards the rest to the `TextField`.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
the field consumes some props (for example: `shouldRespectLeadingZeros`) and forwards the rest to the `TextField`.
the field consumes some props (for example `shouldRespectLeadingZeros`) and forwards the rest to the `TextField`.

@@ -407,7 +407,7 @@ If you are using a multi input range field hook, the same applies to the ref in

The `useClearableField` hook API has been simplified to now take a `props` parameter instead of a `fieldProps`, `InputProps`, `clearable`, `onClear`, `slots` and `slotProps` parameters.

You should now be able to directly pass the returned value from your field hook (e.g: `useDateField`) to `useClearableField`
You should now be able to directly pass the returned value from your field hook (for example: `useDateField`) to `useClearableField`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
You should now be able to directly pass the returned value from your field hook (for example: `useDateField`) to `useClearableField`
You should now be able to directly pass the returned value from your field hook (for example `useDateField`) to `useClearableField`

All the props used to pass props to parts of the UI (e.g: pass a prop to the input) have been replaced by component slot props.
All the props used to override parts of the UI (e.g: pass a custom day renderer) have been replaced by component slots.
All the props used to pass props to parts of the UI (for example: pass a prop to the input) have been replaced by component slot props.
All the props used to override parts of the UI (for example: pass a custom day renderer) have been replaced by component slots.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
All the props used to override parts of the UI (for example: pass a custom day renderer) have been replaced by component slots.
All the props used to override parts of the UI (for example to pass a custom day renderer) have been replaced by component slots.

@@ -444,8 +444,8 @@ The `locale` prop of the `LocalizationProvider` component have been renamed `ada

## Component slots / component slot props

All the props used to pass props to parts of the UI (e.g: pass a prop to the input) have been replaced by component slot props.
All the props used to override parts of the UI (e.g: pass a custom day renderer) have been replaced by component slots.
All the props used to pass props to parts of the UI (for example: pass a prop to the input) have been replaced by component slot props.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
All the props used to pass props to parts of the UI (for example: pass a prop to the input) have been replaced by component slot props.
All the props used to pass props to parts of the UI (for example to pass a prop to the input) have been replaced by component slot props.

@@ -132,12 +132,12 @@ export interface UsePickerValueState<TValue> {
*/
draft: TValue;
/**
* Last value published (e.g: the last value for which `shouldPublishValue` returned `true`).
* Last value published (for example: the last value for which `shouldPublishValue` returned `true`).
Copy link
Member

Choose a reason for hiding this comment

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

The one was using "e.g" instead of "i.e"

Suggested change
* Last value published (for example: the last value for which `shouldPublishValue` returned `true`).
* Last value published (the last value for which `shouldPublishValue` returned `true`).

* If `onChange` is defined, it's the value that was passed on the last call to this callback.
*/
lastPublishedValue: TValue;
/**
* Last value committed (e.g: the last value for which `shouldCommitValue` returned `true`).
* Last value committed (for example: the last value for which `shouldCommitValue` returned `true`).
Copy link
Member

Choose a reason for hiding this comment

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

Same

Suggested change
* Last value committed (for example: the last value for which `shouldCommitValue` returned `true`).
* Last value committed (the last value for which `shouldCommitValue` returned `true`).

@@ -266,7 +266,7 @@ export interface MuiPickersAdapter<TLocale = any> {
*/
formatNumber(numberToFormat: string): string;
/**
* Check if the two dates are equal (e.g: they represent the same timestamp).
* Check if the two dates are equal (for example: they represent the same timestamp).
Copy link
Member

Choose a reason for hiding this comment

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

Same

Suggested change
* Check if the two dates are equal (for example: they represent the same timestamp).
* Check if the two dates are equal (which means they represent the same timestamp).

@@ -464,7 +464,7 @@ export interface MuiPickersAdapter<TLocale = any> {
*/
getMonth(value: PickerValidDate): number;
/**
* Get the date (e.g: the day in the month) of the given date.
* Get the date (for example: the day in the month) of the given date.
Copy link
Member

Choose a reason for hiding this comment

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

Same

Suggested change
* Get the date (for example: the day in the month) of the given date.
* Get the date (day in the month) of the given date.

@@ -508,7 +508,7 @@ export interface MuiPickersAdapter<TLocale = any> {
*/
setMonth(value: PickerValidDate, month: number): PickerValidDate;
/**
* Set the date (e.g: the day in the month) to the given date.
* Set the date (for example: the day in the month) to the given date.
Copy link
Member

Choose a reason for hiding this comment

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

Same

Suggested change
* Set the date (for example: the day in the month) to the given date.
* Set the date (day in the month) to the given date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants