Skip to content

Commit

Permalink
fix short line width & update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
danalvrz committed Oct 23, 2024
1 parent 7b9fb80 commit 4135c8e
Show file tree
Hide file tree
Showing 16 changed files with 2,728 additions and 1,584 deletions.
2 changes: 1 addition & 1 deletion mrs.developer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"package": "@plone/volto",
"url": "[email protected]:plone/volto.git",
"https": "https://github.com/plone/volto.git",
"tag": "18.0.0-alpha.32"
"tag": "18.0.0-alpha.46"
}
}
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
],
"scripts": {
"preinstall": "npx only-allow pnpm",
"start": "pnpm build:deps && VOLTOCONFIG=$(pwd)/volto.config.js pnpm --filter @plone/volto start",
"start": "VOLTOCONFIG=$(pwd)/volto.config.js pnpm --filter @plone/volto start",
"start:prod": "pnpm --filter @plone/volto start:prod",
"build": "pnpm build:deps && VOLTOCONFIG=$(pwd)/volto.config.js pnpm --filter @plone/volto build",
"build": "VOLTOCONFIG=$(pwd)/volto.config.js pnpm --filter @plone/volto build",
"build:deps": "pnpm --filter @plone/registry --filter @plone/components build",
"i18n": "pnpm --filter @kitconcept/volto-separator-block i18n",
"i18n": "pnpm --filter addons i18n",
"test": "RAZZLE_JEST_CONFIG=$(pwd)/jest-addon.config.js pnpm --filter @plone/volto test -- --passWithNoTests",
"lint": "eslint --max-warnings=0 'packages/**/src/**/*.{js,jsx,ts,tsx}'",
"lint:fix": "eslint --fix 'packages/**/src/**/*.{js,jsx,ts,tsx}'",
"prettier": "prettier --check 'packages/**/src/**/*.{js,jsx,ts,tsx}'",
"prettier:fix": "prettier --write 'packages/**/src/**/*.{js,jsx,ts,tsx}' ",
"stylelint": "stylelint 'packages/**/src/**/*.{css,scss,less}' --allow-empty-input",
"stylelint:fix": "stylelint 'packages/**/src/**/*.{css,scss,less}' --fix --allow-empty-input",
"dry-release": "pnpm --filter @kitconcept/volto-separator-block dry-release",
"release": "pnpm --filter @kitconcept/volto-separator-block release",
"release-major-alpha": "pnpm --filter @kitconcept/volto-separator-block release-major-alpha",
"release-alpha": "pnpm --filter @kitconcept/volto-separator-block release-alpha",
"dry-release": "release-it --dry-run",
"release": "pnpm --filter @kitconcept/volto-button-block release",
"release-major-alpha": "pnpm --filter @kitconcept/volto-button-block release-major-alpha",
"release-alpha": "pnpm --filter @kitconcept/volto-button-block release-alpha",
"storybook": "pnpm build:deps && VOLTOCONFIG=$(pwd)/volto.config.js pnpm --filter @plone/volto storybook dev -p 6006 -c $(pwd)/.storybook",
"build-storybook": "pnpm build:deps && VOLTOCONFIG=$(pwd)/volto.config.js pnpm --filter @plone/volto build-storybook -c $(pwd)/.storybook"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/volto-separator-block/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
"peerDependencies": {
"react": "18.2.0",
"react-dom": "18.2.0",
"react-intl": "3.8.0"
"react-intl": "^3.12.1"
},
"devDependencies": {
"@plone/scripts": "^3.6.1",
"release-it": "^17.1.1"
"@plone/scripts": "^3.6.2",
"release-it": "^17.7.1"
}
}
13 changes: 6 additions & 7 deletions packages/volto-separator-block/src/components/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,18 @@ import cx from 'classnames';
import { MaybeWrap } from '@plone/volto/components';

const LegacyWrapper = (props) => (
<div className={cx('block separator', props.className)} style={props.style}>{children}</div>
<div className={cx('block separator', props.className)} style={props.style}>
{props.children}
</div>
);

const SeparatorView = (props) => {
const { blocksConfig } = props;
const isBlockModelv3 = blocksConfig?.separator?.blockModel === 3;

return (
<MaybeWrap
condition={!isBlockModelv3}
as={LegacyWrapper}
{...props}
>
<div className="line testclass" />
<MaybeWrap condition={!isBlockModelv3} as={LegacyWrapper} {...props}>
<div className="line" />
</MaybeWrap>
);
};
Expand Down
11 changes: 11 additions & 0 deletions packages/volto-separator-block/src/theme/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
}
}

&.has--shortLine--true {
width: var(--short-line-width, 25%);
}

&.has--align--left {
.line {
margin-left: 0;
Expand All @@ -36,6 +40,13 @@
.block-editor-separator {
clear: both;

&.has--shortLine--true .block.separator {
.line {
width: var(--short-line-width, 25%);

}
}

&.has--align--left .block.separator {
.line {
margin-left: 0;
Expand Down
Loading

0 comments on commit 4135c8e

Please sign in to comment.