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

[Mobile] - Remove old Layout Picker #27640

Merged
merged 9 commits into from
Jan 8, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ const stretchStyle = {
flex: 1,
};

const {
isFullWidth,
isWideWidth,
isWider,
isContainerRelated,
} = alignmentHelpers;

export class BlockListItem extends Component {
constructor() {
super( ...arguments );
Expand Down Expand Up @@ -60,6 +53,12 @@ export class BlockListItem extends Component {
parentWidth,
} = this.props;
const { blockWidth } = this.state;
const {
isFullWidth,
isWideWidth,
isWider,
isContainerRelated,
} = alignmentHelpers;

if ( isFullWidth( blockAlignment ) ) {
if ( ! hasParents ) {
Expand Down Expand Up @@ -106,6 +105,7 @@ export class BlockListItem extends Component {
hasParents,
parentBlockName,
} = this.props;
const { isFullWidth, isContainerRelated } = alignmentHelpers;

return [
readableContentViewStyle,
Expand Down Expand Up @@ -138,6 +138,8 @@ export class BlockListItem extends Component {
} = this.props;
const readableContentViewStyle =
contentResizeMode === 'stretch' && stretchStyle;
const { isContainerRelated } = alignmentHelpers;

return (
<ReadableContentView
align={ blockAlignment }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ import BlockEdit from '../block-edit';
import BlockInvalidWarning from './block-invalid-warning';
import BlockMobileToolbar from '../block-mobile-toolbar';

const { isFullWidth, isWider, isContainerRelated } = alignmentHelpers;

function BlockForType( {
attributes,
clientId,
Expand Down Expand Up @@ -182,7 +180,7 @@ class BlockListBlock extends Component {
attributes,
order + 1
);

const { isFullWidth, isWider, isContainerRelated } = alignmentHelpers;
const accessible = ! ( isSelected || isInnerBlockSelected );
const screenWidth = Math.floor( Dimensions.get( 'window' ).width );
const isScreenWidthEqual = blockWidth === screenWidth;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ const getStyles = (
stylesMemo[ styleName ] = computedStyles;
return computedStyles;
};
const { isWider } = alignmentHelpers;

export class BlockList extends Component {
constructor() {
Expand Down Expand Up @@ -192,6 +191,7 @@ export class BlockList extends Component {

const isContentStretch = contentResizeMode === 'stretch';
const isMultiBlocks = blockClientIds.length > 1;
const { isWider } = alignmentHelpers;

return (
<View
Expand Down
5 changes: 0 additions & 5 deletions packages/block-editor/src/components/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ export {
export { default as VideoPlayer, VIDEO_ASPECT_RATIO } from './video-player';

// Content Related Components
export {
__experimentalPageTemplatePicker,
__experimentalWithPageTemplatePicker,
Preview,
} from './page-template-picker';
export { default as BlockList } from './block-list';
export { default as BlockMover } from './block-mover';
export { default as BlockToolbar } from './block-toolbar';
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading