Skip to content

Commit

Permalink
prepare build 1/9
Browse files Browse the repository at this point in the history
  • Loading branch information
bph committed Jan 9, 2021
2 parents 2951743 + a7fb6bb commit 2b390b3
Show file tree
Hide file tree
Showing 96 changed files with 531 additions and 2,185 deletions.
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 Expand Up @@ -313,6 +313,7 @@ export class BlockList extends Component {
<>
<TouchableWithoutFeedback
accessibilityLabel={ __( 'Add paragraph block' ) }
testID={ __( 'Add paragraph block' ) }
onPress={ () => {
this.addBlockToEndOfPost( paragraphBlock );
} }
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.

Loading

0 comments on commit 2b390b3

Please sign in to comment.