From 0c734e1867b50a9ee1eb19a08d6b740d66c5f2ad Mon Sep 17 00:00:00 2001 From: Darren Ethier Date: Mon, 12 Nov 2018 09:44:35 -0500 Subject: [PATCH] Remove obsolete props being passed through to DatePicker component (#11649) * remove unnecessary locale and is12Hour passthru props to DatePicker component * add changelog entries --- packages/components/CHANGELOG.md | 4 ++++ packages/components/src/date-time/README.md | 8 -------- packages/components/src/date-time/index.js | 4 +--- packages/editor/CHANGELOG.md | 4 ++++ packages/editor/src/components/post-schedule/index.js | 1 - 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index b947202a49f0f..24c04a2313f25 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -14,6 +14,10 @@ ## 5.1.0 (2018-11-09) +### Polish + +- Remove `` obsolete `locale` prop (and pass-through to child components) and obsolete `is12Hour` prop pass through to `` [#11649](https://github.com/WordPress/gutenberg/pull/11649) + ### New Feature - Adjust a11y roles for MenuItem component, so that aria-checked is used properly, related change in Editor/Components/BlockNavigationList ([#11431](https://github.com/WordPress/gutenberg/issues/11431)). diff --git a/packages/components/src/date-time/README.md b/packages/components/src/date-time/README.md index dc23cc9cd097f..c70c8199952b3 100644 --- a/packages/components/src/date-time/README.md +++ b/packages/components/src/date-time/README.md @@ -29,7 +29,6 @@ const MyDateTimePicker = withState( { setState( { date } ) } - locale={ settings.l10n.locale } is12Hour={ is12HourTime } /> ); @@ -55,13 +54,6 @@ The function called when a new date or time has been selected. It is passed the - Required: No - Default: `noop` -### locale - -The localization for the display of the date and time. - -- Type: `string` -- Required: No - ### is12Hour Whether we use a 12-hour clock. With a 12-hour clock, an AM/PM widget is displayed and the time format is assumed to be MM-DD-YYYY. diff --git a/packages/components/src/date-time/index.js b/packages/components/src/date-time/index.js index 72268765dd405..e3782393fe2e8 100644 --- a/packages/components/src/date-time/index.js +++ b/packages/components/src/date-time/index.js @@ -34,7 +34,7 @@ export class DateTimePicker extends Component { } render() { - const { currentDate, is12Hour, locale, onChange } = this.props; + const { currentDate, is12Hour, onChange } = this.props; return (
@@ -48,8 +48,6 @@ export class DateTimePicker extends Component { ) } diff --git a/packages/editor/CHANGELOG.md b/packages/editor/CHANGELOG.md index f192a1fbcb14a..9e27d05050b4c 100644 --- a/packages/editor/CHANGELOG.md +++ b/packages/editor/CHANGELOG.md @@ -34,6 +34,10 @@ ## 6.2.0 (2018-11-09) +### Polish + +- Remove unnecessary `locale` prop usage [#11649](https://github.com/WordPress/gutenberg/pull/11649) + ### New Features - Adjust a11y roles for menu items, and make sure screen readers can properly use BlockNavigationList ([#11431](https://github.com/WordPress/gutenberg/issues/11431)). diff --git a/packages/editor/src/components/post-schedule/index.js b/packages/editor/src/components/post-schedule/index.js index daf37674780ab..78a8a60c583b2 100644 --- a/packages/editor/src/components/post-schedule/index.js +++ b/packages/editor/src/components/post-schedule/index.js @@ -22,7 +22,6 @@ export function PostSchedule( { date, onUpdateDate } ) { key="date-time-picker" currentDate={ date } onChange={ onUpdateDate } - locale={ settings.l10n.locale } is12Hour={ is12HourTime } /> );