From f8562ec964269690b6037e2c39aa731219b4019f Mon Sep 17 00:00:00 2001 From: Fellan-91 Date: Fri, 22 Nov 2024 11:53:13 +0300 Subject: [PATCH 01/19] fixed function _load_textdomain_just_in_time called incorrectly (#325) --- lazy-blocks.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lazy-blocks.php b/lazy-blocks.php index b266bc96..a9abbcfe 100644 --- a/lazy-blocks.php +++ b/lazy-blocks.php @@ -134,7 +134,6 @@ public function init() { $this->plugin_url = plugin_dir_url( __FILE__ ); $this->plugin_basename = plugin_basename( __FILE__ ); - $this->load_text_domain(); $this->include_dependencies(); $this->icons = new LazyBlocks_Icons(); @@ -145,6 +144,8 @@ public function init() { $this->tools = new LazyBlocks_Tools(); add_action( 'init', array( $this, 'init_hook' ), 5 ); + + add_action( 'plugins_loaded', array( $this, 'load_text_domain' ) ); } /** From 52c9482f204aebd512dd54283f6a0227b5f5d7c0 Mon Sep 17 00:00:00 2001 From: Fellan-91 Date: Fri, 22 Nov 2024 16:36:19 +0300 Subject: [PATCH 02/19] moved all files connections to the init hook --- lazy-blocks.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lazy-blocks.php b/lazy-blocks.php index a9abbcfe..b27195ce 100644 --- a/lazy-blocks.php +++ b/lazy-blocks.php @@ -130,10 +130,19 @@ public function deactivation_hook() {} * Init. */ public function init() { + add_action( 'init', array( $this, 'init_hook' ), 5 ); + } + + /** + * Init hook should be used to register user blocks and add customizations. + */ + public function init_hook() { $this->plugin_path = plugin_dir_path( __FILE__ ); $this->plugin_url = plugin_dir_url( __FILE__ ); $this->plugin_basename = plugin_basename( __FILE__ ); + $this->load_text_domain(); + $this->include_dependencies(); $this->icons = new LazyBlocks_Icons(); @@ -143,15 +152,6 @@ public function init() { $this->templates = new LazyBlocks_Templates(); $this->tools = new LazyBlocks_Tools(); - add_action( 'init', array( $this, 'init_hook' ), 5 ); - - add_action( 'plugins_loaded', array( $this, 'load_text_domain' ) ); - } - - /** - * Init hook should be used to register user blocks and add customizations. - */ - public function init_hook() { do_action( 'lzb/init' ); } From 9f8d62ccdf0d3d8254a9c629e1a17fd8d2f85d9f Mon Sep 17 00:00:00 2001 From: Fellan-91 Date: Tue, 26 Nov 2024 15:31:50 +0300 Subject: [PATCH 03/19] Improved the text domain connection --- classes/class-controls.php | 4 ++-- lazy-blocks.php | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/classes/class-controls.php b/classes/class-controls.php index 4d732062..133b675b 100644 --- a/classes/class-controls.php +++ b/classes/class-controls.php @@ -17,7 +17,7 @@ class LazyBlocks_Controls { * LazyBlocks_Controls constructor. */ public function __construct() { - $this->include_controls(); + add_action( 'init', array( $this, 'include_controls' ) ); } /** @@ -74,7 +74,7 @@ public function filter_control_value( $value, $control_data, $block_data, $conte /** * Include controls. */ - private function include_controls() { + public function include_controls() { // Sort. $sort = array( '_base', diff --git a/lazy-blocks.php b/lazy-blocks.php index b27195ce..a65714c3 100644 --- a/lazy-blocks.php +++ b/lazy-blocks.php @@ -130,19 +130,10 @@ public function deactivation_hook() {} * Init. */ public function init() { - add_action( 'init', array( $this, 'init_hook' ), 5 ); - } - - /** - * Init hook should be used to register user blocks and add customizations. - */ - public function init_hook() { $this->plugin_path = plugin_dir_path( __FILE__ ); $this->plugin_url = plugin_dir_url( __FILE__ ); $this->plugin_basename = plugin_basename( __FILE__ ); - $this->load_text_domain(); - $this->include_dependencies(); $this->icons = new LazyBlocks_Icons(); @@ -152,6 +143,15 @@ public function init_hook() { $this->templates = new LazyBlocks_Templates(); $this->tools = new LazyBlocks_Tools(); + add_action( 'init', array( $this, 'load_text_domain' ), 5 ); + + add_action( 'init', array( $this, 'init_hook' ), 6 ); + } + + /** + * Init hook should be used to register user blocks and add customizations. + */ + public function init_hook() { do_action( 'lzb/init' ); } From 972bfb6c04c1e4fef2e7609528e90f5a3ad78eaf Mon Sep 17 00:00:00 2001 From: Nikita Date: Wed, 27 Nov 2024 13:58:52 +0300 Subject: [PATCH 04/19] remove matrix from e2e since there is no much tests available yet --- .github/workflows/tests-e2e.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests-e2e.yml b/.github/workflows/tests-e2e.yml index 402b3c3c..ca4c796a 100644 --- a/.github/workflows/tests-e2e.yml +++ b/.github/workflows/tests-e2e.yml @@ -17,14 +17,9 @@ concurrency: jobs: playwright: - name: Playwright - ${{ matrix.part }} + name: Playwright runs-on: ubuntu-latest if: ${{ github.repository == 'nk-crew/lazy-blocks' || github.event_name == 'pull_request' }} - strategy: - fail-fast: false - matrix: - part: [1, 2, 3, 4] - totalParts: [4] steps: - uses: actions/checkout@v4 @@ -45,4 +40,4 @@ jobs: - name: Run the tests run: | - xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test:e2e -- --shard=${{ matrix.part }}/${{ matrix.totalParts }} + xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test:e2e From 816b9bb0b9d05380cfe099fe2e43c524e765460c Mon Sep 17 00:00:00 2001 From: Nikita Date: Thu, 28 Nov 2024 21:02:19 +0300 Subject: [PATCH 05/19] fix some components deprecated notices --- assets/admin/templates/index.js | 6 +++++- assets/admin/tools/tools.js | 6 +++++- assets/components/block-slug/editor.scss | 6 ++++-- assets/components/block-slug/index.js | 8 +++++++- assets/components/icon-picker/index.js | 9 ++++++++- assets/components/pro-notice/index.js | 6 +++++- assets/components/tabs/index.js | 2 +- assets/editor-constructor/boxes/code/index.js | 12 +++++++++--- assets/editor-constructor/boxes/condition/index.js | 1 + assets/editor-constructor/boxes/general/index.js | 3 +++ .../settings-rows/default.js | 2 ++ .../selected-control-settings/settings-rows/group.js | 3 +++ .../selected-control-settings/settings-rows/help.js | 1 + .../settings-rows/hide-if-not-selected.js | 2 ++ .../selected-control-settings/settings-rows/label.js | 2 ++ .../selected-control-settings/settings-rows/name.js | 2 ++ .../settings-rows/placement.js | 1 + .../settings-rows/required.js | 2 ++ .../settings-rows/save-in-meta.js | 4 ++++ .../settings-rows/translate.js | 2 ++ .../selected-control-settings/settings-rows/type.js | 3 +++ .../selected-control-settings/settings-rows/width.js | 1 + .../boxes/supports-ghost-kit/index.js | 12 ++++++++++-- assets/editor-constructor/boxes/supports/index.js | 7 +++++++ controls/checkbox/script.js | 7 +++++++ controls/color/script.js | 5 +++++ controls/email/script.js | 6 ++++++ controls/gallery/script.js | 2 ++ controls/image/image-control.js | 7 ++++++- controls/image/script.js | 3 +++ controls/number/script.js | 10 ++++++++++ controls/password/script.js | 6 ++++++ controls/radio/script.js | 3 +++ controls/range/script.js | 8 ++++++++ controls/repeater/script.js | 10 ++++++++++ controls/select/component-choices.js | 4 +++- controls/select/script.js | 5 +++++ controls/text/script.js | 6 ++++++ controls/textarea/script.js | 5 +++++ controls/toggle/script.js | 4 ++++ package-lock.json | 8 ++++---- package.json | 2 +- 42 files changed, 184 insertions(+), 20 deletions(-) diff --git a/assets/admin/templates/index.js b/assets/admin/templates/index.js index 8d2f084b..b08b15d1 100644 --- a/assets/admin/templates/index.js +++ b/assets/admin/templates/index.js @@ -14,7 +14,7 @@ import { useSelect } from '@wordpress/data'; import { useEntityProp } from '@wordpress/core-data'; import { PanelRow, SelectControl } from '@wordpress/components'; import { useDebounce } from '@wordpress/compose'; -import { PluginDocumentSettingPanel } from '@wordpress/edit-post'; +import { PluginDocumentSettingPanel } from '@wordpress/editor'; /** * Internal dependencies @@ -182,6 +182,8 @@ function UpdateEditor() { onChange={(value) => { updateMeta('_lzb_template_post_types', value); }} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -194,6 +196,8 @@ function UpdateEditor() { onChange={(value) => { updateMeta('_lzb_template_lock', value); }} + __next40pxDefaultSize + __nextHasNoMarginBottom /> diff --git a/assets/admin/tools/tools.js b/assets/admin/tools/tools.js index 374d2bc0..e11c518d 100644 --- a/assets/admin/tools/tools.js +++ b/assets/admin/tools/tools.js @@ -112,7 +112,7 @@ export default function Templates() { return ( <>
- + {data[type].map((item) => { const isSelected = @@ -215,6 +216,7 @@ export default function Templates() { setDisabledTemplates(newDisabled); } }} + __nextHasNoMarginBottom /> ); })} @@ -228,6 +230,8 @@ export default function Templates() { className="lzb-export-code" readOnly value={getPHPStringCode(type)} + __next40pxDefaultSize + __nextHasNoMarginBottom />
diff --git a/assets/components/block-slug/editor.scss b/assets/components/block-slug/editor.scss index 275f10b7..8b74d0de 100644 --- a/assets/components/block-slug/editor.scss +++ b/assets/components/block-slug/editor.scss @@ -13,7 +13,7 @@ white-space: nowrap; padding: 6px 8px; padding-right: 10px; - height: 32px; + height: 40px; border: 1px solid #949494; line-height: normal; color: $gray-800; @@ -39,7 +39,9 @@ flex: 1; margin-bottom: 0 !important; - input { + input.components-text-control__input { + padding-left: 5px; + padding-right: 5px; margin-left: 0; border-left: none; border-top-left-radius: 0; diff --git a/assets/components/block-slug/index.js b/assets/components/block-slug/index.js index 38baec65..0dc58f09 100644 --- a/assets/components/block-slug/index.js +++ b/assets/components/block-slug/index.js @@ -17,7 +17,11 @@ import { __ } from '@wordpress/i18n'; export default function BlockSlug(props) { return ( - +
diff --git a/assets/components/icon-picker/index.js b/assets/components/icon-picker/index.js index 2f9b2533..f5e84fa3 100644 --- a/assets/components/icon-picker/index.js +++ b/assets/components/icon-picker/index.js @@ -88,6 +88,8 @@ function IconPickerDropdown(props) { onChange={(searchVal) => setSearch(searchVal)} placeholder={__('Type to Search…', 'lazy-blocks')} autoComplete="off" + __next40pxDefaultSize + __nextHasNoMarginBottom /> ), @@ -297,7 +299,12 @@ function IconPickerDropdown(props) { ); return label ? ( - + {dropdown} ) : ( diff --git a/assets/components/pro-notice/index.js b/assets/components/pro-notice/index.js index 5ac98d3b..00de7473 100644 --- a/assets/components/pro-notice/index.js +++ b/assets/components/pro-notice/index.js @@ -22,6 +22,7 @@ export default function ProNotice() { id="lazyblocks-pro-notice" label={__('Lazy Blocks Pro', 'lazy-blocks')} className="lazyblocks-component-pro-notice" + __nextHasNoMarginBottom >
  • - {__('Custom Slugs and Collections', 'lazy-blocks')} + {__( + 'Custom block collections and slug namespaces', + 'lazy-blocks' + )}
  • {__('Controls Conditional Logic', 'lazy-blocks')} diff --git a/assets/components/tabs/index.js b/assets/components/tabs/index.js index 8854d70b..c406154a 100644 --- a/assets/components/tabs/index.js +++ b/assets/components/tabs/index.js @@ -10,7 +10,7 @@ import { BaseControl, TabPanel } from '@wordpress/components'; export default function Tabs({ tabs, children }) { return ( - + {children} diff --git a/assets/editor-constructor/boxes/code/index.js b/assets/editor-constructor/boxes/code/index.js index bafb0acb..352480ce 100644 --- a/assets/editor-constructor/boxes/code/index.js +++ b/assets/editor-constructor/boxes/code/index.js @@ -101,6 +101,8 @@ export default function CustomCodeSettings(props) { value={data.code_output_method || 'html'} onChange={(value) => updateData({ code_output_method: value })} isAdaptiveWidth + __next40pxDefaultSize + __nextHasNoMarginBottom > - + {tabs.length > 1 ? ( - + {!showInfo ? (
@@ -158,6 +162,7 @@ addFilter( checked: value ? 'true' : 'false', }) } + __nextHasNoMarginBottom />
@@ -181,6 +186,7 @@ addFilter( multiple: value ? 'true' : 'false', }) } + __nextHasNoMarginBottom /> @@ -223,6 +229,7 @@ addFilter( onChange={(value) => updateData({ output_format: value }) } + __nextHasNoMarginBottom /> diff --git a/controls/color/script.js b/controls/color/script.js index be125635..a2db443a 100644 --- a/controls/color/script.js +++ b/controls/color/script.js @@ -75,6 +75,8 @@ addFilter( onChange={(value) => updateData({ alongside_text: value }) } + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -93,6 +95,7 @@ addFilter( onChange={(value) => updateData({ alpha: value ? 'true' : 'false' }) } + __nextHasNoMarginBottom /> @@ -142,6 +146,7 @@ addFilter( onChange={(value) => updateData({ output_format: value }) } + __nextHasNoMarginBottom /> diff --git a/controls/email/script.js b/controls/email/script.js index 5b131c1e..a7301613 100644 --- a/controls/email/script.js +++ b/controls/email/script.js @@ -28,6 +28,8 @@ addFilter('lzb.editor.control.email.render', 'lzb.editor', (render, props) => { placeholder={props.data.placeholder} value={props.getValue()} onChange={props.onChange} + __next40pxDefaultSize + __nextHasNoMarginBottom /> ); @@ -73,6 +75,8 @@ addFilter( label={__('Placeholder', 'lazy-blocks')} value={data.placeholder} onChange={(value) => updateData({ placeholder: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -93,6 +97,8 @@ addFilter( onChange={(value) => updateData({ characters_limit: `${value}` }) } + __next40pxDefaultSize + __nextHasNoMarginBottom /> diff --git a/controls/gallery/script.js b/controls/gallery/script.js index a390c290..b8d405ba 100644 --- a/controls/gallery/script.js +++ b/controls/gallery/script.js @@ -127,6 +127,8 @@ function AdditionalAttributes(props) { })} value={data.preview_size || 'medium'} onChange={(value) => updateData({ preview_size: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> ); diff --git a/controls/image/image-control.js b/controls/image/image-control.js index 31708cf0..04e7e8c4 100644 --- a/controls/image/image-control.js +++ b/controls/image/image-control.js @@ -71,7 +71,12 @@ function ImageControl(props) { } return ( - +
{!value || !Object.keys(value).length ? ( @@ -151,6 +152,8 @@ function AdditionalAttributes(props) { })} value={data.preview_size || 'medium'} onChange={(value) => updateData({ preview_size: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> diff --git a/controls/number/script.js b/controls/number/script.js index a69acba5..bf4b49da 100644 --- a/controls/number/script.js +++ b/controls/number/script.js @@ -33,6 +33,8 @@ addFilter('lzb.editor.control.number.render', 'lzb.editor', (render, props) => { onChange={(val) => { props.onChange(parseFloat(val)); }} + __next40pxDefaultSize + __nextHasNoMarginBottom /> ); @@ -95,6 +97,8 @@ addFilter( step={data.step} value={data.min} onChange={(value) => updateData({ min: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -104,6 +108,8 @@ addFilter( step={data.step} value={data.max} onChange={(value) => updateData({ max: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -112,6 +118,8 @@ addFilter( type="number" value={data.step} onChange={(value) => updateData({ step: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -119,6 +127,8 @@ addFilter( label={__('Placeholder', 'lazy-blocks')} value={data.placeholder} onChange={(value) => updateData({ placeholder: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> diff --git a/controls/password/script.js b/controls/password/script.js index 7a4966e4..9b607024 100644 --- a/controls/password/script.js +++ b/controls/password/script.js @@ -31,6 +31,8 @@ addFilter( placeholder={props.data.placeholder} value={props.getValue()} onChange={props.onChange} + __next40pxDefaultSize + __nextHasNoMarginBottom /> ); @@ -53,6 +55,8 @@ addFilter( label={__('Placeholder', 'lazy-blocks')} value={data.placeholder} onChange={(value) => updateData({ placeholder: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -73,6 +77,8 @@ addFilter( onChange={(value) => updateData({ characters_limit: `${value}` }) } + __next40pxDefaultSize + __nextHasNoMarginBottom /> diff --git a/controls/radio/script.js b/controls/radio/script.js index 477425c8..7caa08e5 100644 --- a/controls/radio/script.js +++ b/controls/radio/script.js @@ -23,6 +23,7 @@ addFilter('lzb.editor.control.radio.render', 'lzb.editor', (render, props) => ( selected={props.getValue()} options={props.data.choices} onChange={props.onChange} + __nextHasNoMarginBottom /> )); @@ -88,6 +89,7 @@ addFilter( allow_null: value ? 'true' : 'false', }) } + __nextHasNoMarginBottom /> @@ -119,6 +121,7 @@ addFilter( onChange={(value) => updateData({ output_format: value }) } + __nextHasNoMarginBottom /> diff --git a/controls/range/script.js b/controls/range/script.js index fe2ce839..5986393a 100644 --- a/controls/range/script.js +++ b/controls/range/script.js @@ -25,6 +25,8 @@ addFilter('lzb.editor.control.range.render', 'lzb.editor', (render, props) => ( onChange={(val) => { props.onChange(parseFloat(val)); }} + __next40pxDefaultSize + __nextHasNoMarginBottom /> )); @@ -47,6 +49,8 @@ addFilter( step={data.step} value={data.min} onChange={(value) => updateData({ min: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -56,6 +60,8 @@ addFilter( step={data.step} value={data.max} onChange={(value) => updateData({ max: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -64,6 +70,8 @@ addFilter( type="number" value={data.step} onChange={(value) => updateData({ step: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> diff --git a/controls/repeater/script.js b/controls/repeater/script.js index 106abcdc..cb9b1987 100644 --- a/controls/repeater/script.js +++ b/controls/repeater/script.js @@ -281,6 +281,8 @@ addFilter( )} value={data.rows_label} onChange={(value) => updateData({ rows_label: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -291,6 +293,8 @@ addFilter( onChange={(value) => updateData({ rows_add_button_label: value }) } + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -301,6 +305,8 @@ addFilter( min={0} value={data.rows_min} onChange={(value) => updateData({ rows_min: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -311,6 +317,8 @@ addFilter( min={0} value={data.rows_max} onChange={(value) => updateData({ rows_max: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -327,6 +335,7 @@ addFilter( rows_collapsible: value ? 'true' : 'false', }) } + __nextHasNoMarginBottom /> {data.rows_collapsible === 'true' ? ( ) : ( '' diff --git a/controls/select/component-choices.js b/controls/select/component-choices.js index 7516099c..5519edb2 100644 --- a/controls/select/component-choices.js +++ b/controls/select/component-choices.js @@ -70,6 +70,8 @@ const SortableItem = function (props) { } // eslint-disable-next-line jsx-a11y/no-autofocus autoFocus={focusInput && i === 0} + __next40pxDefaultSize + __nextHasNoMarginBottom /> ); })} @@ -236,7 +238,7 @@ export default function ComponentChoices(props) { } return ( - +
{items.length ? (
diff --git a/controls/select/script.js b/controls/select/script.js index 82915787..8e65e640 100644 --- a/controls/select/script.js +++ b/controls/select/script.js @@ -46,6 +46,8 @@ addFilter('lzb.editor.control.select.render', 'lzb.editor', (render, props) => { onChange={(val) => { props.onChange(val); }} + __next40pxDefaultSize + __nextHasNoMarginBottom /> ); @@ -112,6 +114,7 @@ addFilter( allow_null: value ? 'true' : 'false', }) } + __nextHasNoMarginBottom /> @@ -133,6 +136,7 @@ addFilter( multiple: value ? 'true' : 'false', }) } + __nextHasNoMarginBottom /> @@ -164,6 +168,7 @@ addFilter( onChange={(value) => updateData({ output_format: value }) } + __nextHasNoMarginBottom /> diff --git a/controls/text/script.js b/controls/text/script.js index fdc5e44c..7f0ff635 100644 --- a/controls/text/script.js +++ b/controls/text/script.js @@ -27,6 +27,8 @@ addFilter('lzb.editor.control.text.render', 'lzb.editor', (render, props) => { placeholder={props.data.placeholder} value={props.getValue()} onChange={props.onChange} + __next40pxDefaultSize + __nextHasNoMarginBottom /> ); @@ -78,6 +80,8 @@ addFilter( label={__('Placeholder', 'lazy-blocks')} value={data.placeholder} onChange={(value) => updateData({ placeholder: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -98,6 +102,8 @@ addFilter( onChange={(value) => updateData({ characters_limit: `${value}` }) } + __next40pxDefaultSize + __nextHasNoMarginBottom /> diff --git a/controls/textarea/script.js b/controls/textarea/script.js index 9ca393a5..8af46fd3 100644 --- a/controls/textarea/script.js +++ b/controls/textarea/script.js @@ -30,6 +30,7 @@ addFilter( value={props.getValue()} placeholder={props.data.placeholder} onChange={props.onChange} + __nextHasNoMarginBottom /> ); @@ -52,6 +53,8 @@ addFilter( label={__('Placeholder', 'lazy-blocks')} value={data.placeholder} onChange={(value) => updateData({ placeholder: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -72,6 +75,8 @@ addFilter( onChange={(value) => updateData({ characters_limit: `${value}` }) } + __next40pxDefaultSize + __nextHasNoMarginBottom /> diff --git a/controls/toggle/script.js b/controls/toggle/script.js index 9696c60b..440326cd 100644 --- a/controls/toggle/script.js +++ b/controls/toggle/script.js @@ -20,6 +20,7 @@ addFilter('lzb.editor.control.toggle.render', 'lzb.editor', (render, props) => ( label={props.data.alongside_text} checked={!!props.getValue()} onChange={props.onChange} + __nextHasNoMarginBottom /> )); @@ -46,6 +47,8 @@ addFilter( onChange={(value) => updateData({ alongside_text: value }) } + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -62,6 +65,7 @@ addFilter( checked: value ? 'true' : 'false', }) } + __nextHasNoMarginBottom /> diff --git a/package-lock.json b/package-lock.json index fb4b81d7..b95ecba2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "ace-builds": "^1.22.0", "array-move": "^4.0.0", "classnames": "^2.3.2", - "gutenberg-react-select-styles": "0.0.2", + "gutenberg-react-select-styles": "^0.0.3", "html-react-parser": "^4.0.0", "json5": "^2.2.3", "react-ace": "^10.1.0", @@ -13480,9 +13480,9 @@ } }, "node_modules/gutenberg-react-select-styles": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/gutenberg-react-select-styles/-/gutenberg-react-select-styles-0.0.2.tgz", - "integrity": "sha512-Mu5APgD1WYZXx9IWrFUAkIqqPqRXYN0FarWUrAMDK8cMVZHzYFz0VMOxgE2sYleGEDmGcEIyYgDV9ZrISDeQ2w==" + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/gutenberg-react-select-styles/-/gutenberg-react-select-styles-0.0.3.tgz", + "integrity": "sha512-0RJNq9UWmLI76s0Jk3/ye2wbxBmedx2K8dXMyYEuvXzMK2UxZhy30ce4gw12zTHnFWnJ/7uXfHE8zX9ejLmGgA==" }, "node_modules/gzip-size": { "version": "6.0.0", diff --git a/package.json b/package.json index 60ee93c6..f846197a 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "ace-builds": "^1.22.0", "array-move": "^4.0.0", "classnames": "^2.3.2", - "gutenberg-react-select-styles": "0.0.2", + "gutenberg-react-select-styles": "^0.0.3", "html-react-parser": "^4.0.0", "json5": "^2.2.3", "react-ace": "^10.1.0", From 8f05ba78d8775e385d3e4dd35705b0d89c6e9404 Mon Sep 17 00:00:00 2001 From: Nikita Date: Thu, 28 Nov 2024 21:19:17 +0300 Subject: [PATCH 06/19] improve export page checkbox styles --- assets/admin/tools/index.scss | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/assets/admin/tools/index.scss b/assets/admin/tools/index.scss index 83cd0021..12cbb0f6 100644 --- a/assets/admin/tools/index.scss +++ b/assets/admin/tools/index.scss @@ -19,6 +19,19 @@ background-color: #f1f1f1; border: 1px solid #ccd0d4; border-radius: 4px; + + .components-toggle-control__label { + padding-top: 3px; + margin-left: 0 !important; + + > span { + margin-top: -3px; + } + } + + .components-toggle-control > .components-base-control__field > .components-flex { + align-items: start; + } } .lzb-export-textarea { From 220775d054af58d2d4a7a86d4a14656408788ad3 Mon Sep 17 00:00:00 2001 From: Nikita Date: Thu, 28 Nov 2024 21:52:55 +0300 Subject: [PATCH 07/19] style fixes and improvements for constructor ui --- assets/components/document-tabs/editor.scss | 2 ++ .../boxes/selected-control-settings/editor.scss | 11 ++++------- .../settings-rows/placement.js | 6 ++---- assets/editor-constructor/index.scss | 10 ++++++++++ 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/assets/components/document-tabs/editor.scss b/assets/components/document-tabs/editor.scss index ad88d97a..6752778d 100644 --- a/assets/components/document-tabs/editor.scss +++ b/assets/components/document-tabs/editor.scss @@ -10,6 +10,7 @@ display: flex; margin-bottom: -1px; background-color: #fff; + padding: 0; z-index: 2; > ul { @@ -21,6 +22,7 @@ button { position: relative; + padding: 12px 16px; height: 48px; font-weight: 500; outline: none; diff --git a/assets/editor-constructor/boxes/selected-control-settings/editor.scss b/assets/editor-constructor/boxes/selected-control-settings/editor.scss index d5072bd1..aeb48b8f 100644 --- a/assets/editor-constructor/boxes/selected-control-settings/editor.scss +++ b/assets/editor-constructor/boxes/selected-control-settings/editor.scss @@ -42,10 +42,11 @@ align-items: center; width: 100%; padding: 3px 5px; + min-height: 40px; cursor: pointer; background-color: #fff; border: 1px solid $color_dark_lighten_2; - border-radius: 3px; + border-radius: 2px; transition: 0.15s border-color ease-in-out; &:hover { @@ -56,18 +57,14 @@ span svg { display: block; margin-right: 5px; - opacity: 0.7; } // arrow > svg { margin-left: auto; - opacity: 0.2; transition: 0.15s opacity ease-in-out; - } - - &:hover > svg { - opacity: 0.4; + width: 14px; + height: 14px; } } diff --git a/assets/editor-constructor/boxes/selected-control-settings/settings-rows/placement.js b/assets/editor-constructor/boxes/selected-control-settings/settings-rows/placement.js index 3e652a7b..e14f95ff 100644 --- a/assets/editor-constructor/boxes/selected-control-settings/settings-rows/placement.js +++ b/assets/editor-constructor/boxes/selected-control-settings/settings-rows/placement.js @@ -49,13 +49,12 @@ export default function PlacementRow(props) {