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

Add missing styleWrapper style builder information in container/Grid #6527

Merged
Merged
Show file tree
Hide file tree
Changes from 3 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
1 change: 1 addition & 0 deletions packages/volto/news/6527.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add missing styleWrapper style builder information in container/Grid. @sneridagh
1 change: 1 addition & 0 deletions packages/volto/news/6527.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add disable Teaser block Align handlers for teasers inside containers. @sneridagh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { defineMessages, useIntl } from 'react-intl';
import NewBlockAddButton from './NewBlockAddButton';
import cx from 'classnames';
import { isInteractiveElement } from '@plone/volto/helpers/Utils/Utils';

import { buildStyleObjectFromData } from '@plone/volto/helpers/Blocks/Blocks';
import clearSVG from '@plone/volto/icons/clear.svg';

const messages = defineMessages({
Expand Down Expand Up @@ -38,12 +38,15 @@ const EditBlockWrapper = (props) => {
onChangeBlock(block, { '@type': 'empty' });
}

const style = buildStyleObjectFromData(data);

return (
<div
ref={draginfo.innerRef}
{...draginfo.draggableProps}
{...draginfo.dragHandleProps}
className={cx(`block-editor-${data['@type']} contained`, { selected })}
style={style}
>
<div
role="presentation"
Expand Down
12 changes: 12 additions & 0 deletions packages/volto/src/components/manage/Blocks/Teaser/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,15 @@ export const gridTeaserDisableStylingSchema = ({ schema, formData, intl }) => {
schema.fieldsets = schema.fieldsets.filter((item) => item.id !== 'styling');
return schema;
};

export const gridTeaserDisableAlignHandlersSchema = ({
schema,
formData,
intl,
}) => {
schema.properties.styles.schema.fieldsets[0].fields =
schema.properties.styles.schema.fieldsets[0].fields.filter(
(item) => !['align'].includes(item),
);
return schema;
};
davisagli marked this conversation as resolved.
Show resolved Hide resolved
Loading