Skip to content

Commit

Permalink
change(cards): Remove block style wrapper temporarily and unused styling
Browse files Browse the repository at this point in the history
  • Loading branch information
kreafox committed Nov 18, 2022
1 parent f7a7a58 commit 5d39f05
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 48 deletions.
16 changes: 8 additions & 8 deletions src/blocks/Listing/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { addStyling } from '@plone/volto/helpers';
// import { addStyling } from '@plone/volto/helpers';
import UniversalCard from '@eeacms/volto-listing-block/components/UniversalCard/UniversalCard';
import { composeSchema } from '@eeacms/volto-listing-block/schema-utils';

import Carousel from './layout-templates/Carousel';
import Gallery from './layout-templates/Gallery';
import Listing from './layout-templates/Listing';
import {
setBasicStylingSchema,
// setBasicStylingSchema,
setCardStylingSchema,
setCardModelSchema,
setItemModelSchema,
Expand Down Expand Up @@ -52,8 +52,8 @@ const applyConfig = (config) => {
title: 'Listing',
template: Listing,
schemaEnhancer: composeSchema(
addStyling,
setBasicStylingSchema,
// addStyling,
// setBasicStylingSchema,
UniversalCard.schemaEnhancer,
),
},
Expand All @@ -63,8 +63,8 @@ const applyConfig = (config) => {
title: 'Carousel',
template: Carousel,
schemaEnhancer: composeSchema(
addStyling,
setBasicStylingSchema,
// addStyling,
// setBasicStylingSchema,
UniversalCard.schemaEnhancer,
Carousel.schemaEnhancer,
),
Expand All @@ -75,8 +75,8 @@ const applyConfig = (config) => {
title: 'Gallery',
template: Gallery,
schemaEnhancer: composeSchema(
addStyling,
setBasicStylingSchema,
// addStyling,
// setBasicStylingSchema,
UniversalCard.schemaEnhancer,
Gallery.schemaEnhancer,
),
Expand Down
72 changes: 36 additions & 36 deletions src/blocks/Listing/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,43 @@ const ALIGN_INFO_MAP = {
align_center: [alignCenterSVG, 'Center'],
};

export const setBasicStylingSchema = (args) => {
const { schema, intl } = args;
schema.properties.styles.schema = {
fieldsets: [
{
id: 'styling',
title: 'Styling',
fields: ['theme', 'inverted', 'rounded'],
},
],
properties: {
theme: {
title: intl.formatMessage(messages.Theme),
description: intl.formatMessage(messages.ThemeHelp),
choices: [
['', intl.formatMessage(messages.ThemeDefault)],
['primary', intl.formatMessage(messages.ThemePrimary)],
['secondary', intl.formatMessage(messages.ThemeSecondary)],
['tertiary', intl.formatMessage(messages.ThemeTertiary)],
],
},
inverted: {
title: intl.formatMessage(messages.Inverted),
description: intl.formatMessage(messages.InvertedHelp),
type: 'boolean',
},
rounded: {
title: intl.formatMessage(messages.Rounded),
description: intl.formatMessage(messages.RoundedHelp),
type: 'boolean',
},
},
required: [],
};
// export const setBasicStylingSchema = (args) => {
// const { schema, intl } = args;
// schema.properties.styles.schema = {
// fieldsets: [
// {
// id: 'styling',
// title: 'Styling',
// fields: ['theme', 'inverted', 'rounded'],
// },
// ],
// properties: {
// theme: {
// title: intl.formatMessage(messages.Theme),
// description: intl.formatMessage(messages.ThemeHelp),
// choices: [
// ['', intl.formatMessage(messages.ThemeDefault)],
// ['primary', intl.formatMessage(messages.ThemePrimary)],
// ['secondary', intl.formatMessage(messages.ThemeSecondary)],
// ['tertiary', intl.formatMessage(messages.ThemeTertiary)],
// ],
// },
// inverted: {
// title: intl.formatMessage(messages.Inverted),
// description: intl.formatMessage(messages.InvertedHelp),
// type: 'boolean',
// },
// rounded: {
// title: intl.formatMessage(messages.Rounded),
// description: intl.formatMessage(messages.RoundedHelp),
// type: 'boolean',
// },
// },
// required: [],
// };

return schema;
};
// return schema;
// };

const CallToActionSchema = ({ formData }) => {
return {
Expand Down
8 changes: 4 additions & 4 deletions src/blocks/Teaser/index.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { composeSchema } from '@eeacms/volto-listing-block/schema-utils';
import { addStyling } from '@plone/volto/helpers';
// import { addStyling } from '@plone/volto/helpers';

import TeaserCardTemplate from './Card';
import { adjustTeaserSchema } from './schema';
import UniversalCard from '@eeacms/volto-listing-block/components/UniversalCard/UniversalCard';
import { setBasicStylingSchema } from '../Listing/schema';
// import { setBasicStylingSchema } from '../Listing/schema';

export default (config) => {
if (config.blocks.blocksConfig.teaser) {
config.blocks.blocksConfig.teaser.schemaEnhancer = composeSchema(
config.blocks.blocksConfig.teaser.schemaEnhancer,
addStyling,
setBasicStylingSchema,
// addStyling,
// setBasicStylingSchema,
);

config.blocks.blocksConfig.teaser.variations = [
Expand Down

0 comments on commit 5d39f05

Please sign in to comment.