Skip to content

Commit

Permalink
Improve focal point settings filename clarity (#29910)
Browse files Browse the repository at this point in the history
Rename two identical filenames to improve clarity about their intent.
  • Loading branch information
dcalhoun authored Mar 17, 2021
1 parent 4e9aa5d commit 2f1b4dc
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { InspectorControls } from '@wordpress/block-editor';
import {
BottomSheet,
ColorSettings,
FocalPointSettings,
FocalPointSettingsPanel,
LinkPickerScreen,
} from '@wordpress/components';
import { compose } from '@wordpress/compose';
Expand Down Expand Up @@ -59,7 +59,7 @@ function BottomSheetSettings( {
name={ blockSettingsScreens.focalPoint }
fullScreen
>
<FocalPointSettings />
<FocalPointSettingsPanel />
</BottomSheet.NavigationScreen>
<BottomSheet.NavigationScreen
name={ blockSettingsScreens.linkPicker }
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/cover/controls.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { __ } from '@wordpress/i18n';
*/
import styles from './style.scss';
import OverlayColorSettings from './overlay-color-settings';
import FocalPointSettings from './focal-point-settings';
import FocalPointSettingsButton from './focal-point-settings-button';
import {
ALLOWED_MEDIA_TYPES,
COVER_MIN_HEIGHT,
Expand Down Expand Up @@ -218,7 +218,7 @@ function Controls( {
{ displayPlaceholder ? null : focalPointHint }
</View>
</BottomSheet.Cell>
<FocalPointSettings
<FocalPointSettingsButton
disabled={ hasParallax }
focalPoint={ focalPoint || IMAGE_DEFAULT_FOCAL_POINT }
onFocalPointChange={ setFocalPoint }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { chevronRight } from '@wordpress/icons';
*/
import styles from './style.scss';

function FocalPointSettings( {
function FocalPointSettingsButton( {
disabled,
focalPoint,
onFocalPointChange,
Expand Down Expand Up @@ -50,4 +50,4 @@ function FocalPointSettings( {
);
}

export default FocalPointSettings;
export default FocalPointSettingsButton;
2 changes: 1 addition & 1 deletion packages/components/src/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export { default as ReadableContentView } from './mobile/readable-content-view';
export { default as CycleSelectControl } from './mobile/cycle-select-control';
export { default as Gradient } from './mobile/gradient';
export { default as ColorSettings } from './mobile/color-settings';
export { default as FocalPointSettings } from './mobile/focal-point-settings';
export { default as FocalPointSettingsPanel } from './mobile/focal-point-settings-panel';
export { LinkPicker } from './mobile/link-picker';
export { default as LinkPickerScreen } from './mobile/link-picker/link-picker-screen';
export { default as LinkSettings } from './mobile/link-settings';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { BottomSheetContext, FocalPointPicker } from '@wordpress/components';
import NavigationHeader from '../bottom-sheet/navigation-header';
import styles from './styles.scss';

const FocalPointSettingsMemo = memo(
const FocalPointSettingsPanelMemo = memo(
( {
focalPoint,
onFocalPointChange,
Expand Down Expand Up @@ -62,17 +62,17 @@ const FocalPointSettingsMemo = memo(
}
);

function FocalPointSettings( props ) {
function FocalPointSettingsPanel( props ) {
const route = useRoute();
const { shouldEnableBottomSheetScroll } = useContext( BottomSheetContext );

return (
<FocalPointSettingsMemo
<FocalPointSettingsPanelMemo
shouldEnableBottomSheetScroll={ shouldEnableBottomSheetScroll }
{ ...props }
{ ...route.params }
/>
);
}

export default FocalPointSettings;
export default FocalPointSettingsPanel;

0 comments on commit 2f1b4dc

Please sign in to comment.