From a28367083dcf92201b131da5d699f5eec6bce1d1 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 30 Sep 2024 11:24:30 +0900 Subject: [PATCH 01/83] Add timer setting --- src/blocks/_pro/fixed-display/block.json | 8 +++++ src/blocks/_pro/fixed-display/edit.js | 23 ++++++++++++++- src/blocks/_pro/fixed-display/save.js | 14 +++++++-- src/blocks/_pro/fixed-display/style.scss | 37 ++++++++++++++++-------- src/blocks/_pro/fixed-display/view.js | 29 +++++++++++++++++-- 5 files changed, 94 insertions(+), 17 deletions(-) diff --git a/src/blocks/_pro/fixed-display/block.json b/src/blocks/_pro/fixed-display/block.json index 20a48608a..baf3fc1ec 100644 --- a/src/blocks/_pro/fixed-display/block.json +++ b/src/blocks/_pro/fixed-display/block.json @@ -39,6 +39,14 @@ "type": "string", "default": "svh" }, + "displayAfterSeconds": { + "type": "number", + "default": 0 + }, + "hideAfterSeconds": { + "type": "number", + "default": 0 + }, "clientId": { "type": "string" }, diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index 15975fe79..b2948e0fd 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -11,6 +11,7 @@ import { ToggleControl, PanelRow, RadioControl, + TextControl, } from '@wordpress/components'; import { useEffect } from '@wordpress/element'; import { isParentReusableBlock } from '@vkblocks/utils/is-parent-reusable-block'; @@ -36,6 +37,8 @@ export default function FixedDisplayEdit(props) { fixedPositionType = 'top', fixedPositionValue = 50, fixedPositionUnit = 'svh', + displayAfterSeconds, + hideAfterSeconds, } = attributes; useEffect(() => { @@ -63,7 +66,7 @@ export default function FixedDisplayEdit(props) { ? `${fixedPositionValue}${fixedPositionUnit}` : undefined, }, - }); + }); return ( <> @@ -201,6 +204,24 @@ export default function FixedDisplayEdit(props) { )} + + setAttributes({ displayAfterSeconds: parseFloat(value) || 0 })} + type="number" + min="0" + step="0.1" + /> + setAttributes({ hideAfterSeconds: parseFloat(value) || 0 })} + type="number" + min="0" + step="0.1" + /> +
0 ? 'is-timed-display' : '' + } ${hideAfterSeconds > 0 ? 'is-timed-hide' : ''}`, style: { [fixedPositionType]: ['right', 'left'].includes(position) ? `${fixedPositionValue}${fixedPositionUnit}` @@ -25,7 +29,13 @@ export default function save({ attributes }) { 'data-scroll-timing-unit': scrollTimingUnit, 'data-persist-visible': scrollPersistVisible ? 'true' : 'false', }), - }); + ...(displayAfterSeconds > 0 && { + 'data-display-after-seconds': displayAfterSeconds.toString(), + }), + ...(hideAfterSeconds > 0 && { + 'data-hide-after-seconds': hideAfterSeconds.toString(), + }), + }); return (
diff --git a/src/blocks/_pro/fixed-display/style.scss b/src/blocks/_pro/fixed-display/style.scss index af564dc53..ca4e4a941 100644 --- a/src/blocks/_pro/fixed-display/style.scss +++ b/src/blocks/_pro/fixed-display/style.scss @@ -9,6 +9,24 @@ position: fixed; margin-block-start: 0; z-index: 99999; + + /* タイマー機能用クラス */ + &.is-timed-display { + opacity: 0; + transition: opacity 0.3s ease; + + &.is-visible { + opacity: 1; + } + } + + &.is-timed-hide { + + &:not(.is-visible) { + opacity: 0; + transition: opacity 0.3s ease; + } + } } .vk_fixed-display-mode { @@ -24,7 +42,6 @@ opacity: 1; } } - } .vk_fixed-display-position { @@ -110,6 +127,13 @@ } } } + + &-from-top { + top: unset !important; + } + &-from-bottom { + bottom: unset !important; + } } } @@ -130,14 +154,3 @@ } } } - -.block-editor-block-list__layout { - .vk_fixed-display-position { - &-from-top { - top: unset !important; - } - &-from-bottom { - bottom: unset !important; - } - } -} diff --git a/src/blocks/_pro/fixed-display/view.js b/src/blocks/_pro/fixed-display/view.js index abeddd80e..99dee3892 100644 --- a/src/blocks/_pro/fixed-display/view.js +++ b/src/blocks/_pro/fixed-display/view.js @@ -1,6 +1,6 @@ /* eslint-env browser */ -// スクロールイベントリスナーを追加 +// スクロールタイミング設定 window.addEventListener('scroll', function () { const items = document.querySelectorAll( '.vk_fixed-display-mode-show-on-scroll' @@ -25,6 +25,31 @@ window.addEventListener('scroll', function () { }); }); +// 表示・非表示タイマー設定 +window.addEventListener('DOMContentLoaded', function () { + const items = document.querySelectorAll('.vk_fixed-display'); + + items.forEach((item) => { + const displayAfterSeconds = parseInt(item.getAttribute('data-display-after-seconds'), 10); + const hideAfterSeconds = parseInt(item.getAttribute('data-hide-after-seconds'), 10); + + if (displayAfterSeconds > 0) { + setTimeout(() => { + item.classList.add('is-visible'); + }, displayAfterSeconds * 1000); + } else { + item.classList.add('is-visible'); + } + + // X秒後に非表示 + if (hideAfterSeconds > 0) { + setTimeout(() => { + item.classList.remove('is-visible'); + }, hideAfterSeconds * 1000); + } + }); +}); + // 単位をピクセル値に変換する関数 function convertUnitToPixels(value, unit) { switch (unit) { @@ -47,6 +72,6 @@ function convertUnitToPixels(value, unit) { case 'svh': return (value * window.innerHeight) / 100; default: - return value; // 単位が不明な場合はピクセル値として扱う + return value; } } From 1f9eff0191c3e1152f2b2ae02af0be962a8dcfff Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 30 Sep 2024 11:24:54 +0900 Subject: [PATCH 02/83] Fix: build --- src/blocks/_pro/fixed-display/edit.js | 49 +++++++++++++++++---------- src/blocks/_pro/fixed-display/save.js | 6 ++-- src/blocks/_pro/fixed-display/view.js | 10 ++++-- 3 files changed, 42 insertions(+), 23 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index b2948e0fd..9e95bde7c 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -66,7 +66,7 @@ export default function FixedDisplayEdit(props) { ? `${fixedPositionValue}${fixedPositionUnit}` : undefined, }, - }); + }); return ( <> @@ -204,23 +204,36 @@ export default function FixedDisplayEdit(props) { )} - - setAttributes({ displayAfterSeconds: parseFloat(value) || 0 })} - type="number" - min="0" - step="0.1" - /> - setAttributes({ hideAfterSeconds: parseFloat(value) || 0 })} - type="number" - min="0" - step="0.1" - /> + + + setAttributes({ + displayAfterSeconds: parseFloat(value) || 0, + }) + } + type="number" + min="0" + step="0.1" + /> + + setAttributes({ + hideAfterSeconds: parseFloat(value) || 0, + }) + } + type="number" + min="0" + step="0.1" + />
diff --git a/src/blocks/_pro/fixed-display/save.js b/src/blocks/_pro/fixed-display/save.js index db807a94b..776e16ce2 100644 --- a/src/blocks/_pro/fixed-display/save.js +++ b/src/blocks/_pro/fixed-display/save.js @@ -11,8 +11,8 @@ export default function save({ attributes }) { fixedPositionType, fixedPositionValue, fixedPositionUnit, - displayAfterSeconds, - hideAfterSeconds, + displayAfterSeconds, + hideAfterSeconds, } = attributes; const blockProps = useBlockProps.save({ @@ -35,7 +35,7 @@ export default function save({ attributes }) { ...(hideAfterSeconds > 0 && { 'data-hide-after-seconds': hideAfterSeconds.toString(), }), - }); + }); return (
diff --git a/src/blocks/_pro/fixed-display/view.js b/src/blocks/_pro/fixed-display/view.js index 99dee3892..add46e931 100644 --- a/src/blocks/_pro/fixed-display/view.js +++ b/src/blocks/_pro/fixed-display/view.js @@ -30,8 +30,14 @@ window.addEventListener('DOMContentLoaded', function () { const items = document.querySelectorAll('.vk_fixed-display'); items.forEach((item) => { - const displayAfterSeconds = parseInt(item.getAttribute('data-display-after-seconds'), 10); - const hideAfterSeconds = parseInt(item.getAttribute('data-hide-after-seconds'), 10); + const displayAfterSeconds = parseInt( + item.getAttribute('data-display-after-seconds'), + 10 + ); + const hideAfterSeconds = parseInt( + item.getAttribute('data-hide-after-seconds'), + 10 + ); if (displayAfterSeconds > 0) { setTimeout(() => { From 851070d3b4e15ebe5ac5af129316ee8afee081e1 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 30 Sep 2024 11:30:58 +0900 Subject: [PATCH 03/83] Add ver.1.85.1 file --- .../fixed-display/deprecated/1.85.1/save.js | 35 +++++++++++++++++++ .../_pro/fixed-display/deprecated/index.js | 17 +++++++++ 2 files changed, 52 insertions(+) create mode 100644 src/blocks/_pro/fixed-display/deprecated/1.85.1/save.js diff --git a/src/blocks/_pro/fixed-display/deprecated/1.85.1/save.js b/src/blocks/_pro/fixed-display/deprecated/1.85.1/save.js new file mode 100644 index 000000000..e711662e2 --- /dev/null +++ b/src/blocks/_pro/fixed-display/deprecated/1.85.1/save.js @@ -0,0 +1,35 @@ +import { InnerBlocks, useBlockProps } from '@wordpress/block-editor'; + +export default function save({ attributes }) { + const { + mode, + position, + scrollTiming, + scrollTimingUnit, + blockId, + scrollPersistVisible, + fixedPositionType, + fixedPositionValue, + fixedPositionUnit, + } = attributes; + + const blockProps = useBlockProps.save({ + className: `vk_fixed-display vk_fixed-display-mode-${mode} vk_fixed-display-position-${position} vk_fixed-display-position-from-${fixedPositionType} vk_fixed-display-${blockId}`, + style: { + [fixedPositionType]: ['right', 'left'].includes(position) + ? `${fixedPositionValue}${fixedPositionUnit}` + : undefined, + }, + ...(mode === 'show-on-scroll' && { + 'data-scroll-timing': scrollTiming.toString(), + 'data-scroll-timing-unit': scrollTimingUnit, + 'data-persist-visible': scrollPersistVisible ? 'true' : 'false', + }), + }); + + return ( +
+ +
+ ); +} diff --git a/src/blocks/_pro/fixed-display/deprecated/index.js b/src/blocks/_pro/fixed-display/deprecated/index.js index 4094da18d..656d1da63 100644 --- a/src/blocks/_pro/fixed-display/deprecated/index.js +++ b/src/blocks/_pro/fixed-display/deprecated/index.js @@ -1,5 +1,6 @@ import save1_75_0 from './1.75.0/save'; import save1_81_1 from './1.81.1/save'; +import save1_85_1 from './1.85.1./save'; const blockAttributes = { mode: { @@ -54,7 +55,23 @@ const blockAttributes2 = { }, }; +const blockAttributes3 = { + ...blockAttributes2, + displayAfterSeconds: { + type: 'number', + default: 0 + }, + "hideAfterSeconds": { + type: 'number', + default: 0 + }, +}; + const deprecated = [ + { + attributes: blockAttributes3, + save: save1_85_1, + }, { attributes: blockAttributes2, save: save1_81_1, From 2fa34ac658a31766393b416e0cdc2c4b4c1f4e0b Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 30 Sep 2024 11:32:44 +0900 Subject: [PATCH 04/83] Add test file --- .../fixtures/blocks/vk-blocks__fixed-display__default.html | 6 +++--- .../blocks/vk-blocks__fixed-display__deprecated-1-81-1.html | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__deprecated-1-81-1.html diff --git a/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__default.html b/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__default.html index 020edbdd1..818ed04ae 100644 --- a/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__default.html +++ b/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__default.html @@ -1,5 +1,5 @@ - -
+ +

あああああああああ

- + \ No newline at end of file diff --git a/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__deprecated-1-81-1.html b/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__deprecated-1-81-1.html new file mode 100644 index 000000000..020edbdd1 --- /dev/null +++ b/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__deprecated-1-81-1.html @@ -0,0 +1,5 @@ + +
+

あああああああああ

+
+ From ca008cf774ecdf0c4ae7134b1e5296a85513f0c5 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 30 Sep 2024 11:38:51 +0900 Subject: [PATCH 05/83] Add changelog --- readme.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 25a1203ef..990ebb0eb 100644 --- a/readme.txt +++ b/readme.txt @@ -106,8 +106,9 @@ e.g. == Changelog == +[ Add function ][ Fixed Display ( Pro ) ] Added a time-based display and hide. [ Bug Fix ] Fixed an issue where disabling separated loading caused all block CSS to load. -[ Add function ] [ Fixed Display (Pro) ] Added an option for "Fixed display from the bottom." +[ Add function ][ Fixed Display (Pro) ] Added an option for "Fixed display from the bottom." = 1.85.1 = [ Bug fix ] Due to an issue where the hidden setting does not function properly when TreeShaking is enabled and CSS splitting is disabled, TreeShaking has been temporarily disabled as a workaround. From d9d40aa17ab331cb22c966f10d5880432b29fc51 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 30 Sep 2024 16:56:19 +0900 Subject: [PATCH 06/83] Fix :taipo --- src/blocks/_pro/fixed-display/deprecated/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blocks/_pro/fixed-display/deprecated/index.js b/src/blocks/_pro/fixed-display/deprecated/index.js index 656d1da63..d4bf8922c 100644 --- a/src/blocks/_pro/fixed-display/deprecated/index.js +++ b/src/blocks/_pro/fixed-display/deprecated/index.js @@ -1,6 +1,6 @@ import save1_75_0 from './1.75.0/save'; import save1_81_1 from './1.81.1/save'; -import save1_85_1 from './1.85.1./save'; +import save1_85_1 from './1.85.1/save'; const blockAttributes = { mode: { From 489e4c169d9e4517b96f40cf2c6373191eb6819c Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 2 Oct 2024 09:41:02 +0900 Subject: [PATCH 07/83] Add dontShowAgain --- src/blocks/_pro/fixed-display/block.json | 4 + src/blocks/_pro/fixed-display/edit.js | 98 ++++++++++-------- src/blocks/_pro/fixed-display/save.js | 37 +++++-- src/blocks/_pro/fixed-display/view.js | 121 +++++++++++++++++------ 4 files changed, 179 insertions(+), 81 deletions(-) diff --git a/src/blocks/_pro/fixed-display/block.json b/src/blocks/_pro/fixed-display/block.json index 540f0d21f..92e5b7f24 100644 --- a/src/blocks/_pro/fixed-display/block.json +++ b/src/blocks/_pro/fixed-display/block.json @@ -47,6 +47,10 @@ "type": "number", "default": 0 }, + "dontShowAgain": { + "type": "number", + "default": 0 + }, "clientId": { "type": "string" }, diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index 9e95bde7c..1771b1544 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -39,6 +39,7 @@ export default function FixedDisplayEdit(props) { fixedPositionUnit = 'svh', displayAfterSeconds, hideAfterSeconds, + dontShowAgain, } = attributes; useEffect(() => { @@ -71,11 +72,13 @@ export default function FixedDisplayEdit(props) { return ( <> - +

{__( - 'The fixed position of the fixed position block will not change on the edit screen. Please check on the front screen.', + 'The fixed position of the block will not change on the edit screen. Please check on the front screen.', 'vk-blocks-pro' )}

@@ -171,45 +174,48 @@ export default function FixedDisplayEdit(props) { /> )} - {mode === 'show-on-scroll' && ( - <> - { - const unit = - units.find((unit) => - nextValue.endsWith(unit.value) - ) || units[0]; - const value = parseFloat(nextValue) || 0; - setAttributes({ - scrollTiming: value, - scrollTimingUnit: unit.value, - }); - }} - units={units} - /> - + {mode === 'show-on-scroll' && ( + + { + const unit = + units.find((unit) => + nextValue.endsWith(unit.value) + ) || units[0]; + const value = parseFloat(nextValue) || 0; + setAttributes({ + scrollTiming: value, + scrollTimingUnit: unit.value, + }); + }} + units={units} + /> + + setAttributes({ scrollPersistVisible: value }) + } + /> + +

+ {__( + 'This block will appear when the user scrolls to a specific point on the page. You can also set the timing for how long after scrolling it appears and when it disappears.', 'vk-blocks-pro' )} - checked={scrollPersistVisible} - onChange={(value) => - setAttributes({ - scrollPersistVisible: value, - }) - } - /> - - )} - - +

+
+
+ )} + + + + setAttributes({ dontShowAgain: value }) + } + /> +
0 ? 'is-timed-display' : '' - } ${hideAfterSeconds > 0 ? 'is-timed-hide' : ''}`, - style: { - [fixedPositionType]: ['right', 'left'].includes(position) - ? `${fixedPositionValue}${fixedPositionUnit}` - : undefined, - }, + // データ属性を動的に構築 + const dataAttributes = { ...(mode === 'show-on-scroll' && { 'data-scroll-timing': scrollTiming.toString(), 'data-scroll-timing-unit': scrollTimingUnit, @@ -35,6 +29,29 @@ export default function save({ attributes }) { ...(hideAfterSeconds > 0 && { 'data-hide-after-seconds': hideAfterSeconds.toString(), }), + ...(dontShowAgain && { + 'data-dont-show-again': 'true', + }), + }; + + // スクロール表示が無効(常に表示)になった場合、スクロール関連のデータ属性を削除 + if (mode !== 'show-on-scroll') { + delete dataAttributes['data-scroll-timing']; + delete dataAttributes['data-scroll-timing-unit']; + delete dataAttributes['data-persist-visible']; + } + + // blockPropsにデータ属性を含めて保存 + const blockProps = useBlockProps.save({ + className: `vk_fixed-display vk_fixed-display-mode-${mode} vk_fixed-display-position-${position} vk_fixed-display-position-from-${fixedPositionType} vk_fixed-display-${blockId} ${ + displayAfterSeconds > 0 ? 'is-timed-display' : '' + } ${hideAfterSeconds > 0 ? 'is-timed-hide' : ''}`, + style: { + [fixedPositionType]: ['right', 'left'].includes(position) + ? `${fixedPositionValue}${fixedPositionUnit}` + : undefined, + }, + ...dataAttributes, // 動的に構築したデータ属性を追加 }); return ( diff --git a/src/blocks/_pro/fixed-display/view.js b/src/blocks/_pro/fixed-display/view.js index add46e931..0c5f632ee 100644 --- a/src/blocks/_pro/fixed-display/view.js +++ b/src/blocks/_pro/fixed-display/view.js @@ -1,57 +1,120 @@ /* eslint-env browser */ +// LocalStorage に表示済みフラグを保存する関数 +function saveDisplayedFlag(blockId) { + try { + localStorage.setItem(`displayed_${blockId}`, 'true'); + } catch (e) { + // エラーログの削除 + } +} + +// LocalStorage から表示済みフラグを取得する関数 +function hasDisplayedBefore(blockId) { + try { + return localStorage.getItem(`displayed_${blockId}`) !== null; + } catch (e) { + // エラーログの削除 + return false; + } +} + // スクロールタイミング設定 window.addEventListener('scroll', function () { - const items = document.querySelectorAll( - '.vk_fixed-display-mode-show-on-scroll' - ); + const items = document.querySelectorAll('.vk_fixed-display-mode-show-on-scroll'); items.forEach((item) => { + const blockId = item.getAttribute('data-block-id'); // ユニークなblockIdを取得 + const dontShowAgain = item.getAttribute('data-dont-show-again') === 'true'; // dontShowAgainの取得 + + // dontShowAgainが有効で、一度表示済みなら何もしない + if (dontShowAgain && hasDisplayedBefore(blockId)) { + return; + } + // data属性からスクロールタイミングと単位、及びscrollPersistVisibleを取得 const timing = parseInt(item.getAttribute('data-scroll-timing'), 10); const unit = item.getAttribute('data-scroll-timing-unit'); - const scrollPersistVisible = - item.getAttribute('data-persist-visible') === 'true'; + const scrollPersistVisible = item.getAttribute('data-persist-visible') === 'true'; // 単位に応じたピクセル値への変換 const timingInPixels = convertUnitToPixels(timing, unit); - // スクロール位置が指定したタイミングを超えた場合に.is-visibleクラスを付与 - if (window.scrollY > timingInPixels) { - item.classList.add('is-visible'); - } else if (!scrollPersistVisible) { - item.classList.remove('is-visible'); + // スクロール位置が指定したタイミングを超えた場合にタイマーを開始 + if (window.scrollY > timingInPixels && !item.classList.contains('is-scrolled-visible')) { + item.classList.add('is-scrolled-visible'); + + // タイマーで表示 + const displayAfterSeconds = parseFloat(item.getAttribute('data-display-after-seconds')) || 0; + const hideAfterSeconds = parseFloat(item.getAttribute('data-hide-after-seconds')) || 0; + + // X秒後に表示 (is-timed-visible) + if (displayAfterSeconds > 0) { + setTimeout(() => { + item.classList.add('is-timed-visible'); + // dontShowAgainが有効なら表示済みフラグを保存 + if (dontShowAgain) { + saveDisplayedFlag(blockId); + } + }, displayAfterSeconds * 1000); + } else { + item.classList.add('is-timed-visible'); + // dontShowAgainが有効なら表示済みフラグを保存 + if (dontShowAgain) { + saveDisplayedFlag(blockId); + } + } + + // X秒後に非表示 (is-timed-hide) + if (hideAfterSeconds > 0) { + setTimeout(() => { + item.classList.remove('is-timed-visible'); + }, (displayAfterSeconds + hideAfterSeconds) * 1000); + } + } else if (window.scrollY < timingInPixels && !scrollPersistVisible) { + item.classList.remove('is-scrolled-visible'); + item.classList.remove('is-timed-visible'); // 非表示に戻す } }); }); // 表示・非表示タイマー設定 window.addEventListener('DOMContentLoaded', function () { - const items = document.querySelectorAll('.vk_fixed-display'); + const items = document.querySelectorAll('.vk_fixed-display-mode-always-visible'); items.forEach((item) => { - const displayAfterSeconds = parseInt( - item.getAttribute('data-display-after-seconds'), - 10 - ); - const hideAfterSeconds = parseInt( - item.getAttribute('data-hide-after-seconds'), - 10 - ); + const displayAfterSeconds = parseFloat(item.getAttribute('data-display-after-seconds')) || 0; + const hideAfterSeconds = parseFloat(item.getAttribute('data-hide-after-seconds')) || 0; + const blockId = item.getAttribute('data-block-id'); // ユニークなblockIdを取得 + const dontShowAgain = item.getAttribute('data-dont-show-again') === 'true'; // dontShowAgainの取得 + + // dontShowAgainが有効で、一度表示済みなら何もしない + if (dontShowAgain && hasDisplayedBefore(blockId)) { + return; + } + // X秒後に表示 (is-timed-display) if (displayAfterSeconds > 0) { setTimeout(() => { - item.classList.add('is-visible'); + item.classList.add('is-timed-visible'); + // dontShowAgainが有効なら表示済みフラグを保存 + if (dontShowAgain) { + saveDisplayedFlag(blockId); + } }, displayAfterSeconds * 1000); } else { - item.classList.add('is-visible'); + item.classList.add('is-timed-visible'); + // dontShowAgainが有効なら表示済みフラグを保存 + if (dontShowAgain) { + saveDisplayedFlag(blockId); + } } - // X秒後に非表示 + // X秒後に非表示 (is-timed-hide) - 表示後のタイミング if (hideAfterSeconds > 0) { setTimeout(() => { - item.classList.remove('is-visible'); - }, hideAfterSeconds * 1000); + item.classList.remove('is-timed-visible'); + }, (displayAfterSeconds + hideAfterSeconds) * 1000); } }); }); @@ -62,15 +125,9 @@ function convertUnitToPixels(value, unit) { case 'px': return value; case 'em': - return ( - value * - parseFloat(getComputedStyle(document.documentElement).fontSize) - ); + return value * parseFloat(getComputedStyle(document.documentElement).fontSize); case 'rem': - return ( - value * - parseFloat(getComputedStyle(document.documentElement).fontSize) - ); + return value * parseFloat(getComputedStyle(document.documentElement).fontSize); case '%': return (value * window.innerHeight) / 100; case 'vh': From d5f8519a21ac71b9b8eeee074a2e2fecab6bb1b7 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 2 Oct 2024 09:41:38 +0900 Subject: [PATCH 08/83] Add timed setting --- src/blocks/_pro/fixed-display/style.scss | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/blocks/_pro/fixed-display/style.scss b/src/blocks/_pro/fixed-display/style.scss index ca4e4a941..e77c854f4 100644 --- a/src/blocks/_pro/fixed-display/style.scss +++ b/src/blocks/_pro/fixed-display/style.scss @@ -11,22 +11,24 @@ z-index: 99999; /* タイマー機能用クラス */ + &.is-timed-hide { + + &:not(.is-timed-visible) { + opacity: 0; + transition: opacity 0.3s ease; + pointer-events: none; + } + } + &.is-timed-display { opacity: 0; transition: opacity 0.3s ease; - &.is-visible { + &.is-timed-visible { opacity: 1; } } - &.is-timed-hide { - - &:not(.is-visible) { - opacity: 0; - transition: opacity 0.3s ease; - } - } } .vk_fixed-display-mode { @@ -38,7 +40,7 @@ opacity: 0; transition: opacity 0.3s ease; - &.is-visible { + &.is-scrolled-visible { opacity: 1; } } From ce9438547b77e12306c22c78ca2ca281fd8aa364 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 2 Oct 2024 10:20:02 +0900 Subject: [PATCH 09/83] Fix: taipo --- src/blocks/_pro/fixed-display/edit.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index 1771b1544..9898cbeb0 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -254,6 +254,14 @@ export default function FixedDisplayEdit(props) { setAttributes({ dontShowAgain: value }) } /> + +

+ {__( + 'In private browsing mode or environments where certain features are disabled, this block may appear again on future visits.', + 'vk-blocks-pro' + )} +

+
From 1e7470deb6cbd474ceb4123477ab6b4f80e02cfb Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 2 Oct 2024 10:27:29 +0900 Subject: [PATCH 10/83] Fix: sharing duplicated code --- src/blocks/_pro/fixed-display/view.js | 109 +++++++++----------------- 1 file changed, 39 insertions(+), 70 deletions(-) diff --git a/src/blocks/_pro/fixed-display/view.js b/src/blocks/_pro/fixed-display/view.js index 0c5f632ee..0acb01abf 100644 --- a/src/blocks/_pro/fixed-display/view.js +++ b/src/blocks/_pro/fixed-display/view.js @@ -1,21 +1,35 @@ /* eslint-env browser */ -// LocalStorage に表示済みフラグを保存する関数 -function saveDisplayedFlag(blockId) { - try { - localStorage.setItem(`displayed_${blockId}`, 'true'); - } catch (e) { - // エラーログの削除 - } +// LocalStorage にフラグを保存する関数 +function setLocalStorageFlag(key, value) { + localStorage.setItem(key, value); +} + +// LocalStorage からフラグを取得する関数 +function getLocalStorageFlag(key) { + return localStorage.getItem(key) !== null; } -// LocalStorage から表示済みフラグを取得する関数 -function hasDisplayedBefore(blockId) { - try { - return localStorage.getItem(`displayed_${blockId}`) !== null; - } catch (e) { - // エラーログの削除 - return false; +// 要素の表示・非表示を制御する共通関数 +function handleVisibility(item, displayAfterSeconds, hideAfterSeconds, blockId, dontShowAgain) { + if (displayAfterSeconds > 0) { + setTimeout(() => { + item.classList.add('is-timed-visible'); + if (dontShowAgain) { + setLocalStorageFlag(`displayed_${blockId}`, 'true'); + } + }, displayAfterSeconds * 1000); + } else { + item.classList.add('is-timed-visible'); + if (dontShowAgain) { + setLocalStorageFlag(`displayed_${blockId}`, 'true'); + } + } + + if (hideAfterSeconds > 0) { + setTimeout(() => { + item.classList.remove('is-timed-visible'); + }, (displayAfterSeconds + hideAfterSeconds) * 1000); } } @@ -24,56 +38,32 @@ window.addEventListener('scroll', function () { const items = document.querySelectorAll('.vk_fixed-display-mode-show-on-scroll'); items.forEach((item) => { - const blockId = item.getAttribute('data-block-id'); // ユニークなblockIdを取得 - const dontShowAgain = item.getAttribute('data-dont-show-again') === 'true'; // dontShowAgainの取得 + const blockId = item.getAttribute('data-block-id'); + const dontShowAgain = item.getAttribute('data-dont-show-again') === 'true'; // dontShowAgainが有効で、一度表示済みなら何もしない - if (dontShowAgain && hasDisplayedBefore(blockId)) { + if (dontShowAgain && getLocalStorageFlag(`displayed_${blockId}`)) { return; } - // data属性からスクロールタイミングと単位、及びscrollPersistVisibleを取得 const timing = parseInt(item.getAttribute('data-scroll-timing'), 10); const unit = item.getAttribute('data-scroll-timing-unit'); const scrollPersistVisible = item.getAttribute('data-persist-visible') === 'true'; - // 単位に応じたピクセル値への変換 const timingInPixels = convertUnitToPixels(timing, unit); // スクロール位置が指定したタイミングを超えた場合にタイマーを開始 if (window.scrollY > timingInPixels && !item.classList.contains('is-scrolled-visible')) { item.classList.add('is-scrolled-visible'); - // タイマーで表示 const displayAfterSeconds = parseFloat(item.getAttribute('data-display-after-seconds')) || 0; const hideAfterSeconds = parseFloat(item.getAttribute('data-hide-after-seconds')) || 0; - // X秒後に表示 (is-timed-visible) - if (displayAfterSeconds > 0) { - setTimeout(() => { - item.classList.add('is-timed-visible'); - // dontShowAgainが有効なら表示済みフラグを保存 - if (dontShowAgain) { - saveDisplayedFlag(blockId); - } - }, displayAfterSeconds * 1000); - } else { - item.classList.add('is-timed-visible'); - // dontShowAgainが有効なら表示済みフラグを保存 - if (dontShowAgain) { - saveDisplayedFlag(blockId); - } - } - - // X秒後に非表示 (is-timed-hide) - if (hideAfterSeconds > 0) { - setTimeout(() => { - item.classList.remove('is-timed-visible'); - }, (displayAfterSeconds + hideAfterSeconds) * 1000); - } + // handleVisibility関数を使用して表示・非表示を制御 + handleVisibility(item, displayAfterSeconds, hideAfterSeconds, blockId, dontShowAgain); } else if (window.scrollY < timingInPixels && !scrollPersistVisible) { item.classList.remove('is-scrolled-visible'); - item.classList.remove('is-timed-visible'); // 非表示に戻す + item.classList.remove('is-timed-visible'); } }); }); @@ -85,37 +75,16 @@ window.addEventListener('DOMContentLoaded', function () { items.forEach((item) => { const displayAfterSeconds = parseFloat(item.getAttribute('data-display-after-seconds')) || 0; const hideAfterSeconds = parseFloat(item.getAttribute('data-hide-after-seconds')) || 0; - const blockId = item.getAttribute('data-block-id'); // ユニークなblockIdを取得 - const dontShowAgain = item.getAttribute('data-dont-show-again') === 'true'; // dontShowAgainの取得 + const blockId = item.getAttribute('data-block-id'); + const dontShowAgain = item.getAttribute('data-dont-show-again') === 'true'; // dontShowAgainが有効で、一度表示済みなら何もしない - if (dontShowAgain && hasDisplayedBefore(blockId)) { + if (dontShowAgain && getLocalStorageFlag(`displayed_${blockId}`)) { return; } - // X秒後に表示 (is-timed-display) - if (displayAfterSeconds > 0) { - setTimeout(() => { - item.classList.add('is-timed-visible'); - // dontShowAgainが有効なら表示済みフラグを保存 - if (dontShowAgain) { - saveDisplayedFlag(blockId); - } - }, displayAfterSeconds * 1000); - } else { - item.classList.add('is-timed-visible'); - // dontShowAgainが有効なら表示済みフラグを保存 - if (dontShowAgain) { - saveDisplayedFlag(blockId); - } - } - - // X秒後に非表示 (is-timed-hide) - 表示後のタイミング - if (hideAfterSeconds > 0) { - setTimeout(() => { - item.classList.remove('is-timed-visible'); - }, (displayAfterSeconds + hideAfterSeconds) * 1000); - } + // handleVisibility関数を使用して表示・非表示を制御 + handleVisibility(item, displayAfterSeconds, hideAfterSeconds, blockId, dontShowAgain); }); }); From ffa747560285e384c0901ea1d1e63d0fc737950d Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 2 Oct 2024 10:31:58 +0900 Subject: [PATCH 11/83] Refactor: auto-converted formatting --- src/blocks/_pro/fixed-display/view.js | 78 ++++++++++++++++++++------- 1 file changed, 60 insertions(+), 18 deletions(-) diff --git a/src/blocks/_pro/fixed-display/view.js b/src/blocks/_pro/fixed-display/view.js index 0acb01abf..909d10807 100644 --- a/src/blocks/_pro/fixed-display/view.js +++ b/src/blocks/_pro/fixed-display/view.js @@ -11,7 +11,13 @@ function getLocalStorageFlag(key) { } // 要素の表示・非表示を制御する共通関数 -function handleVisibility(item, displayAfterSeconds, hideAfterSeconds, blockId, dontShowAgain) { +function handleVisibility( + item, + displayAfterSeconds, + hideAfterSeconds, + blockId, + dontShowAgain +) { if (displayAfterSeconds > 0) { setTimeout(() => { item.classList.add('is-timed-visible'); @@ -27,19 +33,25 @@ function handleVisibility(item, displayAfterSeconds, hideAfterSeconds, blockId, } if (hideAfterSeconds > 0) { - setTimeout(() => { - item.classList.remove('is-timed-visible'); - }, (displayAfterSeconds + hideAfterSeconds) * 1000); + setTimeout( + () => { + item.classList.remove('is-timed-visible'); + }, + (displayAfterSeconds + hideAfterSeconds) * 1000 + ); } } // スクロールタイミング設定 window.addEventListener('scroll', function () { - const items = document.querySelectorAll('.vk_fixed-display-mode-show-on-scroll'); + const items = document.querySelectorAll( + '.vk_fixed-display-mode-show-on-scroll' + ); items.forEach((item) => { const blockId = item.getAttribute('data-block-id'); - const dontShowAgain = item.getAttribute('data-dont-show-again') === 'true'; + const dontShowAgain = + item.getAttribute('data-dont-show-again') === 'true'; // dontShowAgainが有効で、一度表示済みなら何もしない if (dontShowAgain && getLocalStorageFlag(`displayed_${blockId}`)) { @@ -48,19 +60,32 @@ window.addEventListener('scroll', function () { const timing = parseInt(item.getAttribute('data-scroll-timing'), 10); const unit = item.getAttribute('data-scroll-timing-unit'); - const scrollPersistVisible = item.getAttribute('data-persist-visible') === 'true'; + const scrollPersistVisible = + item.getAttribute('data-persist-visible') === 'true'; const timingInPixels = convertUnitToPixels(timing, unit); // スクロール位置が指定したタイミングを超えた場合にタイマーを開始 - if (window.scrollY > timingInPixels && !item.classList.contains('is-scrolled-visible')) { + if ( + window.scrollY > timingInPixels && + !item.classList.contains('is-scrolled-visible') + ) { item.classList.add('is-scrolled-visible'); - const displayAfterSeconds = parseFloat(item.getAttribute('data-display-after-seconds')) || 0; - const hideAfterSeconds = parseFloat(item.getAttribute('data-hide-after-seconds')) || 0; + const displayAfterSeconds = + parseFloat(item.getAttribute('data-display-after-seconds')) || + 0; + const hideAfterSeconds = + parseFloat(item.getAttribute('data-hide-after-seconds')) || 0; // handleVisibility関数を使用して表示・非表示を制御 - handleVisibility(item, displayAfterSeconds, hideAfterSeconds, blockId, dontShowAgain); + handleVisibility( + item, + displayAfterSeconds, + hideAfterSeconds, + blockId, + dontShowAgain + ); } else if (window.scrollY < timingInPixels && !scrollPersistVisible) { item.classList.remove('is-scrolled-visible'); item.classList.remove('is-timed-visible'); @@ -70,13 +95,18 @@ window.addEventListener('scroll', function () { // 表示・非表示タイマー設定 window.addEventListener('DOMContentLoaded', function () { - const items = document.querySelectorAll('.vk_fixed-display-mode-always-visible'); + const items = document.querySelectorAll( + '.vk_fixed-display-mode-always-visible' + ); items.forEach((item) => { - const displayAfterSeconds = parseFloat(item.getAttribute('data-display-after-seconds')) || 0; - const hideAfterSeconds = parseFloat(item.getAttribute('data-hide-after-seconds')) || 0; + const displayAfterSeconds = + parseFloat(item.getAttribute('data-display-after-seconds')) || 0; + const hideAfterSeconds = + parseFloat(item.getAttribute('data-hide-after-seconds')) || 0; const blockId = item.getAttribute('data-block-id'); - const dontShowAgain = item.getAttribute('data-dont-show-again') === 'true'; + const dontShowAgain = + item.getAttribute('data-dont-show-again') === 'true'; // dontShowAgainが有効で、一度表示済みなら何もしない if (dontShowAgain && getLocalStorageFlag(`displayed_${blockId}`)) { @@ -84,7 +114,13 @@ window.addEventListener('DOMContentLoaded', function () { } // handleVisibility関数を使用して表示・非表示を制御 - handleVisibility(item, displayAfterSeconds, hideAfterSeconds, blockId, dontShowAgain); + handleVisibility( + item, + displayAfterSeconds, + hideAfterSeconds, + blockId, + dontShowAgain + ); }); }); @@ -94,9 +130,15 @@ function convertUnitToPixels(value, unit) { case 'px': return value; case 'em': - return value * parseFloat(getComputedStyle(document.documentElement).fontSize); + return ( + value * + parseFloat(getComputedStyle(document.documentElement).fontSize) + ); case 'rem': - return value * parseFloat(getComputedStyle(document.documentElement).fontSize); + return ( + value * + parseFloat(getComputedStyle(document.documentElement).fontSize) + ); case '%': return (value * window.innerHeight) / 100; case 'vh': From 42878192871d70869890aeed29deaf16aacf22f7 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 2 Oct 2024 10:38:43 +0900 Subject: [PATCH 12/83] Add timer setting for editor --- src/blocks/_pro/fixed-display/style.scss | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/blocks/_pro/fixed-display/style.scss b/src/blocks/_pro/fixed-display/style.scss index e77c854f4..46e4a4204 100644 --- a/src/blocks/_pro/fixed-display/style.scss +++ b/src/blocks/_pro/fixed-display/style.scss @@ -102,7 +102,14 @@ /* 編集画面用 /*-------------------------------------------*/ .block-editor-block-list__block { - + &.vk_fixed-display { + + /* タイマー機能用クラス */ + &.is-timed-hide, + &.is-timed-display { + opacity: unset; + } + } &.vk_fixed-display-position { width: auto; &-right { From 53d06db43606319eb439e157fc609ffc383cba95 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 2 Oct 2024 10:39:28 +0900 Subject: [PATCH 13/83] Add: line --- src/blocks/_pro/fixed-display/style.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/blocks/_pro/fixed-display/style.scss b/src/blocks/_pro/fixed-display/style.scss index 46e4a4204..e68e0f82c 100644 --- a/src/blocks/_pro/fixed-display/style.scss +++ b/src/blocks/_pro/fixed-display/style.scss @@ -110,6 +110,7 @@ opacity: unset; } } + &.vk_fixed-display-position { width: auto; &-right { From f82a52614cf87614f1476531f870eaca183212dc Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 2 Oct 2024 11:04:44 +0900 Subject: [PATCH 14/83] Fix: changelog --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index d10a396fa..e59dfaf1c 100644 --- a/readme.txt +++ b/readme.txt @@ -106,7 +106,7 @@ e.g. == Changelog == -[ Add function ][ Fixed Display ( Pro ) ] Added a time-based display and hide. +[ Add function ][ Fixed Display (Pro) ] Added a timer feature to control block appearance/disappearance and a "Do not show again for returning visitors" option. Local Storage is used, but no personal data is collected or tracked. [ Bug fix ] Fix load styles when separate load is enable. [ Bug fix ][ Tab (Pro) ] Added a process to dynamically calculate and set the iframe height when the tab becomes active. [ Bug Fix ] Fixed an issue where disabling separated loading caused all block CSS to load. From 668a90380c86057310e3318fabd6cb4227d000c6 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 2 Oct 2024 11:14:54 +0900 Subject: [PATCH 15/83] Fix: test --- .../fixtures/blocks/vk-blocks__fixed-display__default.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__default.html b/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__default.html index 818ed04ae..a72daca27 100644 --- a/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__default.html +++ b/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__default.html @@ -1,5 +1,5 @@ - -
+ +

あああああああああ

\ No newline at end of file From b8cc752485e19f96e2a9d06d37577bc087c1006a Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 2 Oct 2024 11:18:06 +0900 Subject: [PATCH 16/83] Add dontShowAgain --- src/blocks/_pro/fixed-display/deprecated/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/blocks/_pro/fixed-display/deprecated/index.js b/src/blocks/_pro/fixed-display/deprecated/index.js index d4bf8922c..01ec1fa7f 100644 --- a/src/blocks/_pro/fixed-display/deprecated/index.js +++ b/src/blocks/_pro/fixed-display/deprecated/index.js @@ -61,7 +61,11 @@ const blockAttributes3 = { type: 'number', default: 0 }, - "hideAfterSeconds": { + hideAfterSeconds: { + type: 'number', + default: 0 + }, + dontShowAgain: { type: 'number', default: 0 }, From 45d60827eefb88ae9e9a78102ec1ff632d7933b5 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 2 Oct 2024 11:25:53 +0900 Subject: [PATCH 17/83] Add dontShowAgain --- src/blocks/_pro/fixed-display/save.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/blocks/_pro/fixed-display/save.js b/src/blocks/_pro/fixed-display/save.js index 179442d9c..230ef98fc 100644 --- a/src/blocks/_pro/fixed-display/save.js +++ b/src/blocks/_pro/fixed-display/save.js @@ -29,6 +29,7 @@ export default function save({ attributes }) { ...(hideAfterSeconds > 0 && { 'data-hide-after-seconds': hideAfterSeconds.toString(), }), + // dontShowAgainは削除されないようにする ...(dontShowAgain && { 'data-dont-show-again': 'true', }), @@ -51,7 +52,7 @@ export default function save({ attributes }) { ? `${fixedPositionValue}${fixedPositionUnit}` : undefined, }, - ...dataAttributes, // 動的に構築したデータ属性を追加 + ...dataAttributes, }); return ( From 586052bc5578430f6bc4d4b9ed9421fc78987cc2 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 2 Oct 2024 15:14:06 +0900 Subject: [PATCH 18/83] Undo is-visible --- src/blocks/_pro/fixed-display/style.scss | 2 +- src/blocks/_pro/fixed-display/view.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/blocks/_pro/fixed-display/style.scss b/src/blocks/_pro/fixed-display/style.scss index e68e0f82c..4def4c1e2 100644 --- a/src/blocks/_pro/fixed-display/style.scss +++ b/src/blocks/_pro/fixed-display/style.scss @@ -40,7 +40,7 @@ opacity: 0; transition: opacity 0.3s ease; - &.is-scrolled-visible { + &.is-visible { opacity: 1; } } diff --git a/src/blocks/_pro/fixed-display/view.js b/src/blocks/_pro/fixed-display/view.js index 909d10807..b25481273 100644 --- a/src/blocks/_pro/fixed-display/view.js +++ b/src/blocks/_pro/fixed-display/view.js @@ -68,9 +68,9 @@ window.addEventListener('scroll', function () { // スクロール位置が指定したタイミングを超えた場合にタイマーを開始 if ( window.scrollY > timingInPixels && - !item.classList.contains('is-scrolled-visible') + !item.classList.contains('is-visible') ) { - item.classList.add('is-scrolled-visible'); + item.classList.add('is-visible'); const displayAfterSeconds = parseFloat(item.getAttribute('data-display-after-seconds')) || @@ -87,7 +87,7 @@ window.addEventListener('scroll', function () { dontShowAgain ); } else if (window.scrollY < timingInPixels && !scrollPersistVisible) { - item.classList.remove('is-scrolled-visible'); + item.classList.remove('is-visible'); item.classList.remove('is-timed-visible'); } }); From 1764fa0d3d5913d5eec70d90c625764a66305cab Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 2 Oct 2024 15:52:07 +0900 Subject: [PATCH 19/83] Prevented unnecessary classes being left behind when fixedPositionType is changed from right or left to top or bottom. --- src/blocks/_pro/fixed-display/edit.js | 56 ++++++++++++++---------- src/blocks/_pro/fixed-display/save.js | 11 +++-- src/blocks/_pro/fixed-display/style.scss | 1 + 3 files changed, 39 insertions(+), 29 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index 9898cbeb0..a323b1b0b 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -49,25 +49,35 @@ export default function FixedDisplayEdit(props) { ) { setAttributes({ blockId: clientId }); } + setAttributes({ mode: mode || 'always-visible', position: position || 'right', scrollPersistVisible: - scrollPersistVisible !== undefined - ? scrollPersistVisible - : false, + scrollPersistVisible !== undefined ? scrollPersistVisible : false, }); }, [clientId, mode, position, blockId, scrollPersistVisible]); + const handlePositionChange = (newPosition) => { + // 位置が top または bottom に変更された場合、fixedPositionType をクリア + if (['top', 'bottom'].includes(newPosition)) { + setAttributes({ fixedPositionType: undefined }); + } + setAttributes({ position: newPosition }); + }; + + // ここで blockProps を一度だけ定義 const blockProps = useBlockProps({ - className: `vk_fixed-display vk_fixed-display-mode-${mode} vk_fixed-display-position-${position} vk_fixed-display-position-from-${fixedPositionType} vk_fixed-display-${blockId}`, + className: `vk_fixed-display vk_fixed-display-mode-${mode} vk_fixed-display-position-${position} ${ + ['top', 'bottom'].includes(position) ? '' : `vk_fixed-display-position-from-${fixedPositionType}` + } vk_fixed-display-${blockId}`, style: { [fixedPositionType]: - typeof window === 'undefined' || !window.wp?.blockEditor + ['right', 'left'].includes(position) ? `${fixedPositionValue}${fixedPositionUnit}` : undefined, }, - }); + }); return ( <> @@ -101,7 +111,7 @@ export default function FixedDisplayEdit(props) { setAttributes({ position: value })} + onChange={handlePositionChange} // handlePositionChange に変更 options={[ { label: __('Top', 'vk-blocks-pro'), value: 'top' }, { @@ -254,22 +264,22 @@ export default function FixedDisplayEdit(props) { setAttributes({ dontShowAgain: value }) } /> - -

- {__( - 'In private browsing mode or environments where certain features are disabled, this block may appear again on future visits.', - 'vk-blocks-pro' - )} -

-
- - -
- -
+ +

+ {__( + 'In private browsing mode or environments where certain features are disabled, this block may appear again on future visits.', + 'vk-blocks-pro' + )} +

+
+ + +
+ +
); } diff --git a/src/blocks/_pro/fixed-display/save.js b/src/blocks/_pro/fixed-display/save.js index 230ef98fc..0a06786f1 100644 --- a/src/blocks/_pro/fixed-display/save.js +++ b/src/blocks/_pro/fixed-display/save.js @@ -16,7 +16,6 @@ export default function save({ attributes }) { blockId, } = attributes; - // データ属性を動的に構築 const dataAttributes = { ...(mode === 'show-on-scroll' && { 'data-scroll-timing': scrollTiming.toString(), @@ -29,22 +28,22 @@ export default function save({ attributes }) { ...(hideAfterSeconds > 0 && { 'data-hide-after-seconds': hideAfterSeconds.toString(), }), - // dontShowAgainは削除されないようにする + ...(dontShowAgain && { 'data-dont-show-again': 'true', }), }; - // スクロール表示が無効(常に表示)になった場合、スクロール関連のデータ属性を削除 if (mode !== 'show-on-scroll') { delete dataAttributes['data-scroll-timing']; delete dataAttributes['data-scroll-timing-unit']; delete dataAttributes['data-persist-visible']; } - // blockPropsにデータ属性を含めて保存 const blockProps = useBlockProps.save({ - className: `vk_fixed-display vk_fixed-display-mode-${mode} vk_fixed-display-position-${position} vk_fixed-display-position-from-${fixedPositionType} vk_fixed-display-${blockId} ${ + className: `vk_fixed-display vk_fixed-display-mode-${mode} vk_fixed-display-position-${position} ${ + ['top', 'bottom'].includes(position) ? '' : `vk_fixed-display-position-from-${fixedPositionType}` + } vk_fixed-display-${blockId} ${ displayAfterSeconds > 0 ? 'is-timed-display' : '' } ${hideAfterSeconds > 0 ? 'is-timed-hide' : ''}`, style: { @@ -53,7 +52,7 @@ export default function save({ attributes }) { : undefined, }, ...dataAttributes, - }); + }); return (
diff --git a/src/blocks/_pro/fixed-display/style.scss b/src/blocks/_pro/fixed-display/style.scss index 4def4c1e2..cb326427c 100644 --- a/src/blocks/_pro/fixed-display/style.scss +++ b/src/blocks/_pro/fixed-display/style.scss @@ -9,6 +9,7 @@ position: fixed; margin-block-start: 0; z-index: 99999; + width: 100%; /* タイマー機能用クラス */ &.is-timed-hide { From 9c887657cb7ecf7b6474bf541d599bfd62fe4abb Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 2 Oct 2024 16:16:13 +0900 Subject: [PATCH 20/83] Fix: Prevent multiple triggers on scroll unless scrollPersistVisible is true --- src/blocks/_pro/fixed-display/edit.js | 30 +++++++++------------------ src/blocks/_pro/fixed-display/save.js | 7 ++++--- src/blocks/_pro/fixed-display/view.js | 12 +++++++++-- 3 files changed, 24 insertions(+), 25 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index a323b1b0b..3b2062640 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -42,42 +42,32 @@ export default function FixedDisplayEdit(props) { dontShowAgain, } = attributes; + // blockIdの初期設定のみ useEffect(() => { - if ( - blockId === undefined || - isParentReusableBlock(clientId) === false - ) { + if (!blockId || !isParentReusableBlock(clientId)) { setAttributes({ blockId: clientId }); } + }, [clientId, blockId, setAttributes]); - setAttributes({ - mode: mode || 'always-visible', - position: position || 'right', - scrollPersistVisible: - scrollPersistVisible !== undefined ? scrollPersistVisible : false, - }); - }, [clientId, mode, position, blockId, scrollPersistVisible]); - + // ポジションの変更時にfixedPositionTypeをクリア const handlePositionChange = (newPosition) => { - // 位置が top または bottom に変更された場合、fixedPositionType をクリア if (['top', 'bottom'].includes(newPosition)) { setAttributes({ fixedPositionType: undefined }); } setAttributes({ position: newPosition }); }; - - // ここで blockProps を一度だけ定義 + + // blockProps の定義 const blockProps = useBlockProps({ className: `vk_fixed-display vk_fixed-display-mode-${mode} vk_fixed-display-position-${position} ${ ['top', 'bottom'].includes(position) ? '' : `vk_fixed-display-position-from-${fixedPositionType}` } vk_fixed-display-${blockId}`, style: { - [fixedPositionType]: - ['right', 'left'].includes(position) - ? `${fixedPositionValue}${fixedPositionUnit}` - : undefined, + [fixedPositionType]: ['right', 'left'].includes(position) + ? `${fixedPositionValue}${fixedPositionUnit}` + : undefined, }, - }); + }); return ( <> diff --git a/src/blocks/_pro/fixed-display/save.js b/src/blocks/_pro/fixed-display/save.js index 0a06786f1..6af502de2 100644 --- a/src/blocks/_pro/fixed-display/save.js +++ b/src/blocks/_pro/fixed-display/save.js @@ -28,7 +28,6 @@ export default function save({ attributes }) { ...(hideAfterSeconds > 0 && { 'data-hide-after-seconds': hideAfterSeconds.toString(), }), - ...(dontShowAgain && { 'data-dont-show-again': 'true', }), @@ -42,7 +41,9 @@ export default function save({ attributes }) { const blockProps = useBlockProps.save({ className: `vk_fixed-display vk_fixed-display-mode-${mode} vk_fixed-display-position-${position} ${ - ['top', 'bottom'].includes(position) ? '' : `vk_fixed-display-position-from-${fixedPositionType}` + ['top', 'bottom'].includes(position) + ? '' + : `vk_fixed-display-position-from-${fixedPositionType}` } vk_fixed-display-${blockId} ${ displayAfterSeconds > 0 ? 'is-timed-display' : '' } ${hideAfterSeconds > 0 ? 'is-timed-hide' : ''}`, @@ -52,7 +53,7 @@ export default function save({ attributes }) { : undefined, }, ...dataAttributes, - }); + }); return (
diff --git a/src/blocks/_pro/fixed-display/view.js b/src/blocks/_pro/fixed-display/view.js index b25481273..ff3ee1926 100644 --- a/src/blocks/_pro/fixed-display/view.js +++ b/src/blocks/_pro/fixed-display/view.js @@ -65,12 +65,17 @@ window.addEventListener('scroll', function () { const timingInPixels = convertUnitToPixels(timing, unit); + // すでに発火しているか確認 + const isTriggered = item.getAttribute('data-is-triggered') === 'true'; + // スクロール位置が指定したタイミングを超えた場合にタイマーを開始 if ( window.scrollY > timingInPixels && - !item.classList.contains('is-visible') + !item.classList.contains('is-visible') && + !isTriggered ) { item.classList.add('is-visible'); + item.setAttribute('data-is-triggered', 'true'); // 発火済みと設定 const displayAfterSeconds = parseFloat(item.getAttribute('data-display-after-seconds')) || @@ -86,9 +91,12 @@ window.addEventListener('scroll', function () { blockId, dontShowAgain ); - } else if (window.scrollY < timingInPixels && !scrollPersistVisible) { + } + // scrollPersistVisibleがONのときだけ再発火可能にする + else if (scrollPersistVisible && window.scrollY < timingInPixels) { item.classList.remove('is-visible'); item.classList.remove('is-timed-visible'); + item.setAttribute('data-is-triggered', 'false'); // 発火解除 } }); }); From 00bc2674478a0dd23e20f46d757ebd2fb22c49b2 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 2 Oct 2024 16:16:58 +0900 Subject: [PATCH 21/83] Clean up --- src/blocks/_pro/fixed-display/edit.js | 57 ++++++++++++++++----------- 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index 3b2062640..298a24f60 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -42,25 +42,38 @@ export default function FixedDisplayEdit(props) { dontShowAgain, } = attributes; - // blockIdの初期設定のみ useEffect(() => { - if (!blockId || !isParentReusableBlock(clientId)) { + if ( + blockId === undefined || + isParentReusableBlock(clientId) === false + ) { setAttributes({ blockId: clientId }); } - }, [clientId, blockId, setAttributes]); - // ポジションの変更時にfixedPositionTypeをクリア + setAttributes({ + mode: mode || 'always-visible', + position: position || 'right', + scrollPersistVisible: + scrollPersistVisible !== undefined + ? scrollPersistVisible + : false, + }); + }, [clientId, mode, position, blockId, scrollPersistVisible]); + const handlePositionChange = (newPosition) => { + // 位置が top または bottom に変更された場合、fixedPositionType をクリア if (['top', 'bottom'].includes(newPosition)) { setAttributes({ fixedPositionType: undefined }); } setAttributes({ position: newPosition }); }; - // blockProps の定義 + // ここで blockProps を一度だけ定義 const blockProps = useBlockProps({ className: `vk_fixed-display vk_fixed-display-mode-${mode} vk_fixed-display-position-${position} ${ - ['top', 'bottom'].includes(position) ? '' : `vk_fixed-display-position-from-${fixedPositionType}` + ['top', 'bottom'].includes(position) + ? '' + : `vk_fixed-display-position-from-${fixedPositionType}` } vk_fixed-display-${blockId}`, style: { [fixedPositionType]: ['right', 'left'].includes(position) @@ -254,22 +267,22 @@ export default function FixedDisplayEdit(props) { setAttributes({ dontShowAgain: value }) } /> - -

- {__( - 'In private browsing mode or environments where certain features are disabled, this block may appear again on future visits.', - 'vk-blocks-pro' - )} -

-
- - -
- -
+ +

+ {__( + 'In private browsing mode or environments where certain features are disabled, this block may appear again on future visits.', + 'vk-blocks-pro' + )} +

+
+ + +
+ +
); } From 5e8c04df6b80dbc19959db93d4dff7b7485010ba Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 3 Oct 2024 11:56:42 +0900 Subject: [PATCH 22/83] Fix: blockProps --- src/blocks/_pro/fixed-display/edit.js | 23 +++++++++++------------ src/blocks/_pro/fixed-display/save.js | 6 +++--- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index 298a24f60..853c7046d 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -68,12 +68,11 @@ export default function FixedDisplayEdit(props) { setAttributes({ position: newPosition }); }; - // ここで blockProps を一度だけ定義 const blockProps = useBlockProps({ className: `vk_fixed-display vk_fixed-display-mode-${mode} vk_fixed-display-position-${position} ${ - ['top', 'bottom'].includes(position) - ? '' - : `vk_fixed-display-position-from-${fixedPositionType}` + ['right', 'left'].includes(position) + ? `vk_fixed-display-position-from-${fixedPositionType}` + : '' } vk_fixed-display-${blockId}`, style: { [fixedPositionType]: ['right', 'left'].includes(position) @@ -218,14 +217,6 @@ export default function FixedDisplayEdit(props) { setAttributes({ scrollPersistVisible: value }) } /> - -

- {__( - 'This block will appear when the user scrolls to a specific point on the page. You can also set the timing for how long after scrolling it appears and when it disappears.', - 'vk-blocks-pro' - )} -

-
)} @@ -253,6 +244,14 @@ export default function FixedDisplayEdit(props) { min="0" step="0.1" /> + +

+ {__( + 'When combined with "Show on Scroll", you can set the time the block remains visible after the user scrolls to a specific point, as well as when it disappears.', + 'vk-blocks-pro' + )} +

+
0 ? 'is-timed-display' : '' } ${hideAfterSeconds > 0 ? 'is-timed-hide' : ''}`, From 7edfab8fe2491244508bd593b5956093b161c957 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 3 Oct 2024 13:54:40 +0900 Subject: [PATCH 23/83] Fix: Replaced Local Storage with Session Storage for controlling block reappearance --- src/blocks/_pro/fixed-display/edit.js | 2 +- src/blocks/_pro/fixed-display/view.js | 26 ++++++++++++-------------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index 853c7046d..10486f0a9 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -269,7 +269,7 @@ export default function FixedDisplayEdit(props) {

{__( - 'In private browsing mode or environments where certain features are disabled, this block may appear again on future visits.', + 'Since this block uses Session Storage, it may reappear after the browser is closed or in private browsing mode.', 'vk-blocks-pro' )}

diff --git a/src/blocks/_pro/fixed-display/view.js b/src/blocks/_pro/fixed-display/view.js index ff3ee1926..cff1d8c69 100644 --- a/src/blocks/_pro/fixed-display/view.js +++ b/src/blocks/_pro/fixed-display/view.js @@ -1,13 +1,13 @@ /* eslint-env browser */ -// LocalStorage にフラグを保存する関数 -function setLocalStorageFlag(key, value) { - localStorage.setItem(key, value); +// SessionStorage にフラグを保存する関数 +function setSessionStorageFlag(key, value) { + sessionStorage.setItem(key, value); } -// LocalStorage からフラグを取得する関数 -function getLocalStorageFlag(key) { - return localStorage.getItem(key) !== null; +// SessionStorage からフラグを取得する関数 +function getSessionStorageFlag(key) { + return sessionStorage.getItem(key) !== null; } // 要素の表示・非表示を制御する共通関数 @@ -22,13 +22,13 @@ function handleVisibility( setTimeout(() => { item.classList.add('is-timed-visible'); if (dontShowAgain) { - setLocalStorageFlag(`displayed_${blockId}`, 'true'); + setSessionStorageFlag(`displayed_${blockId}`, 'true'); } }, displayAfterSeconds * 1000); } else { item.classList.add('is-timed-visible'); if (dontShowAgain) { - setLocalStorageFlag(`displayed_${blockId}`, 'true'); + setSessionStorageFlag(`displayed_${blockId}`, 'true'); } } @@ -53,10 +53,9 @@ window.addEventListener('scroll', function () { const dontShowAgain = item.getAttribute('data-dont-show-again') === 'true'; - // dontShowAgainが有効で、一度表示済みなら何もしない - if (dontShowAgain && getLocalStorageFlag(`displayed_${blockId}`)) { + if (dontShowAgain && getSessionStorageFlag(`displayed_${blockId}`)) { return; - } + } const timing = parseInt(item.getAttribute('data-scroll-timing'), 10); const unit = item.getAttribute('data-scroll-timing-unit'); @@ -115,9 +114,8 @@ window.addEventListener('DOMContentLoaded', function () { const blockId = item.getAttribute('data-block-id'); const dontShowAgain = item.getAttribute('data-dont-show-again') === 'true'; - - // dontShowAgainが有効で、一度表示済みなら何もしない - if (dontShowAgain && getLocalStorageFlag(`displayed_${blockId}`)) { + + if (dontShowAgain && getSessionStorageFlag(`displayed_${blockId}`)) { return; } From 61c5d13ef2018637024605fd5c40d2b2da0d2b79 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 3 Oct 2024 13:59:17 +0900 Subject: [PATCH 24/83] Minor correct --- src/blocks/_pro/fixed-display/style.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/src/blocks/_pro/fixed-display/style.scss b/src/blocks/_pro/fixed-display/style.scss index cb326427c..4def4c1e2 100644 --- a/src/blocks/_pro/fixed-display/style.scss +++ b/src/blocks/_pro/fixed-display/style.scss @@ -9,7 +9,6 @@ position: fixed; margin-block-start: 0; z-index: 99999; - width: 100%; /* タイマー機能用クラス */ &.is-timed-hide { From 6d7780b4b2a0707914b0cb3fa1e7f1ae492c09ef Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 3 Oct 2024 14:06:14 +0900 Subject: [PATCH 25/83] Fix: Persist visibility when scrolling up if 'scrollPersistVisible' is enabled --- src/blocks/_pro/fixed-display/view.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/blocks/_pro/fixed-display/view.js b/src/blocks/_pro/fixed-display/view.js index cff1d8c69..7652703df 100644 --- a/src/blocks/_pro/fixed-display/view.js +++ b/src/blocks/_pro/fixed-display/view.js @@ -1,11 +1,10 @@ /* eslint-env browser */ -// SessionStorage にフラグを保存する関数 +// SessionStorage設定 function setSessionStorageFlag(key, value) { sessionStorage.setItem(key, value); } -// SessionStorage からフラグを取得する関数 function getSessionStorageFlag(key) { return sessionStorage.getItem(key) !== null; } @@ -55,7 +54,7 @@ window.addEventListener('scroll', function () { if (dontShowAgain && getSessionStorageFlag(`displayed_${blockId}`)) { return; - } + } const timing = parseInt(item.getAttribute('data-scroll-timing'), 10); const unit = item.getAttribute('data-scroll-timing-unit'); @@ -92,7 +91,7 @@ window.addEventListener('scroll', function () { ); } // scrollPersistVisibleがONのときだけ再発火可能にする - else if (scrollPersistVisible && window.scrollY < timingInPixels) { + else if (!scrollPersistVisible && window.scrollY < timingInPixels) { item.classList.remove('is-visible'); item.classList.remove('is-timed-visible'); item.setAttribute('data-is-triggered', 'false'); // 発火解除 @@ -114,7 +113,7 @@ window.addEventListener('DOMContentLoaded', function () { const blockId = item.getAttribute('data-block-id'); const dontShowAgain = item.getAttribute('data-dont-show-again') === 'true'; - + if (dontShowAgain && getSessionStorageFlag(`displayed_${blockId}`)) { return; } From 10b173b00d9123ab62ff45dd8def7635b3fbb376 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 3 Oct 2024 14:06:50 +0900 Subject: [PATCH 26/83] Delete commentout --- src/blocks/_pro/fixed-display/edit.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index 10486f0a9..63e34a93e 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -61,7 +61,6 @@ export default function FixedDisplayEdit(props) { }, [clientId, mode, position, blockId, scrollPersistVisible]); const handlePositionChange = (newPosition) => { - // 位置が top または bottom に変更された場合、fixedPositionType をクリア if (['top', 'bottom'].includes(newPosition)) { setAttributes({ fixedPositionType: undefined }); } @@ -113,7 +112,7 @@ export default function FixedDisplayEdit(props) { Date: Thu, 3 Oct 2024 14:08:32 +0900 Subject: [PATCH 27/83] Fix: changelog --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index e59dfaf1c..58f8299b4 100644 --- a/readme.txt +++ b/readme.txt @@ -106,7 +106,7 @@ e.g. == Changelog == -[ Add function ][ Fixed Display (Pro) ] Added a timer feature to control block appearance/disappearance and a "Do not show again for returning visitors" option. Local Storage is used, but no personal data is collected or tracked. +[ Add function ][ Fixed Display (Pro) ] Added a timer feature to control block appearance/disappearance and a "Do not show again for returning visitors" option. Session Storage is used, and no personal data is collected or tracked. Since Session Storage is used, the block may reappear after the browser is closed or in private browsing mode. [ Bug fix ] Fix load styles when separate load is enable. [ Bug fix ][ Tab (Pro) ] Added a process to dynamically calculate and set the iframe height when the tab becomes active. [ Bug Fix ] Fixed an issue where disabling separated loading caused all block CSS to load. From a3590ffd378f461d692ca73d9aaf4dfc6c5244fc Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 3 Oct 2024 14:17:35 +0900 Subject: [PATCH 28/83] Add pointer-events: none; --- src/blocks/_pro/fixed-display/style.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/blocks/_pro/fixed-display/style.scss b/src/blocks/_pro/fixed-display/style.scss index 4def4c1e2..8b692e546 100644 --- a/src/blocks/_pro/fixed-display/style.scss +++ b/src/blocks/_pro/fixed-display/style.scss @@ -23,6 +23,7 @@ &.is-timed-display { opacity: 0; transition: opacity 0.3s ease; + pointer-events: none; &.is-timed-visible { opacity: 1; From fedf6ea00b29ed452ed5699b69ab1428e6f09c88 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 3 Oct 2024 14:43:31 +0900 Subject: [PATCH 29/83] Fix: lavel --- src/blocks/_pro/fixed-display/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index 63e34a93e..e9df227ae 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -268,7 +268,7 @@ export default function FixedDisplayEdit(props) {

{__( - 'Since this block uses Session Storage, it may reappear after the browser is closed or in private browsing mode.', + 'Since this feature uses Session Storage, the content may reappear after closing the browser or in private browsing mode.', 'vk-blocks-pro' )}

From f11f8c0e16e9f501b4d1d3bf13a2cd21fc33c8f0 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 3 Oct 2024 14:44:02 +0900 Subject: [PATCH 30/83] Add translate --- languages/vk-blocks-pro-ja.po | 287 +++++++++++++++++++++------------ languages/vk-blocks-pro-js.pot | 246 +++++++++++++++++----------- languages/vk-blocks-pro.pot | 240 ++++++++++++++++----------- 3 files changed, 476 insertions(+), 297 deletions(-) diff --git a/languages/vk-blocks-pro-ja.po b/languages/vk-blocks-pro-ja.po index abb175a73..83d21999d 100644 --- a/languages/vk-blocks-pro-ja.po +++ b/languages/vk-blocks-pro-ja.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: VK Blocks Pro\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/vk-blocks-pro\n" -"POT-Creation-Date: 2024-09-26T00:53:29+00:00\n" +"POT-Creation-Date: 2024-10-03T05:42:00+00:00\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -992,7 +992,7 @@ msgstr "" #: src/blocks/_pro/card-item/deprecated/0.20.6/component.js:206 #: src/blocks/_pro/card-item/deprecated/0.60.1/component.js:210 #: src/blocks/_pro/card-item/edit.js:182 src/blocks/_pro/card/edit.js:134 -#: src/blocks/_pro/icon-card/edit.js:75 src/blocks/_pro/post-list/edit.js:407 +#: src/blocks/_pro/icon-card/edit.js:75 src/blocks/_pro/post-list/edit.js:442 msgid "Title" msgstr "タイトル" @@ -1099,7 +1099,7 @@ msgstr "該当する子ページがありません。" msgid "Check your settings from the settings sidebar." msgstr "設定サイドバーから設定を確認してください。" -#: src/blocks/_pro/child-page/edit.js:115 src/blocks/_pro/post-list/edit.js:275 +#: src/blocks/_pro/child-page/edit.js:115 src/blocks/_pro/post-list/edit.js:310 msgid "Display conditions" msgstr "表示条件" @@ -1107,7 +1107,7 @@ msgstr "表示条件" msgid "Parent" msgstr "親ページ" -#: src/blocks/_pro/child-page/edit.js:134 src/blocks/_pro/post-list/edit.js:445 +#: src/blocks/_pro/child-page/edit.js:134 src/blocks/_pro/post-list/edit.js:480 msgid "Ignore this post" msgstr "この投稿を除く" @@ -1237,7 +1237,7 @@ msgid "Setting up a link" msgstr "リンクの設定" #: src/blocks/_pro/dynamic-text/edit.js:389 -#: src/blocks/_pro/gridcolcard-item/edit.js:348 +#: src/blocks/_pro/gridcolcard-item/edit.js:346 #: src/blocks/_pro/icon-card-item/edit.js:128 src/blocks/button/edit.js:283 #: src/blocks/icon/edit.js:292 src/blocks/pr-blocks/edit.js:262 #: src/blocks/pr-content/edit.js:131 src/components/link-toolbar/index.js:279 @@ -1285,84 +1285,126 @@ msgstr "p" msgid "span" msgstr "span" -#: src/blocks/_pro/fixed-display/edit.js:100 +#: src/blocks/_pro/fixed-display/edit.js:103 +msgid "Always Visible" +msgstr "常に表示" + +#: src/blocks/_pro/fixed-display/edit.js:107 +msgid "Show on Scroll" +msgstr "スクロールしたら表示" + +#: src/blocks/_pro/fixed-display/edit.js:113 +msgid "Fixed position" +msgstr "固定位置" + +#: src/blocks/_pro/fixed-display/edit.js:117 msgid "Top" msgstr "上 " -#: src/blocks/_pro/fixed-display/edit.js:102 src/blocks/balloon/edit.js:434 +#: src/blocks/_pro/fixed-display/edit.js:119 src/blocks/balloon/edit.js:434 #: src/blocks/button/edit.js:375 src/blocks/pr-content/edit.js:252 #: src/components/display-items-control/index.js:140 msgid "Right" msgstr "右" -#: src/blocks/_pro/fixed-display/edit.js:106 +#: src/blocks/_pro/fixed-display/edit.js:123 msgid "Bottom" msgstr "下 " -#: src/blocks/_pro/fixed-display/edit.js:110 src/blocks/balloon/edit.js:422 +#: src/blocks/_pro/fixed-display/edit.js:127 src/blocks/balloon/edit.js:422 #: src/blocks/button/edit.js:355 src/blocks/pr-content/edit.js:256 #: src/components/display-items-control/index.js:132 msgid "Left" msgstr "左" -#: src/blocks/_pro/fixed-display/edit.js:118 +#: src/blocks/_pro/fixed-display/edit.js:135 msgid "Fixed position origin" msgstr "固定位置の基準" -#: src/blocks/_pro/fixed-display/edit.js:125 +#: src/blocks/_pro/fixed-display/edit.js:142 msgid "Top section" msgstr "上部" -#: src/blocks/_pro/fixed-display/edit.js:132 +#: src/blocks/_pro/fixed-display/edit.js:149 msgid "Bottom section" msgstr "下部" -#: src/blocks/_pro/fixed-display/edit.js:146 +#: src/blocks/_pro/fixed-display/edit.js:163 msgid "Fixed position from the top" msgstr "上部からの固定位置" -#: src/blocks/_pro/fixed-display/edit.js:150 +#: src/blocks/_pro/fixed-display/edit.js:167 msgid "Fixed position from the bottom" msgstr "下部からの固定位置" -#: src/blocks/_pro/fixed-display/edit.js:174 +#: src/blocks/_pro/fixed-display/edit.js:191 +msgid "Scroll Display Settings" +msgstr "スクロール表示設定" + +#: src/blocks/_pro/fixed-display/edit.js:194 msgid "Timing to display" msgstr "表示するタイミング" -#: src/blocks/_pro/fixed-display/edit.js:190 +#: src/blocks/_pro/fixed-display/edit.js:210 msgid "Persist visibility once visible" -msgstr "一度表示したら表示を維持する" +msgstr "一度表示したらその時の表示を維持する" + +#: src/blocks/_pro/fixed-display/edit.js:221 +msgid "Timer Settings" +msgstr "タイマー設定" + +#: src/blocks/_pro/fixed-display/edit.js:223 +msgid "Display after seconds" +msgstr "表示までの秒数" + +#: src/blocks/_pro/fixed-display/edit.js:235 +msgid "Hide after seconds" +msgstr "非表示までの秒数" + +#: src/blocks/_pro/fixed-display/edit.js:248 +msgid "" +"When combined with \"Show on Scroll\", you can set the time the block " +"remains visible after the user scrolls to a specific point, as well as when " +"it disappears." +msgstr "" +"“スクロールしたら表示”と組み合わせると、ユーザーがスクロールして特定のポイン" +"トに到達した後に、ブロックが表示される時間や、非表示になるタイミングを設定で" +"きます。" + +#: src/blocks/_pro/fixed-display/edit.js:256 +msgid "Visitor Return Settings" +msgstr "再訪問時の設定" + +#: src/blocks/_pro/fixed-display/edit.js:259 +msgid "Do not show again for returning visitors" +msgstr "再訪問者には表示しない" + +#: src/blocks/_pro/fixed-display/edit.js:270 +msgid "" +"Since this feature uses Session Storage, the content may reappear after " +"closing the browser or in private browsing mode." +msgstr "" +"この機能はSession Storageを使用しているため、ブラウザを閉じた後やプライベート" +"ブラウジングモードでは再度表示される場合があります。" -#: src/blocks/_pro/fixed-display/edit.js:71 -msgid "Fixed Display Setting" -msgstr "固定表示設定" +#: src/blocks/_pro/fixed-display/edit.js:87 +msgid "Fixed Display Settings" +msgstr "スクロール表示設定" -#: src/blocks/_pro/fixed-display/edit.js:74 +#: src/blocks/_pro/fixed-display/edit.js:91 msgid "" -"The fixed position of the fixed position block will not change on the edit " -"screen. Please check on the front screen." +"The fixed position of the block will not change on the edit screen. Please " +"check on the front screen." msgstr "" "編集画面では固定位置ブロックの固定位置は変わりません。フロント画面でご確認く" "ださい。" -#: src/blocks/_pro/fixed-display/edit.js:81 +#: src/blocks/_pro/fixed-display/edit.js:98 #: src/blocks/_pro/table-of-contents-new/edit.js:114 #: src/components/column-layout-control/index.js:69 msgid "Display type" msgstr "表示タイプ" -#: src/blocks/_pro/fixed-display/edit.js:86 -msgid "Always Visible" -msgstr "常に表示" - -#: src/blocks/_pro/fixed-display/edit.js:90 -msgid "Show on Scroll" -msgstr "スクロールしたら表示" - -#: src/blocks/_pro/fixed-display/edit.js:96 -msgid "Fixed position" -msgstr "固定位置" - #: src/blocks/_pro/grid-column-item/edit.js:100 #: src/blocks/_pro/gridcolcard/edit-common.js:164 msgid "Color Settings" @@ -1433,55 +1475,55 @@ msgstr "下部の余白" msgid "You can create a variety of layouts with grid column card blocks." msgstr "グリッドカラムカードブロックでは柔軟なレイアウトが可能です。" -#: src/blocks/_pro/gridcolcard-item/edit.js:244 +#: src/blocks/_pro/gridcolcard-item/edit.js:242 #: src/blocks/_pro/select-post-list-item/edit.js:66 #: src/blocks/button/edit.js:249 src/components/link-toolbar/index.js:238 msgid "Unlink" msgstr "リンクを解除する" -#: src/blocks/_pro/gridcolcard-item/edit.js:245 src/blocks/button/edit.js:250 +#: src/blocks/_pro/gridcolcard-item/edit.js:243 src/blocks/button/edit.js:250 #: src/components/link-toolbar/index.js:239 msgid "Input Link URL" msgstr "リンクURL" -#: src/blocks/_pro/gridcolcard-item/edit.js:275 +#: src/blocks/_pro/gridcolcard-item/edit.js:273 #: src/blocks/_pro/select-post-list-item/edit.js:102 #: src/blocks/button/edit.js:278 src/components/link-toolbar/index.js:273 msgid "Submit" msgstr "送信" -#: src/blocks/_pro/gridcolcard-item/edit.js:299 +#: src/blocks/_pro/gridcolcard-item/edit.js:297 msgid "Edit mode" msgstr "編集モード" -#: src/blocks/_pro/gridcolcard-item/edit.js:309 +#: src/blocks/_pro/gridcolcard-item/edit.js:307 msgid "All columns" msgstr "すべてのカラム" -#: src/blocks/_pro/gridcolcard-item/edit.js:317 +#: src/blocks/_pro/gridcolcard-item/edit.js:315 msgid "This column only" msgstr "このカラムのみ" -#: src/blocks/_pro/gridcolcard-item/edit.js:322 +#: src/blocks/_pro/gridcolcard-item/edit.js:320 msgid "Edit Lock" msgstr "編集ロック" -#: src/blocks/_pro/gridcolcard-item/edit.js:325 +#: src/blocks/_pro/gridcolcard-item/edit.js:323 msgid "Lock edits this block from the parent and other Grid Column Item block" msgstr "" "このブロックをロックして親ブロックや他のブロックの変更を受け取らないようにす" "る" -#: src/blocks/_pro/gridcolcard-item/edit.js:336 +#: src/blocks/_pro/gridcolcard-item/edit.js:334 msgid "Column Setting" msgstr "カラム設定" -#: src/blocks/_pro/gridcolcard-item/edit.js:340 +#: src/blocks/_pro/gridcolcard-item/edit.js:338 #: src/blocks/_pro/icon-card-item/edit.js:120 src/blocks/pr-blocks/edit.js:254 msgid "Link URL:" msgstr "リンク URL:" -#: src/blocks/_pro/gridcolcard-item/edit.js:355 +#: src/blocks/_pro/gridcolcard-item/edit.js:353 msgid "" "If you set a link URL, do not place the link element (text or button) in the " "Grid Column Card Item. It may not be displayed correctly." @@ -1489,7 +1531,7 @@ msgstr "" "リンクURLを設定する場合は、グリッドカラムカードアイテム内にリンク要素(テキス" "トやボタン)を配置しないでください。 正しく表示されない場合があります。" -#: src/blocks/_pro/gridcolcard-item/edit.js:359 +#: src/blocks/_pro/gridcolcard-item/edit.js:357 msgid "Make sure that no link is specified for the image block, etc." msgstr "画像ブロックなどにもリンクが指定されていないか注意してください。" @@ -1604,7 +1646,7 @@ msgstr "アイコンカード設定" #: src/blocks/_pro/step-item/edit.js:82 src/blocks/alert/edit.js:73 #: src/blocks/border-box/edit.js:272 src/blocks/button/edit.js:760 #: src/blocks/heading/edit.js:335 src/blocks/icon/edit.js:276 -#: src/blocks/pr-content/edit.js:212 +#: src/blocks/pr-content/edit.js:212 src/components/scroll-hint/index.js:103 #: src/extensions/common/custom-block-variation/block-variation-list/item/body-area/index.js:142 #: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:167 #: src/utils/font-awesome-new.js:189 @@ -1893,51 +1935,51 @@ msgstr "自動" msgid "Filter by %s" msgstr "%sで絞り込み" -#: src/blocks/_pro/post-list/edit.js:279 +#: src/blocks/_pro/post-list/edit.js:314 msgid "Filter by PostTypes" msgstr "投稿タイプ" -#: src/blocks/_pro/post-list/edit.js:292 +#: src/blocks/_pro/post-list/edit.js:327 msgid "Taxonomy filter condition" msgstr "分類絞り込み条件" -#: src/blocks/_pro/post-list/edit.js:303 +#: src/blocks/_pro/post-list/edit.js:338 msgid "OR ( Whichever apply )" msgstr "OR ( どれか )" -#: src/blocks/_pro/post-list/edit.js:313 +#: src/blocks/_pro/post-list/edit.js:348 msgid "AND ( All apply )" msgstr "AND ( すべて )" -#: src/blocks/_pro/post-list/edit.js:319 +#: src/blocks/_pro/post-list/edit.js:354 msgid "Number of Posts" msgstr "表示件数" -#: src/blocks/_pro/post-list/edit.js:332 +#: src/blocks/_pro/post-list/edit.js:367 msgid "Filter by Date" msgstr "日付で絞り込み" -#: src/blocks/_pro/post-list/edit.js:336 +#: src/blocks/_pro/post-list/edit.js:371 msgid "Period of Time" msgstr "期間" -#: src/blocks/_pro/post-list/edit.js:344 +#: src/blocks/_pro/post-list/edit.js:379 msgid "Whole Period" msgstr "全期間" -#: src/blocks/_pro/post-list/edit.js:348 +#: src/blocks/_pro/post-list/edit.js:383 msgid "From Today" msgstr "今日以降" -#: src/blocks/_pro/post-list/edit.js:352 +#: src/blocks/_pro/post-list/edit.js:387 msgid "From Now" msgstr "現在以降" -#: src/blocks/_pro/post-list/edit.js:356 +#: src/blocks/_pro/post-list/edit.js:391 msgid "From Tomorrow" msgstr "明日以降" -#: src/blocks/_pro/post-list/edit.js:361 +#: src/blocks/_pro/post-list/edit.js:396 msgid "" "* If you choose a future period, you will need to customize it so that " "future posts will be published immediately." @@ -1945,43 +1987,43 @@ msgstr "" "※ 未来の期間を選択する場合は、未来の投稿が即時公開になるように別途カスタマイ" "ズが必要です。" -#: src/blocks/_pro/post-list/edit.js:368 +#: src/blocks/_pro/post-list/edit.js:403 msgid "Order" msgstr "表示順" -#: src/blocks/_pro/post-list/edit.js:377 +#: src/blocks/_pro/post-list/edit.js:412 msgid "ASC" msgstr "昇順" -#: src/blocks/_pro/post-list/edit.js:381 +#: src/blocks/_pro/post-list/edit.js:416 msgid "DESC" msgstr "降順" -#: src/blocks/_pro/post-list/edit.js:387 +#: src/blocks/_pro/post-list/edit.js:422 msgid "Order by" msgstr "表示順" -#: src/blocks/_pro/post-list/edit.js:396 +#: src/blocks/_pro/post-list/edit.js:431 msgid "Published Date" msgstr "公開日" -#: src/blocks/_pro/post-list/edit.js:403 +#: src/blocks/_pro/post-list/edit.js:438 msgid "Modefied Date" msgstr "更新日" -#: src/blocks/_pro/post-list/edit.js:411 +#: src/blocks/_pro/post-list/edit.js:446 msgid "Random" msgstr "ランダム" -#: src/blocks/_pro/post-list/edit.js:417 +#: src/blocks/_pro/post-list/edit.js:452 msgid "offset" msgstr "オフセット数" -#: src/blocks/_pro/post-list/edit.js:433 +#: src/blocks/_pro/post-list/edit.js:468 msgid "Display from the first post always" msgstr "常に最初の投稿から表示する" -#: src/blocks/_pro/post-list/edit.js:439 +#: src/blocks/_pro/post-list/edit.js:474 msgid "Display from the first post even on pages beyond the second page." msgstr "2ページ目以降のページでも、常に最初の投稿から表示する。" @@ -2227,7 +2269,7 @@ msgstr "スタイル設定" msgid "Alert Style" msgstr "アラートスタイル" -#: src/blocks/alert/edit.js:53 src/blocks/alert/variations.js:13 +#: src/blocks/alert/edit.js:53 src/blocks/alert/variations.js:16 #: src/blocks/button/edit.js:692 src/blocks/pr-content/edit.js:171 #: inc/vk-blocks/class-vk-blocks-global-settings.php:476 msgid "Success" @@ -2239,51 +2281,51 @@ msgstr "Success" msgid "Info" msgstr "Info" -#: src/blocks/alert/edit.js:61 src/blocks/alert/variations.js:54 +#: src/blocks/alert/edit.js:61 src/blocks/alert/variations.js:57 #: src/blocks/button/edit.js:700 src/blocks/pr-content/edit.js:179 #: inc/vk-blocks/class-vk-blocks-global-settings.php:480 msgid "Warning" msgstr "Warning" -#: src/blocks/alert/edit.js:65 src/blocks/alert/variations.js:73 +#: src/blocks/alert/edit.js:65 src/blocks/alert/variations.js:76 #: src/blocks/button/edit.js:704 src/blocks/pr-content/edit.js:183 #: inc/vk-blocks/class-vk-blocks-global-settings.php:484 msgid "Danger" msgstr "Danger" -#: src/blocks/alert/variations.js:19 +#: src/blocks/alert/variations.js:10 +msgid "Alert Success" +msgstr "アラート Success" + +#: src/blocks/alert/variations.js:22 msgid "This is a success alert." msgstr "This is a success alert." -#: src/blocks/alert/variations.js:26 +#: src/blocks/alert/variations.js:29 msgid "Alert Info" msgstr "アラート Info" -#: src/blocks/alert/variations.js:32 +#: src/blocks/alert/variations.js:35 msgid "Information" msgstr "Information" -#: src/blocks/alert/variations.js:38 +#: src/blocks/alert/variations.js:41 msgid "This is a information alert." msgstr "This is a information alert." -#: src/blocks/alert/variations.js:48 +#: src/blocks/alert/variations.js:51 msgid "Alert Warning" msgstr "アラート Warning" -#: src/blocks/alert/variations.js:60 +#: src/blocks/alert/variations.js:63 msgid "This is a warning alert." msgstr "This is a warning alert." -#: src/blocks/alert/variations.js:67 +#: src/blocks/alert/variations.js:70 msgid "Alert Danger" msgstr "アラート Danger" -#: src/blocks/alert/variations.js:7 -msgid "Alert Success" -msgstr "アラート Success" - -#: src/blocks/alert/variations.js:79 +#: src/blocks/alert/variations.js:82 msgid "This is a danger alert." msgstr "This is a danger alert." @@ -2585,12 +2627,12 @@ msgstr "" "は、クリアボタンをクリックしてください。" #: src/blocks/button/edit.js:767 src/blocks/heading/edit.js:339 -#: src/blocks/pr-content/edit.js:219 +#: src/blocks/pr-content/edit.js:219 src/components/scroll-hint/index.js:115 msgid "Before text" msgstr "文字の前" #: src/blocks/button/edit.js:789 src/blocks/heading/edit.js:348 -#: src/blocks/pr-content/edit.js:231 +#: src/blocks/pr-content/edit.js:231 src/components/scroll-hint/index.js:137 msgid "After text" msgstr "文字の後" @@ -3293,6 +3335,24 @@ msgstr "リンクをコピー: %s" msgid "Copy link" msgstr "リンクをコピー" +#: src/components/scroll-hint/index.js:109 +msgid "Output Before Text Icon" +msgstr "" + +#: src/components/scroll-hint/index.js:131 +msgid "Output After Text Icon" +msgstr "" + +#: src/components/scroll-hint/index.js:91 +#, fuzzy +#| msgid "Show on Scroll" +msgid "Show Scroll Message" +msgstr "スクロールしたら表示" + +#: src/components/scroll-hint/index.js:98 +msgid "Scroll Message Text" +msgstr "" + #: src/extensions/common/custom-block-variation/block-variation-explorer/sidebar.js:17 msgid "Create" msgstr "作成" @@ -3630,37 +3690,36 @@ msgstr "グループリンク" msgid "List Icon Color" msgstr "リストアイコンの色" -#: src/extensions/core/table/style.js:106 +#: src/extensions/core/table/style.js:221 +msgid "Table Horizontal Scroll" +msgstr "テーブルの水平方向スクロール" + +#: src/extensions/core/table/style.js:229 +msgid "Scrollable" +msgstr "スクロール" + +#: src/extensions/core/table/style.js:236 msgid "Horizontal Scroll Breakpoint" msgstr "水平スクロールのブレイクポイント" -#: src/extensions/core/table/style.js:113 +#: src/extensions/core/table/style.js:243 msgid "Mobile size" msgstr "モバイル" -#: src/extensions/core/table/style.js:120 +#: src/extensions/core/table/style.js:250 msgid "Tablet size" msgstr "タブレット" -#: src/extensions/core/table/style.js:127 +#: src/extensions/core/table/style.js:257 msgid "PC size" msgstr "PC" -#: src/extensions/core/table/style.js:137 -msgid "" -"Table cells are no longer fixed width when horizontal scroll breakpoint is " -"reached." -msgstr "" -"水平スクロールのブレークポイントに達すると、テーブルセルの幅が固定されなくな" -"ります。" - -#: src/extensions/core/table/style.js:91 -msgid "Table Horizontal Scroll" -msgstr "テーブルの水平方向スクロール" - -#: src/extensions/core/table/style.js:99 -msgid "Scrollable" -msgstr "スクロール" +#: src/extensions/core/table/style.js:41 +#: inc/vk-blocks/view/class-vk-blocks-scrollhintrenderer.php:72 +#, fuzzy +#| msgid "Show on Scroll" +msgid "You can scroll" +msgstr "スクロールしたら表示" #: src/utils/example-data.js:14 msgid "Theoretical Physicist" @@ -4982,6 +5041,20 @@ msgid "" "explaining the order." msgstr "順番を説明する時に便利でシンプルなスケジュールなどを表示します。" +#~ msgid "" +#~ "In private browsing mode or environments where certain features are " +#~ "disabled, this block may appear again on future visits." +#~ msgstr "" +#~ "プライベートブラウジングモードや、一部の機能が無効化されている環境では、こ" +#~ "のブロックが再訪問時に再度表示されることがあります。" + +#~ msgid "" +#~ "Table cells are no longer fixed width when horizontal scroll breakpoint " +#~ "is reached." +#~ msgstr "" +#~ "水平スクロールのブレークポイントに達すると、テーブルセルの幅が固定されなく" +#~ "なります。" + #~ msgid "Full Wide" #~ msgstr "全幅" diff --git a/languages/vk-blocks-pro-js.pot b/languages/vk-blocks-pro-js.pot index d1bbcdaf4..2d915ca5c 100644 --- a/languages/vk-blocks-pro-js.pot +++ b/languages/vk-blocks-pro-js.pot @@ -1002,7 +1002,7 @@ msgstr "" #: src/blocks/_pro/card-item/edit.js:182 #: src/blocks/_pro/card/edit.js:134 #: src/blocks/_pro/icon-card/edit.js:75 -#: src/blocks/_pro/post-list/edit.js:407 +#: src/blocks/_pro/post-list/edit.js:442 msgid "Title" msgstr "" @@ -1111,7 +1111,7 @@ msgid "Check your settings from the settings sidebar." msgstr "" #: src/blocks/_pro/child-page/edit.js:115 -#: src/blocks/_pro/post-list/edit.js:275 +#: src/blocks/_pro/post-list/edit.js:310 msgid "Display conditions" msgstr "" @@ -1120,7 +1120,7 @@ msgid "Parent" msgstr "" #: src/blocks/_pro/child-page/edit.js:134 -#: src/blocks/_pro/post-list/edit.js:445 +#: src/blocks/_pro/post-list/edit.js:480 msgid "Ignore this post" msgstr "" @@ -1247,7 +1247,7 @@ msgid "Setting up a link" msgstr "" #: src/blocks/_pro/dynamic-text/edit.js:389 -#: src/blocks/_pro/gridcolcard-item/edit.js:348 +#: src/blocks/_pro/gridcolcard-item/edit.js:346 #: src/blocks/_pro/icon-card-item/edit.js:128 #: src/blocks/button/edit.js:283 #: src/blocks/icon/edit.js:292 @@ -1298,11 +1298,23 @@ msgstr "" msgid "span" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:100 +#: src/blocks/_pro/fixed-display/edit.js:103 +msgid "Always Visible" +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:107 +msgid "Show on Scroll" +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:113 +msgid "Fixed position" +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:117 msgid "Top" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:102 +#: src/blocks/_pro/fixed-display/edit.js:119 #: src/blocks/balloon/edit.js:434 #: src/blocks/button/edit.js:375 #: src/blocks/pr-content/edit.js:252 @@ -1310,11 +1322,11 @@ msgstr "" msgid "Right" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:106 +#: src/blocks/_pro/fixed-display/edit.js:123 msgid "Bottom" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:110 +#: src/blocks/_pro/fixed-display/edit.js:127 #: src/blocks/balloon/edit.js:422 #: src/blocks/button/edit.js:355 #: src/blocks/pr-content/edit.js:256 @@ -1322,60 +1334,85 @@ msgstr "" msgid "Left" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:118 +#: src/blocks/_pro/fixed-display/edit.js:135 msgid "Fixed position origin" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:125 +#: src/blocks/_pro/fixed-display/edit.js:142 msgid "Top section" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:132 +#: src/blocks/_pro/fixed-display/edit.js:149 msgid "Bottom section" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:146 +#: src/blocks/_pro/fixed-display/edit.js:163 msgid "Fixed position from the top" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:150 +#: src/blocks/_pro/fixed-display/edit.js:167 msgid "Fixed position from the bottom" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:174 +#: src/blocks/_pro/fixed-display/edit.js:191 +msgid "Scroll Display Settings" +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:194 msgid "Timing to display" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:190 +#: src/blocks/_pro/fixed-display/edit.js:210 msgid "Persist visibility once visible" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:71 -msgid "Fixed Display Setting" +#: src/blocks/_pro/fixed-display/edit.js:221 +msgid "Timer Settings" +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:223 +msgid "Display after seconds" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:74 +#: src/blocks/_pro/fixed-display/edit.js:235 +msgid "Hide after seconds" +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:248 msgid "" -"The fixed position of the fixed position block will not change on the edit " -"screen. Please check on the front screen." +"When combined with \"Show on Scroll\", you can set the time the block " +"remains visible after the user scrolls to a specific point, as well as when " +"it disappears." msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:81 -#: src/blocks/_pro/table-of-contents-new/edit.js:114 -#: src/components/column-layout-control/index.js:69 -msgid "Display type" +#: src/blocks/_pro/fixed-display/edit.js:256 +msgid "Visitor Return Settings" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:86 -msgid "Always Visible" +#: src/blocks/_pro/fixed-display/edit.js:259 +msgid "Do not show again for returning visitors" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:90 -msgid "Show on Scroll" +#: src/blocks/_pro/fixed-display/edit.js:270 +msgid "" +"Since this feature uses Session Storage, the content may reappear after " +"closing the browser or in private browsing mode." msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:96 -msgid "Fixed position" +#: src/blocks/_pro/fixed-display/edit.js:87 +msgid "Fixed Display Settings" +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:91 +msgid "" +"The fixed position of the block will not change on the edit screen. Please " +"check on the front screen." +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:98 +#: src/blocks/_pro/table-of-contents-new/edit.js:114 +#: src/components/column-layout-control/index.js:69 +msgid "Display type" msgstr "" #: src/blocks/_pro/grid-column-item/edit.js:100 @@ -1456,63 +1493,63 @@ msgstr "" msgid "You can create a variety of layouts with grid column card blocks." msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:244 +#: src/blocks/_pro/gridcolcard-item/edit.js:242 #: src/blocks/_pro/select-post-list-item/edit.js:66 #: src/blocks/button/edit.js:249 #: src/components/link-toolbar/index.js:238 msgid "Unlink" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:245 +#: src/blocks/_pro/gridcolcard-item/edit.js:243 #: src/blocks/button/edit.js:250 #: src/components/link-toolbar/index.js:239 msgid "Input Link URL" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:275 +#: src/blocks/_pro/gridcolcard-item/edit.js:273 #: src/blocks/_pro/select-post-list-item/edit.js:102 #: src/blocks/button/edit.js:278 #: src/components/link-toolbar/index.js:273 msgid "Submit" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:299 +#: src/blocks/_pro/gridcolcard-item/edit.js:297 msgid "Edit mode" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:309 +#: src/blocks/_pro/gridcolcard-item/edit.js:307 msgid "All columns" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:317 +#: src/blocks/_pro/gridcolcard-item/edit.js:315 msgid "This column only" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:322 +#: src/blocks/_pro/gridcolcard-item/edit.js:320 msgid "Edit Lock" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:325 +#: src/blocks/_pro/gridcolcard-item/edit.js:323 msgid "Lock edits this block from the parent and other Grid Column Item block" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:336 +#: src/blocks/_pro/gridcolcard-item/edit.js:334 msgid "Column Setting" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:340 +#: src/blocks/_pro/gridcolcard-item/edit.js:338 #: src/blocks/_pro/icon-card-item/edit.js:120 #: src/blocks/pr-blocks/edit.js:254 msgid "Link URL:" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:355 +#: src/blocks/_pro/gridcolcard-item/edit.js:353 msgid "" "If you set a link URL, do not place the link element (text or button) in " "the Grid Column Card Item. It may not be displayed correctly." msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:359 +#: src/blocks/_pro/gridcolcard-item/edit.js:357 msgid "Make sure that no link is specified for the image block, etc." msgstr "" @@ -1631,6 +1668,7 @@ msgstr "" #: src/blocks/heading/edit.js:335 #: src/blocks/icon/edit.js:276 #: src/blocks/pr-content/edit.js:212 +#: src/components/scroll-hint/index.js:103 #: src/extensions/common/custom-block-variation/block-variation-list/item/body-area/index.js:142 #: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:167 #: src/utils/font-awesome-new.js:189 @@ -1933,93 +1971,93 @@ msgstr "" msgid "Filter by %s" msgstr "" -#: src/blocks/_pro/post-list/edit.js:279 +#: src/blocks/_pro/post-list/edit.js:314 msgid "Filter by PostTypes" msgstr "" -#: src/blocks/_pro/post-list/edit.js:292 +#: src/blocks/_pro/post-list/edit.js:327 msgid "Taxonomy filter condition" msgstr "" -#: src/blocks/_pro/post-list/edit.js:303 +#: src/blocks/_pro/post-list/edit.js:338 msgid "OR ( Whichever apply )" msgstr "" -#: src/blocks/_pro/post-list/edit.js:313 +#: src/blocks/_pro/post-list/edit.js:348 msgid "AND ( All apply )" msgstr "" -#: src/blocks/_pro/post-list/edit.js:319 +#: src/blocks/_pro/post-list/edit.js:354 msgid "Number of Posts" msgstr "" -#: src/blocks/_pro/post-list/edit.js:332 +#: src/blocks/_pro/post-list/edit.js:367 msgid "Filter by Date" msgstr "" -#: src/blocks/_pro/post-list/edit.js:336 +#: src/blocks/_pro/post-list/edit.js:371 msgid "Period of Time" msgstr "" -#: src/blocks/_pro/post-list/edit.js:344 +#: src/blocks/_pro/post-list/edit.js:379 msgid "Whole Period" msgstr "" -#: src/blocks/_pro/post-list/edit.js:348 +#: src/blocks/_pro/post-list/edit.js:383 msgid "From Today" msgstr "" -#: src/blocks/_pro/post-list/edit.js:352 +#: src/blocks/_pro/post-list/edit.js:387 msgid "From Now" msgstr "" -#: src/blocks/_pro/post-list/edit.js:356 +#: src/blocks/_pro/post-list/edit.js:391 msgid "From Tomorrow" msgstr "" -#: src/blocks/_pro/post-list/edit.js:361 +#: src/blocks/_pro/post-list/edit.js:396 msgid "" "* If you choose a future period, you will need to customize it so that " "future posts will be published immediately." msgstr "" -#: src/blocks/_pro/post-list/edit.js:368 +#: src/blocks/_pro/post-list/edit.js:403 msgid "Order" msgstr "" -#: src/blocks/_pro/post-list/edit.js:377 +#: src/blocks/_pro/post-list/edit.js:412 msgid "ASC" msgstr "" -#: src/blocks/_pro/post-list/edit.js:381 +#: src/blocks/_pro/post-list/edit.js:416 msgid "DESC" msgstr "" -#: src/blocks/_pro/post-list/edit.js:387 +#: src/blocks/_pro/post-list/edit.js:422 msgid "Order by" msgstr "" -#: src/blocks/_pro/post-list/edit.js:396 +#: src/blocks/_pro/post-list/edit.js:431 msgid "Published Date" msgstr "" -#: src/blocks/_pro/post-list/edit.js:403 +#: src/blocks/_pro/post-list/edit.js:438 msgid "Modefied Date" msgstr "" -#: src/blocks/_pro/post-list/edit.js:411 +#: src/blocks/_pro/post-list/edit.js:446 msgid "Random" msgstr "" -#: src/blocks/_pro/post-list/edit.js:417 +#: src/blocks/_pro/post-list/edit.js:452 msgid "offset" msgstr "" -#: src/blocks/_pro/post-list/edit.js:433 +#: src/blocks/_pro/post-list/edit.js:468 msgid "Display from the first post always" msgstr "" -#: src/blocks/_pro/post-list/edit.js:439 +#: src/blocks/_pro/post-list/edit.js:474 msgid "Display from the first post even on pages beyond the second page." msgstr "" @@ -2263,7 +2301,7 @@ msgid "Alert Style" msgstr "" #: src/blocks/alert/edit.js:53 -#: src/blocks/alert/variations.js:13 +#: src/blocks/alert/variations.js:16 #: src/blocks/button/edit.js:692 #: src/blocks/pr-content/edit.js:171 msgid "Success" @@ -2276,52 +2314,52 @@ msgid "Info" msgstr "" #: src/blocks/alert/edit.js:61 -#: src/blocks/alert/variations.js:54 +#: src/blocks/alert/variations.js:57 #: src/blocks/button/edit.js:700 #: src/blocks/pr-content/edit.js:179 msgid "Warning" msgstr "" #: src/blocks/alert/edit.js:65 -#: src/blocks/alert/variations.js:73 +#: src/blocks/alert/variations.js:76 #: src/blocks/button/edit.js:704 #: src/blocks/pr-content/edit.js:183 msgid "Danger" msgstr "" -#: src/blocks/alert/variations.js:19 +#: src/blocks/alert/variations.js:10 +msgid "Alert Success" +msgstr "" + +#: src/blocks/alert/variations.js:22 msgid "This is a success alert." msgstr "" -#: src/blocks/alert/variations.js:26 +#: src/blocks/alert/variations.js:29 msgid "Alert Info" msgstr "" -#: src/blocks/alert/variations.js:32 +#: src/blocks/alert/variations.js:35 msgid "Information" msgstr "" -#: src/blocks/alert/variations.js:38 +#: src/blocks/alert/variations.js:41 msgid "This is a information alert." msgstr "" -#: src/blocks/alert/variations.js:48 +#: src/blocks/alert/variations.js:51 msgid "Alert Warning" msgstr "" -#: src/blocks/alert/variations.js:60 +#: src/blocks/alert/variations.js:63 msgid "This is a warning alert." msgstr "" -#: src/blocks/alert/variations.js:67 +#: src/blocks/alert/variations.js:70 msgid "Alert Danger" msgstr "" -#: src/blocks/alert/variations.js:7 -msgid "Alert Success" -msgstr "" - -#: src/blocks/alert/variations.js:79 +#: src/blocks/alert/variations.js:82 msgid "This is a danger alert." msgstr "" @@ -2625,12 +2663,14 @@ msgstr "" #: src/blocks/button/edit.js:767 #: src/blocks/heading/edit.js:339 #: src/blocks/pr-content/edit.js:219 +#: src/components/scroll-hint/index.js:115 msgid "Before text" msgstr "" #: src/blocks/button/edit.js:789 #: src/blocks/heading/edit.js:348 #: src/blocks/pr-content/edit.js:231 +#: src/components/scroll-hint/index.js:137 msgid "After text" msgstr "" @@ -3335,6 +3375,22 @@ msgstr "" msgid "Copy link" msgstr "" +#: src/components/scroll-hint/index.js:109 +msgid "Output Before Text Icon" +msgstr "" + +#: src/components/scroll-hint/index.js:131 +msgid "Output After Text Icon" +msgstr "" + +#: src/components/scroll-hint/index.js:91 +msgid "Show Scroll Message" +msgstr "" + +#: src/components/scroll-hint/index.js:98 +msgid "Scroll Message Text" +msgstr "" + #: src/extensions/common/custom-block-variation/block-variation-explorer/sidebar.js:17 msgid "Create" msgstr "" @@ -3654,34 +3710,32 @@ msgstr "" msgid "List Icon Color" msgstr "" -#: src/extensions/core/table/style.js:106 -msgid "Horizontal Scroll Breakpoint" +#: src/extensions/core/table/style.js:221 +msgid "Table Horizontal Scroll" msgstr "" -#: src/extensions/core/table/style.js:113 -msgid "Mobile size" +#: src/extensions/core/table/style.js:229 +msgid "Scrollable" msgstr "" -#: src/extensions/core/table/style.js:120 -msgid "Tablet size" +#: src/extensions/core/table/style.js:236 +msgid "Horizontal Scroll Breakpoint" msgstr "" -#: src/extensions/core/table/style.js:127 -msgid "PC size" +#: src/extensions/core/table/style.js:243 +msgid "Mobile size" msgstr "" -#: src/extensions/core/table/style.js:137 -msgid "" -"Table cells are no longer fixed width when horizontal scroll breakpoint is " -"reached." +#: src/extensions/core/table/style.js:250 +msgid "Tablet size" msgstr "" -#: src/extensions/core/table/style.js:91 -msgid "Table Horizontal Scroll" +#: src/extensions/core/table/style.js:257 +msgid "PC size" msgstr "" -#: src/extensions/core/table/style.js:99 -msgid "Scrollable" +#: src/extensions/core/table/style.js:41 +msgid "You can scroll" msgstr "" #: src/utils/example-data.js:14 @@ -3791,4 +3845,4 @@ msgstr "" #: src/blocks/_pro/blog-card/edit/url-placeholder.js:49 msgctxt "button label" msgid "Convert to link" -msgstr "" +msgstr "" \ No newline at end of file diff --git a/languages/vk-blocks-pro.pot b/languages/vk-blocks-pro.pot index c40b968d9..c95e0c2a6 100644 --- a/languages/vk-blocks-pro.pot +++ b/languages/vk-blocks-pro.pot @@ -2,14 +2,14 @@ # This file is distributed under the same license as the VK Blocks Pro plugin. msgid "" msgstr "" -"Project-Id-Version: VK Blocks Pro 1.84.0.0\n" +"Project-Id-Version: VK Blocks Pro 1.85.1.1\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/vk-blocks-pro\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-09-26T00:56:51+00:00\n" +"POT-Creation-Date: 2024-10-03T05:42:48+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.10.0\n" "X-Domain: vk-blocks-pro\n" @@ -996,7 +996,7 @@ msgstr "" #: src/blocks/_pro/card-item/edit.js:182 #: src/blocks/_pro/card/edit.js:134 #: src/blocks/_pro/icon-card/edit.js:75 -#: src/blocks/_pro/post-list/edit.js:407 +#: src/blocks/_pro/post-list/edit.js:442 msgid "Title" msgstr "" @@ -1103,7 +1103,7 @@ msgid "Check your settings from the settings sidebar." msgstr "" #: src/blocks/_pro/child-page/edit.js:115 -#: src/blocks/_pro/post-list/edit.js:275 +#: src/blocks/_pro/post-list/edit.js:310 msgid "Display conditions" msgstr "" @@ -1112,7 +1112,7 @@ msgid "Parent" msgstr "" #: src/blocks/_pro/child-page/edit.js:134 -#: src/blocks/_pro/post-list/edit.js:445 +#: src/blocks/_pro/post-list/edit.js:480 msgid "Ignore this post" msgstr "" @@ -1239,7 +1239,7 @@ msgid "Setting up a link" msgstr "" #: src/blocks/_pro/dynamic-text/edit.js:389 -#: src/blocks/_pro/gridcolcard-item/edit.js:348 +#: src/blocks/_pro/gridcolcard-item/edit.js:346 #: src/blocks/_pro/icon-card-item/edit.js:128 #: src/blocks/button/edit.js:283 #: src/blocks/icon/edit.js:292 @@ -1290,11 +1290,23 @@ msgstr "" msgid "span" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:100 +#: src/blocks/_pro/fixed-display/edit.js:103 +msgid "Always Visible" +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:107 +msgid "Show on Scroll" +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:113 +msgid "Fixed position" +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:117 msgid "Top" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:102 +#: src/blocks/_pro/fixed-display/edit.js:119 #: src/blocks/balloon/edit.js:434 #: src/blocks/button/edit.js:375 #: src/blocks/pr-content/edit.js:252 @@ -1302,11 +1314,11 @@ msgstr "" msgid "Right" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:106 +#: src/blocks/_pro/fixed-display/edit.js:123 msgid "Bottom" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:110 +#: src/blocks/_pro/fixed-display/edit.js:127 #: src/blocks/balloon/edit.js:422 #: src/blocks/button/edit.js:355 #: src/blocks/pr-content/edit.js:256 @@ -1314,58 +1326,78 @@ msgstr "" msgid "Left" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:118 +#: src/blocks/_pro/fixed-display/edit.js:135 msgid "Fixed position origin" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:125 +#: src/blocks/_pro/fixed-display/edit.js:142 msgid "Top section" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:132 +#: src/blocks/_pro/fixed-display/edit.js:149 msgid "Bottom section" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:146 +#: src/blocks/_pro/fixed-display/edit.js:163 msgid "Fixed position from the top" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:150 +#: src/blocks/_pro/fixed-display/edit.js:167 msgid "Fixed position from the bottom" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:174 +#: src/blocks/_pro/fixed-display/edit.js:191 +msgid "Scroll Display Settings" +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:194 msgid "Timing to display" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:190 +#: src/blocks/_pro/fixed-display/edit.js:210 msgid "Persist visibility once visible" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:71 -msgid "Fixed Display Setting" +#: src/blocks/_pro/fixed-display/edit.js:221 +msgid "Timer Settings" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:74 -msgid "The fixed position of the fixed position block will not change on the edit screen. Please check on the front screen." +#: src/blocks/_pro/fixed-display/edit.js:223 +msgid "Display after seconds" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:81 -#: src/blocks/_pro/table-of-contents-new/edit.js:114 -#: src/components/column-layout-control/index.js:69 -msgid "Display type" +#: src/blocks/_pro/fixed-display/edit.js:235 +msgid "Hide after seconds" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:86 -msgid "Always Visible" +#: src/blocks/_pro/fixed-display/edit.js:248 +msgid "When combined with \"Show on Scroll\", you can set the time the block remains visible after the user scrolls to a specific point, as well as when it disappears." msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:90 -msgid "Show on Scroll" +#: src/blocks/_pro/fixed-display/edit.js:256 +msgid "Visitor Return Settings" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:96 -msgid "Fixed position" +#: src/blocks/_pro/fixed-display/edit.js:259 +msgid "Do not show again for returning visitors" +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:270 +msgid "Since this feature uses Session Storage, the content may reappear after closing the browser or in private browsing mode." +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:87 +msgid "Fixed Display Settings" +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:91 +msgid "The fixed position of the block will not change on the edit screen. Please check on the front screen." +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:98 +#: src/blocks/_pro/table-of-contents-new/edit.js:114 +#: src/components/column-layout-control/index.js:69 +msgid "Display type" msgstr "" #: src/blocks/_pro/grid-column-item/edit.js:100 @@ -1446,61 +1478,61 @@ msgstr "" msgid "You can create a variety of layouts with grid column card blocks." msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:244 +#: src/blocks/_pro/gridcolcard-item/edit.js:242 #: src/blocks/_pro/select-post-list-item/edit.js:66 #: src/blocks/button/edit.js:249 #: src/components/link-toolbar/index.js:238 msgid "Unlink" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:245 +#: src/blocks/_pro/gridcolcard-item/edit.js:243 #: src/blocks/button/edit.js:250 #: src/components/link-toolbar/index.js:239 msgid "Input Link URL" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:275 +#: src/blocks/_pro/gridcolcard-item/edit.js:273 #: src/blocks/_pro/select-post-list-item/edit.js:102 #: src/blocks/button/edit.js:278 #: src/components/link-toolbar/index.js:273 msgid "Submit" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:299 +#: src/blocks/_pro/gridcolcard-item/edit.js:297 msgid "Edit mode" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:309 +#: src/blocks/_pro/gridcolcard-item/edit.js:307 msgid "All columns" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:317 +#: src/blocks/_pro/gridcolcard-item/edit.js:315 msgid "This column only" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:322 +#: src/blocks/_pro/gridcolcard-item/edit.js:320 msgid "Edit Lock" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:325 +#: src/blocks/_pro/gridcolcard-item/edit.js:323 msgid "Lock edits this block from the parent and other Grid Column Item block" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:336 +#: src/blocks/_pro/gridcolcard-item/edit.js:334 msgid "Column Setting" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:340 +#: src/blocks/_pro/gridcolcard-item/edit.js:338 #: src/blocks/_pro/icon-card-item/edit.js:120 #: src/blocks/pr-blocks/edit.js:254 msgid "Link URL:" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:355 +#: src/blocks/_pro/gridcolcard-item/edit.js:353 msgid "If you set a link URL, do not place the link element (text or button) in the Grid Column Card Item. It may not be displayed correctly." msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:359 +#: src/blocks/_pro/gridcolcard-item/edit.js:357 msgid "Make sure that no link is specified for the image block, etc." msgstr "" @@ -1618,6 +1650,7 @@ msgstr "" #: src/blocks/heading/edit.js:335 #: src/blocks/icon/edit.js:276 #: src/blocks/pr-content/edit.js:212 +#: src/components/scroll-hint/index.js:103 #: src/extensions/common/custom-block-variation/block-variation-list/item/body-area/index.js:142 #: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:167 #: src/utils/font-awesome-new.js:189 @@ -1922,91 +1955,91 @@ msgstr "" msgid "Filter by %s" msgstr "" -#: src/blocks/_pro/post-list/edit.js:279 +#: src/blocks/_pro/post-list/edit.js:314 msgid "Filter by PostTypes" msgstr "" -#: src/blocks/_pro/post-list/edit.js:292 +#: src/blocks/_pro/post-list/edit.js:327 msgid "Taxonomy filter condition" msgstr "" -#: src/blocks/_pro/post-list/edit.js:303 +#: src/blocks/_pro/post-list/edit.js:338 msgid "OR ( Whichever apply )" msgstr "" -#: src/blocks/_pro/post-list/edit.js:313 +#: src/blocks/_pro/post-list/edit.js:348 msgid "AND ( All apply )" msgstr "" -#: src/blocks/_pro/post-list/edit.js:319 +#: src/blocks/_pro/post-list/edit.js:354 msgid "Number of Posts" msgstr "" -#: src/blocks/_pro/post-list/edit.js:332 +#: src/blocks/_pro/post-list/edit.js:367 msgid "Filter by Date" msgstr "" -#: src/blocks/_pro/post-list/edit.js:336 +#: src/blocks/_pro/post-list/edit.js:371 msgid "Period of Time" msgstr "" -#: src/blocks/_pro/post-list/edit.js:344 +#: src/blocks/_pro/post-list/edit.js:379 msgid "Whole Period" msgstr "" -#: src/blocks/_pro/post-list/edit.js:348 +#: src/blocks/_pro/post-list/edit.js:383 msgid "From Today" msgstr "" -#: src/blocks/_pro/post-list/edit.js:352 +#: src/blocks/_pro/post-list/edit.js:387 msgid "From Now" msgstr "" -#: src/blocks/_pro/post-list/edit.js:356 +#: src/blocks/_pro/post-list/edit.js:391 msgid "From Tomorrow" msgstr "" -#: src/blocks/_pro/post-list/edit.js:361 +#: src/blocks/_pro/post-list/edit.js:396 msgid "* If you choose a future period, you will need to customize it so that future posts will be published immediately." msgstr "" -#: src/blocks/_pro/post-list/edit.js:368 +#: src/blocks/_pro/post-list/edit.js:403 msgid "Order" msgstr "" -#: src/blocks/_pro/post-list/edit.js:377 +#: src/blocks/_pro/post-list/edit.js:412 msgid "ASC" msgstr "" -#: src/blocks/_pro/post-list/edit.js:381 +#: src/blocks/_pro/post-list/edit.js:416 msgid "DESC" msgstr "" -#: src/blocks/_pro/post-list/edit.js:387 +#: src/blocks/_pro/post-list/edit.js:422 msgid "Order by" msgstr "" -#: src/blocks/_pro/post-list/edit.js:396 +#: src/blocks/_pro/post-list/edit.js:431 msgid "Published Date" msgstr "" -#: src/blocks/_pro/post-list/edit.js:403 +#: src/blocks/_pro/post-list/edit.js:438 msgid "Modefied Date" msgstr "" -#: src/blocks/_pro/post-list/edit.js:411 +#: src/blocks/_pro/post-list/edit.js:446 msgid "Random" msgstr "" -#: src/blocks/_pro/post-list/edit.js:417 +#: src/blocks/_pro/post-list/edit.js:452 msgid "offset" msgstr "" -#: src/blocks/_pro/post-list/edit.js:433 +#: src/blocks/_pro/post-list/edit.js:468 msgid "Display from the first post always" msgstr "" -#: src/blocks/_pro/post-list/edit.js:439 +#: src/blocks/_pro/post-list/edit.js:474 msgid "Display from the first post even on pages beyond the second page." msgstr "" @@ -2246,7 +2279,7 @@ msgid "Alert Style" msgstr "" #: src/blocks/alert/edit.js:53 -#: src/blocks/alert/variations.js:13 +#: src/blocks/alert/variations.js:16 #: src/blocks/button/edit.js:692 #: src/blocks/pr-content/edit.js:171 #: inc/vk-blocks/class-vk-blocks-global-settings.php:476 @@ -2261,7 +2294,7 @@ msgid "Info" msgstr "" #: src/blocks/alert/edit.js:61 -#: src/blocks/alert/variations.js:54 +#: src/blocks/alert/variations.js:57 #: src/blocks/button/edit.js:700 #: src/blocks/pr-content/edit.js:179 #: inc/vk-blocks/class-vk-blocks-global-settings.php:480 @@ -2269,46 +2302,46 @@ msgid "Warning" msgstr "" #: src/blocks/alert/edit.js:65 -#: src/blocks/alert/variations.js:73 +#: src/blocks/alert/variations.js:76 #: src/blocks/button/edit.js:704 #: src/blocks/pr-content/edit.js:183 #: inc/vk-blocks/class-vk-blocks-global-settings.php:484 msgid "Danger" msgstr "" -#: src/blocks/alert/variations.js:19 +#: src/blocks/alert/variations.js:10 +msgid "Alert Success" +msgstr "" + +#: src/blocks/alert/variations.js:22 msgid "This is a success alert." msgstr "" -#: src/blocks/alert/variations.js:26 +#: src/blocks/alert/variations.js:29 msgid "Alert Info" msgstr "" -#: src/blocks/alert/variations.js:32 +#: src/blocks/alert/variations.js:35 msgid "Information" msgstr "" -#: src/blocks/alert/variations.js:38 +#: src/blocks/alert/variations.js:41 msgid "This is a information alert." msgstr "" -#: src/blocks/alert/variations.js:48 +#: src/blocks/alert/variations.js:51 msgid "Alert Warning" msgstr "" -#: src/blocks/alert/variations.js:60 +#: src/blocks/alert/variations.js:63 msgid "This is a warning alert." msgstr "" -#: src/blocks/alert/variations.js:67 +#: src/blocks/alert/variations.js:70 msgid "Alert Danger" msgstr "" -#: src/blocks/alert/variations.js:7 -msgid "Alert Success" -msgstr "" - -#: src/blocks/alert/variations.js:79 +#: src/blocks/alert/variations.js:82 msgid "This is a danger alert." msgstr "" @@ -2608,12 +2641,14 @@ msgstr "" #: src/blocks/button/edit.js:767 #: src/blocks/heading/edit.js:339 #: src/blocks/pr-content/edit.js:219 +#: src/components/scroll-hint/index.js:115 msgid "Before text" msgstr "" #: src/blocks/button/edit.js:789 #: src/blocks/heading/edit.js:348 #: src/blocks/pr-content/edit.js:231 +#: src/components/scroll-hint/index.js:137 msgid "After text" msgstr "" @@ -3300,6 +3335,22 @@ msgstr "" msgid "Copy link" msgstr "" +#: src/components/scroll-hint/index.js:109 +msgid "Output Before Text Icon" +msgstr "" + +#: src/components/scroll-hint/index.js:131 +msgid "Output After Text Icon" +msgstr "" + +#: src/components/scroll-hint/index.js:91 +msgid "Show Scroll Message" +msgstr "" + +#: src/components/scroll-hint/index.js:98 +msgid "Scroll Message Text" +msgstr "" + #: src/extensions/common/custom-block-variation/block-variation-explorer/sidebar.js:17 msgid "Create" msgstr "" @@ -3602,32 +3653,33 @@ msgstr "" msgid "List Icon Color" msgstr "" -#: src/extensions/core/table/style.js:106 -msgid "Horizontal Scroll Breakpoint" +#: src/extensions/core/table/style.js:221 +msgid "Table Horizontal Scroll" msgstr "" -#: src/extensions/core/table/style.js:113 -msgid "Mobile size" +#: src/extensions/core/table/style.js:229 +msgid "Scrollable" msgstr "" -#: src/extensions/core/table/style.js:120 -msgid "Tablet size" +#: src/extensions/core/table/style.js:236 +msgid "Horizontal Scroll Breakpoint" msgstr "" -#: src/extensions/core/table/style.js:127 -msgid "PC size" +#: src/extensions/core/table/style.js:243 +msgid "Mobile size" msgstr "" -#: src/extensions/core/table/style.js:137 -msgid "Table cells are no longer fixed width when horizontal scroll breakpoint is reached." +#: src/extensions/core/table/style.js:250 +msgid "Tablet size" msgstr "" -#: src/extensions/core/table/style.js:91 -msgid "Table Horizontal Scroll" +#: src/extensions/core/table/style.js:257 +msgid "PC size" msgstr "" -#: src/extensions/core/table/style.js:99 -msgid "Scrollable" +#: src/extensions/core/table/style.js:41 +#: inc/vk-blocks/view/class-vk-blocks-scrollhintrenderer.php:72 +msgid "You can scroll" msgstr "" #: src/utils/example-data.js:14 From dfe93805b443f3619250f0c1f704fcb4bd0ea67b Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 7 Oct 2024 09:59:42 +0900 Subject: [PATCH 31/83] Add: Toggle controls for 'Enable Display After Seconds' and 'Enable Hide After Seconds' settings --- src/blocks/_pro/fixed-display/edit.js | 82 ++++++++++++++++++++------- 1 file changed, 60 insertions(+), 22 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index e9df227ae..ea0d89ff2 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -219,30 +219,68 @@ export default function FixedDisplayEdit(props) {
)} - - setAttributes({ - displayAfterSeconds: parseFloat(value) || 0, - }) - } - type="number" - min="0" - step="0.1" + 0} + onChange={(value) => { + if (value) { + // ONにしたときにデフォルトの秒数を設定 + setAttributes({ displayAfterSeconds: 1 }); + } else { + // OFFにしたときに値を0にする + setAttributes({ displayAfterSeconds: 0 }); + } + }} /> - - setAttributes({ - hideAfterSeconds: parseFloat(value) || 0, - }) - } - type="number" - min="0" - step="0.1" + {displayAfterSeconds > 0 && ( + { + const parsedValue = parseFloat(value) || 0; + setAttributes({ + displayAfterSeconds: parsedValue, + }); + if (parsedValue === 0) { + // 0になったらトグルを自動的にOFFにする + setAttributes({ displayAfterSeconds: 0 }); + } + }} + type="number" + min="0" + step="0.1" + /> + )} + + 0} + onChange={(value) => { + if (value) { + setAttributes({ hideAfterSeconds: 1 }); + } else { + setAttributes({ hideAfterSeconds: 0 }); + } + }} /> + {hideAfterSeconds > 0 && ( + { + const parsedValue = parseFloat(value) || 0; + setAttributes({ + hideAfterSeconds: parsedValue, + }); + if (parsedValue === 0) { + setAttributes({ hideAfterSeconds: 0 }); + } + }} + type="number" + min="0" + step="0.1" + /> + )}

{__( From 3e438737b4969352e2f3f3c48dd49bd19ac19635 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 7 Oct 2024 10:12:44 +0900 Subject: [PATCH 32/83] Fix: text --- src/blocks/_pro/fixed-display/edit.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index ea0d89ff2..94834ca0e 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -220,7 +220,10 @@ export default function FixedDisplayEdit(props) { )} 0} onChange={(value) => { if (value) { @@ -291,11 +294,11 @@ export default function FixedDisplayEdit(props) {

{__( - 'Since this feature uses Session Storage, the content may reappear after closing the browser or in private browsing mode.', + 'When enabled, the same content will not be shown again until the visitor closes their browser.', 'vk-blocks-pro' )}

From a6ce3f75cb32f98370c50a52a0b4bc9fbec44912 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 7 Oct 2024 10:17:36 +0900 Subject: [PATCH 33/83] Build --- src/blocks/_pro/fixed-display/edit.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index 94834ca0e..cc95acd56 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -294,7 +294,10 @@ export default function FixedDisplayEdit(props) {
Date: Mon, 7 Oct 2024 10:18:11 +0900 Subject: [PATCH 34/83] Fix: translate --- languages/vk-blocks-pro-ja.po | 61 +++++++++++++++++++++++----------- languages/vk-blocks-pro-js.pot | 38 ++++++++++++--------- languages/vk-blocks-pro.pot | 40 +++++++++++++--------- 3 files changed, 88 insertions(+), 51 deletions(-) diff --git a/languages/vk-blocks-pro-ja.po b/languages/vk-blocks-pro-ja.po index 83d21999d..7524f6c18 100644 --- a/languages/vk-blocks-pro-ja.po +++ b/languages/vk-blocks-pro-ja.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: VK Blocks Pro\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/vk-blocks-pro\n" -"POT-Creation-Date: 2024-10-03T05:42:00+00:00\n" +"POT-Creation-Date: 2024-10-07T01:09:57+00:00\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -1354,14 +1354,22 @@ msgid "Timer Settings" msgstr "タイマー設定" #: src/blocks/_pro/fixed-display/edit.js:223 +msgid "Enable Display After Seconds" +msgstr "表示までの秒数を設定" + +#: src/blocks/_pro/fixed-display/edit.js:240 msgid "Display after seconds" msgstr "表示までの秒数" -#: src/blocks/_pro/fixed-display/edit.js:235 +#: src/blocks/_pro/fixed-display/edit.js:259 +msgid "Enable Hide After Seconds" +msgstr "非表示までの秒数を設定" + +#: src/blocks/_pro/fixed-display/edit.js:271 msgid "Hide after seconds" msgstr "非表示までの秒数" -#: src/blocks/_pro/fixed-display/edit.js:248 +#: src/blocks/_pro/fixed-display/edit.js:289 msgid "" "When combined with \"Show on Scroll\", you can set the time the block " "remains visible after the user scrolls to a specific point, as well as when " @@ -1371,21 +1379,21 @@ msgstr "" "トに到達した後に、ブロックが表示される時間や、非表示になるタイミングを設定で" "きます。" -#: src/blocks/_pro/fixed-display/edit.js:256 -msgid "Visitor Return Settings" -msgstr "再訪問時の設定" +#: src/blocks/_pro/fixed-display/edit.js:297 +msgid "Display Settings Until Browser is Closed" +msgstr "ブラウザを閉じるまでの表示設定" -#: src/blocks/_pro/fixed-display/edit.js:259 -msgid "Do not show again for returning visitors" -msgstr "再訪問者には表示しない" +#: src/blocks/_pro/fixed-display/edit.js:300 +msgid "Do not display again until the browser is closed" +msgstr "ブラウザを閉じるまで再表示しない" -#: src/blocks/_pro/fixed-display/edit.js:270 +#: src/blocks/_pro/fixed-display/edit.js:311 msgid "" -"Since this feature uses Session Storage, the content may reappear after " -"closing the browser or in private browsing mode." +"When enabled, the same content will not be shown again until the visitor " +"closes their browser." msgstr "" -"この機能はSession Storageを使用しているため、ブラウザを閉じた後やプライベート" -"ブラウジングモードでは再度表示される場合があります。" +"有効にすると、訪問者がブラウザを閉じるまで、同じコンテンツは再表示されませ" +"ん。" #: src/blocks/_pro/fixed-display/edit.js:87 msgid "Fixed Display Settings" @@ -3690,27 +3698,27 @@ msgstr "グループリンク" msgid "List Icon Color" msgstr "リストアイコンの色" -#: src/extensions/core/table/style.js:221 +#: src/extensions/core/table/style.js:226 msgid "Table Horizontal Scroll" msgstr "テーブルの水平方向スクロール" -#: src/extensions/core/table/style.js:229 +#: src/extensions/core/table/style.js:234 msgid "Scrollable" msgstr "スクロール" -#: src/extensions/core/table/style.js:236 +#: src/extensions/core/table/style.js:241 msgid "Horizontal Scroll Breakpoint" msgstr "水平スクロールのブレイクポイント" -#: src/extensions/core/table/style.js:243 +#: src/extensions/core/table/style.js:248 msgid "Mobile size" msgstr "モバイル" -#: src/extensions/core/table/style.js:250 +#: src/extensions/core/table/style.js:255 msgid "Tablet size" msgstr "タブレット" -#: src/extensions/core/table/style.js:257 +#: src/extensions/core/table/style.js:262 msgid "PC size" msgstr "PC" @@ -5041,6 +5049,19 @@ msgid "" "explaining the order." msgstr "順番を説明する時に便利でシンプルなスケジュールなどを表示します。" +#~ msgid "Visitor Return Settings" +#~ msgstr "再訪問時の設定" + +#~ msgid "Do not show again for returning visitors" +#~ msgstr "再訪問者には表示しない" + +#~ msgid "" +#~ "Since this feature uses Session Storage, the content may reappear after " +#~ "closing the browser or in private browsing mode." +#~ msgstr "" +#~ "この機能はSession Storageを使用しているため、ブラウザを閉じた後やプライ" +#~ "ベートブラウジングモードでは再度表示される場合があります。" + #~ msgid "" #~ "In private browsing mode or environments where certain features are " #~ "disabled, this block may appear again on future visits." diff --git a/languages/vk-blocks-pro-js.pot b/languages/vk-blocks-pro-js.pot index 2d915ca5c..d2dbf4158 100644 --- a/languages/vk-blocks-pro-js.pot +++ b/languages/vk-blocks-pro-js.pot @@ -1371,32 +1371,40 @@ msgid "Timer Settings" msgstr "" #: src/blocks/_pro/fixed-display/edit.js:223 +msgid "Enable Display After Seconds" +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:240 msgid "Display after seconds" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:235 +#: src/blocks/_pro/fixed-display/edit.js:259 +msgid "Enable Hide After Seconds" +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:271 msgid "Hide after seconds" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:248 +#: src/blocks/_pro/fixed-display/edit.js:289 msgid "" "When combined with \"Show on Scroll\", you can set the time the block " "remains visible after the user scrolls to a specific point, as well as when " "it disappears." msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:256 -msgid "Visitor Return Settings" +#: src/blocks/_pro/fixed-display/edit.js:297 +msgid "Display Settings Until Browser is Closed" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:259 -msgid "Do not show again for returning visitors" +#: src/blocks/_pro/fixed-display/edit.js:300 +msgid "Do not display again until the browser is closed" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:270 +#: src/blocks/_pro/fixed-display/edit.js:311 msgid "" -"Since this feature uses Session Storage, the content may reappear after " -"closing the browser or in private browsing mode." +"When enabled, the same content will not be shown again until the visitor " +"closes their browser." msgstr "" #: src/blocks/_pro/fixed-display/edit.js:87 @@ -3710,27 +3718,27 @@ msgstr "" msgid "List Icon Color" msgstr "" -#: src/extensions/core/table/style.js:221 +#: src/extensions/core/table/style.js:226 msgid "Table Horizontal Scroll" msgstr "" -#: src/extensions/core/table/style.js:229 +#: src/extensions/core/table/style.js:234 msgid "Scrollable" msgstr "" -#: src/extensions/core/table/style.js:236 +#: src/extensions/core/table/style.js:241 msgid "Horizontal Scroll Breakpoint" msgstr "" -#: src/extensions/core/table/style.js:243 +#: src/extensions/core/table/style.js:248 msgid "Mobile size" msgstr "" -#: src/extensions/core/table/style.js:250 +#: src/extensions/core/table/style.js:255 msgid "Tablet size" msgstr "" -#: src/extensions/core/table/style.js:257 +#: src/extensions/core/table/style.js:262 msgid "PC size" msgstr "" diff --git a/languages/vk-blocks-pro.pot b/languages/vk-blocks-pro.pot index c95e0c2a6..820852b94 100644 --- a/languages/vk-blocks-pro.pot +++ b/languages/vk-blocks-pro.pot @@ -2,14 +2,14 @@ # This file is distributed under the same license as the VK Blocks Pro plugin. msgid "" msgstr "" -"Project-Id-Version: VK Blocks Pro 1.85.1.1\n" +"Project-Id-Version: VK Blocks Pro 1.86.0.0\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/vk-blocks-pro\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-10-03T05:42:48+00:00\n" +"POT-Creation-Date: 2024-10-07T01:16:14+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.10.0\n" "X-Domain: vk-blocks-pro\n" @@ -1363,27 +1363,35 @@ msgid "Timer Settings" msgstr "" #: src/blocks/_pro/fixed-display/edit.js:223 +msgid "Enable Display After Seconds" +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:240 msgid "Display after seconds" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:235 +#: src/blocks/_pro/fixed-display/edit.js:259 +msgid "Enable Hide After Seconds" +msgstr "" + +#: src/blocks/_pro/fixed-display/edit.js:271 msgid "Hide after seconds" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:248 +#: src/blocks/_pro/fixed-display/edit.js:289 msgid "When combined with \"Show on Scroll\", you can set the time the block remains visible after the user scrolls to a specific point, as well as when it disappears." msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:256 -msgid "Visitor Return Settings" +#: src/blocks/_pro/fixed-display/edit.js:297 +msgid "Display Settings Until Browser is Closed" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:259 -msgid "Do not show again for returning visitors" +#: src/blocks/_pro/fixed-display/edit.js:300 +msgid "Do not display again until the browser is closed" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:270 -msgid "Since this feature uses Session Storage, the content may reappear after closing the browser or in private browsing mode." +#: src/blocks/_pro/fixed-display/edit.js:311 +msgid "When enabled, the same content will not be shown again until the visitor closes their browser." msgstr "" #: src/blocks/_pro/fixed-display/edit.js:87 @@ -3653,27 +3661,27 @@ msgstr "" msgid "List Icon Color" msgstr "" -#: src/extensions/core/table/style.js:221 +#: src/extensions/core/table/style.js:226 msgid "Table Horizontal Scroll" msgstr "" -#: src/extensions/core/table/style.js:229 +#: src/extensions/core/table/style.js:234 msgid "Scrollable" msgstr "" -#: src/extensions/core/table/style.js:236 +#: src/extensions/core/table/style.js:241 msgid "Horizontal Scroll Breakpoint" msgstr "" -#: src/extensions/core/table/style.js:243 +#: src/extensions/core/table/style.js:248 msgid "Mobile size" msgstr "" -#: src/extensions/core/table/style.js:250 +#: src/extensions/core/table/style.js:255 msgid "Tablet size" msgstr "" -#: src/extensions/core/table/style.js:257 +#: src/extensions/core/table/style.js:262 msgid "PC size" msgstr "" From 4645a9b0132aff911c27954013c29ed3a1a85759 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 8 Oct 2024 09:27:57 +0900 Subject: [PATCH 35/83] Revert changes for language files to before commit f11f8c0e16e9f501b4d1d3bf13a2cd21fc33c8f --- languages/vk-blocks-pro-ja.po | 308 ++++++++++++--------------------- languages/vk-blocks-pro-js.pot | 254 ++++++++++----------------- languages/vk-blocks-pro.pot | 248 ++++++++++---------------- 3 files changed, 297 insertions(+), 513 deletions(-) diff --git a/languages/vk-blocks-pro-ja.po b/languages/vk-blocks-pro-ja.po index 7524f6c18..abb175a73 100644 --- a/languages/vk-blocks-pro-ja.po +++ b/languages/vk-blocks-pro-ja.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: VK Blocks Pro\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/vk-blocks-pro\n" -"POT-Creation-Date: 2024-10-07T01:09:57+00:00\n" +"POT-Creation-Date: 2024-09-26T00:53:29+00:00\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -992,7 +992,7 @@ msgstr "" #: src/blocks/_pro/card-item/deprecated/0.20.6/component.js:206 #: src/blocks/_pro/card-item/deprecated/0.60.1/component.js:210 #: src/blocks/_pro/card-item/edit.js:182 src/blocks/_pro/card/edit.js:134 -#: src/blocks/_pro/icon-card/edit.js:75 src/blocks/_pro/post-list/edit.js:442 +#: src/blocks/_pro/icon-card/edit.js:75 src/blocks/_pro/post-list/edit.js:407 msgid "Title" msgstr "タイトル" @@ -1099,7 +1099,7 @@ msgstr "該当する子ページがありません。" msgid "Check your settings from the settings sidebar." msgstr "設定サイドバーから設定を確認してください。" -#: src/blocks/_pro/child-page/edit.js:115 src/blocks/_pro/post-list/edit.js:310 +#: src/blocks/_pro/child-page/edit.js:115 src/blocks/_pro/post-list/edit.js:275 msgid "Display conditions" msgstr "表示条件" @@ -1107,7 +1107,7 @@ msgstr "表示条件" msgid "Parent" msgstr "親ページ" -#: src/blocks/_pro/child-page/edit.js:134 src/blocks/_pro/post-list/edit.js:480 +#: src/blocks/_pro/child-page/edit.js:134 src/blocks/_pro/post-list/edit.js:445 msgid "Ignore this post" msgstr "この投稿を除く" @@ -1237,7 +1237,7 @@ msgid "Setting up a link" msgstr "リンクの設定" #: src/blocks/_pro/dynamic-text/edit.js:389 -#: src/blocks/_pro/gridcolcard-item/edit.js:346 +#: src/blocks/_pro/gridcolcard-item/edit.js:348 #: src/blocks/_pro/icon-card-item/edit.js:128 src/blocks/button/edit.js:283 #: src/blocks/icon/edit.js:292 src/blocks/pr-blocks/edit.js:262 #: src/blocks/pr-content/edit.js:131 src/components/link-toolbar/index.js:279 @@ -1285,134 +1285,84 @@ msgstr "p" msgid "span" msgstr "span" -#: src/blocks/_pro/fixed-display/edit.js:103 -msgid "Always Visible" -msgstr "常に表示" - -#: src/blocks/_pro/fixed-display/edit.js:107 -msgid "Show on Scroll" -msgstr "スクロールしたら表示" - -#: src/blocks/_pro/fixed-display/edit.js:113 -msgid "Fixed position" -msgstr "固定位置" - -#: src/blocks/_pro/fixed-display/edit.js:117 +#: src/blocks/_pro/fixed-display/edit.js:100 msgid "Top" msgstr "上 " -#: src/blocks/_pro/fixed-display/edit.js:119 src/blocks/balloon/edit.js:434 +#: src/blocks/_pro/fixed-display/edit.js:102 src/blocks/balloon/edit.js:434 #: src/blocks/button/edit.js:375 src/blocks/pr-content/edit.js:252 #: src/components/display-items-control/index.js:140 msgid "Right" msgstr "右" -#: src/blocks/_pro/fixed-display/edit.js:123 +#: src/blocks/_pro/fixed-display/edit.js:106 msgid "Bottom" msgstr "下 " -#: src/blocks/_pro/fixed-display/edit.js:127 src/blocks/balloon/edit.js:422 +#: src/blocks/_pro/fixed-display/edit.js:110 src/blocks/balloon/edit.js:422 #: src/blocks/button/edit.js:355 src/blocks/pr-content/edit.js:256 #: src/components/display-items-control/index.js:132 msgid "Left" msgstr "左" -#: src/blocks/_pro/fixed-display/edit.js:135 +#: src/blocks/_pro/fixed-display/edit.js:118 msgid "Fixed position origin" msgstr "固定位置の基準" -#: src/blocks/_pro/fixed-display/edit.js:142 +#: src/blocks/_pro/fixed-display/edit.js:125 msgid "Top section" msgstr "上部" -#: src/blocks/_pro/fixed-display/edit.js:149 +#: src/blocks/_pro/fixed-display/edit.js:132 msgid "Bottom section" msgstr "下部" -#: src/blocks/_pro/fixed-display/edit.js:163 +#: src/blocks/_pro/fixed-display/edit.js:146 msgid "Fixed position from the top" msgstr "上部からの固定位置" -#: src/blocks/_pro/fixed-display/edit.js:167 +#: src/blocks/_pro/fixed-display/edit.js:150 msgid "Fixed position from the bottom" msgstr "下部からの固定位置" -#: src/blocks/_pro/fixed-display/edit.js:191 -msgid "Scroll Display Settings" -msgstr "スクロール表示設定" - -#: src/blocks/_pro/fixed-display/edit.js:194 +#: src/blocks/_pro/fixed-display/edit.js:174 msgid "Timing to display" msgstr "表示するタイミング" -#: src/blocks/_pro/fixed-display/edit.js:210 +#: src/blocks/_pro/fixed-display/edit.js:190 msgid "Persist visibility once visible" -msgstr "一度表示したらその時の表示を維持する" - -#: src/blocks/_pro/fixed-display/edit.js:221 -msgid "Timer Settings" -msgstr "タイマー設定" +msgstr "一度表示したら表示を維持する" -#: src/blocks/_pro/fixed-display/edit.js:223 -msgid "Enable Display After Seconds" -msgstr "表示までの秒数を設定" +#: src/blocks/_pro/fixed-display/edit.js:71 +msgid "Fixed Display Setting" +msgstr "固定表示設定" -#: src/blocks/_pro/fixed-display/edit.js:240 -msgid "Display after seconds" -msgstr "表示までの秒数" - -#: src/blocks/_pro/fixed-display/edit.js:259 -msgid "Enable Hide After Seconds" -msgstr "非表示までの秒数を設定" - -#: src/blocks/_pro/fixed-display/edit.js:271 -msgid "Hide after seconds" -msgstr "非表示までの秒数" - -#: src/blocks/_pro/fixed-display/edit.js:289 -msgid "" -"When combined with \"Show on Scroll\", you can set the time the block " -"remains visible after the user scrolls to a specific point, as well as when " -"it disappears." -msgstr "" -"“スクロールしたら表示”と組み合わせると、ユーザーがスクロールして特定のポイン" -"トに到達した後に、ブロックが表示される時間や、非表示になるタイミングを設定で" -"きます。" - -#: src/blocks/_pro/fixed-display/edit.js:297 -msgid "Display Settings Until Browser is Closed" -msgstr "ブラウザを閉じるまでの表示設定" - -#: src/blocks/_pro/fixed-display/edit.js:300 -msgid "Do not display again until the browser is closed" -msgstr "ブラウザを閉じるまで再表示しない" - -#: src/blocks/_pro/fixed-display/edit.js:311 +#: src/blocks/_pro/fixed-display/edit.js:74 msgid "" -"When enabled, the same content will not be shown again until the visitor " -"closes their browser." -msgstr "" -"有効にすると、訪問者がブラウザを閉じるまで、同じコンテンツは再表示されませ" -"ん。" - -#: src/blocks/_pro/fixed-display/edit.js:87 -msgid "Fixed Display Settings" -msgstr "スクロール表示設定" - -#: src/blocks/_pro/fixed-display/edit.js:91 -msgid "" -"The fixed position of the block will not change on the edit screen. Please " -"check on the front screen." +"The fixed position of the fixed position block will not change on the edit " +"screen. Please check on the front screen." msgstr "" "編集画面では固定位置ブロックの固定位置は変わりません。フロント画面でご確認く" "ださい。" -#: src/blocks/_pro/fixed-display/edit.js:98 +#: src/blocks/_pro/fixed-display/edit.js:81 #: src/blocks/_pro/table-of-contents-new/edit.js:114 #: src/components/column-layout-control/index.js:69 msgid "Display type" msgstr "表示タイプ" +#: src/blocks/_pro/fixed-display/edit.js:86 +msgid "Always Visible" +msgstr "常に表示" + +#: src/blocks/_pro/fixed-display/edit.js:90 +msgid "Show on Scroll" +msgstr "スクロールしたら表示" + +#: src/blocks/_pro/fixed-display/edit.js:96 +msgid "Fixed position" +msgstr "固定位置" + #: src/blocks/_pro/grid-column-item/edit.js:100 #: src/blocks/_pro/gridcolcard/edit-common.js:164 msgid "Color Settings" @@ -1483,55 +1433,55 @@ msgstr "下部の余白" msgid "You can create a variety of layouts with grid column card blocks." msgstr "グリッドカラムカードブロックでは柔軟なレイアウトが可能です。" -#: src/blocks/_pro/gridcolcard-item/edit.js:242 +#: src/blocks/_pro/gridcolcard-item/edit.js:244 #: src/blocks/_pro/select-post-list-item/edit.js:66 #: src/blocks/button/edit.js:249 src/components/link-toolbar/index.js:238 msgid "Unlink" msgstr "リンクを解除する" -#: src/blocks/_pro/gridcolcard-item/edit.js:243 src/blocks/button/edit.js:250 +#: src/blocks/_pro/gridcolcard-item/edit.js:245 src/blocks/button/edit.js:250 #: src/components/link-toolbar/index.js:239 msgid "Input Link URL" msgstr "リンクURL" -#: src/blocks/_pro/gridcolcard-item/edit.js:273 +#: src/blocks/_pro/gridcolcard-item/edit.js:275 #: src/blocks/_pro/select-post-list-item/edit.js:102 #: src/blocks/button/edit.js:278 src/components/link-toolbar/index.js:273 msgid "Submit" msgstr "送信" -#: src/blocks/_pro/gridcolcard-item/edit.js:297 +#: src/blocks/_pro/gridcolcard-item/edit.js:299 msgid "Edit mode" msgstr "編集モード" -#: src/blocks/_pro/gridcolcard-item/edit.js:307 +#: src/blocks/_pro/gridcolcard-item/edit.js:309 msgid "All columns" msgstr "すべてのカラム" -#: src/blocks/_pro/gridcolcard-item/edit.js:315 +#: src/blocks/_pro/gridcolcard-item/edit.js:317 msgid "This column only" msgstr "このカラムのみ" -#: src/blocks/_pro/gridcolcard-item/edit.js:320 +#: src/blocks/_pro/gridcolcard-item/edit.js:322 msgid "Edit Lock" msgstr "編集ロック" -#: src/blocks/_pro/gridcolcard-item/edit.js:323 +#: src/blocks/_pro/gridcolcard-item/edit.js:325 msgid "Lock edits this block from the parent and other Grid Column Item block" msgstr "" "このブロックをロックして親ブロックや他のブロックの変更を受け取らないようにす" "る" -#: src/blocks/_pro/gridcolcard-item/edit.js:334 +#: src/blocks/_pro/gridcolcard-item/edit.js:336 msgid "Column Setting" msgstr "カラム設定" -#: src/blocks/_pro/gridcolcard-item/edit.js:338 +#: src/blocks/_pro/gridcolcard-item/edit.js:340 #: src/blocks/_pro/icon-card-item/edit.js:120 src/blocks/pr-blocks/edit.js:254 msgid "Link URL:" msgstr "リンク URL:" -#: src/blocks/_pro/gridcolcard-item/edit.js:353 +#: src/blocks/_pro/gridcolcard-item/edit.js:355 msgid "" "If you set a link URL, do not place the link element (text or button) in the " "Grid Column Card Item. It may not be displayed correctly." @@ -1539,7 +1489,7 @@ msgstr "" "リンクURLを設定する場合は、グリッドカラムカードアイテム内にリンク要素(テキス" "トやボタン)を配置しないでください。 正しく表示されない場合があります。" -#: src/blocks/_pro/gridcolcard-item/edit.js:357 +#: src/blocks/_pro/gridcolcard-item/edit.js:359 msgid "Make sure that no link is specified for the image block, etc." msgstr "画像ブロックなどにもリンクが指定されていないか注意してください。" @@ -1654,7 +1604,7 @@ msgstr "アイコンカード設定" #: src/blocks/_pro/step-item/edit.js:82 src/blocks/alert/edit.js:73 #: src/blocks/border-box/edit.js:272 src/blocks/button/edit.js:760 #: src/blocks/heading/edit.js:335 src/blocks/icon/edit.js:276 -#: src/blocks/pr-content/edit.js:212 src/components/scroll-hint/index.js:103 +#: src/blocks/pr-content/edit.js:212 #: src/extensions/common/custom-block-variation/block-variation-list/item/body-area/index.js:142 #: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:167 #: src/utils/font-awesome-new.js:189 @@ -1943,51 +1893,51 @@ msgstr "自動" msgid "Filter by %s" msgstr "%sで絞り込み" -#: src/blocks/_pro/post-list/edit.js:314 +#: src/blocks/_pro/post-list/edit.js:279 msgid "Filter by PostTypes" msgstr "投稿タイプ" -#: src/blocks/_pro/post-list/edit.js:327 +#: src/blocks/_pro/post-list/edit.js:292 msgid "Taxonomy filter condition" msgstr "分類絞り込み条件" -#: src/blocks/_pro/post-list/edit.js:338 +#: src/blocks/_pro/post-list/edit.js:303 msgid "OR ( Whichever apply )" msgstr "OR ( どれか )" -#: src/blocks/_pro/post-list/edit.js:348 +#: src/blocks/_pro/post-list/edit.js:313 msgid "AND ( All apply )" msgstr "AND ( すべて )" -#: src/blocks/_pro/post-list/edit.js:354 +#: src/blocks/_pro/post-list/edit.js:319 msgid "Number of Posts" msgstr "表示件数" -#: src/blocks/_pro/post-list/edit.js:367 +#: src/blocks/_pro/post-list/edit.js:332 msgid "Filter by Date" msgstr "日付で絞り込み" -#: src/blocks/_pro/post-list/edit.js:371 +#: src/blocks/_pro/post-list/edit.js:336 msgid "Period of Time" msgstr "期間" -#: src/blocks/_pro/post-list/edit.js:379 +#: src/blocks/_pro/post-list/edit.js:344 msgid "Whole Period" msgstr "全期間" -#: src/blocks/_pro/post-list/edit.js:383 +#: src/blocks/_pro/post-list/edit.js:348 msgid "From Today" msgstr "今日以降" -#: src/blocks/_pro/post-list/edit.js:387 +#: src/blocks/_pro/post-list/edit.js:352 msgid "From Now" msgstr "現在以降" -#: src/blocks/_pro/post-list/edit.js:391 +#: src/blocks/_pro/post-list/edit.js:356 msgid "From Tomorrow" msgstr "明日以降" -#: src/blocks/_pro/post-list/edit.js:396 +#: src/blocks/_pro/post-list/edit.js:361 msgid "" "* If you choose a future period, you will need to customize it so that " "future posts will be published immediately." @@ -1995,43 +1945,43 @@ msgstr "" "※ 未来の期間を選択する場合は、未来の投稿が即時公開になるように別途カスタマイ" "ズが必要です。" -#: src/blocks/_pro/post-list/edit.js:403 +#: src/blocks/_pro/post-list/edit.js:368 msgid "Order" msgstr "表示順" -#: src/blocks/_pro/post-list/edit.js:412 +#: src/blocks/_pro/post-list/edit.js:377 msgid "ASC" msgstr "昇順" -#: src/blocks/_pro/post-list/edit.js:416 +#: src/blocks/_pro/post-list/edit.js:381 msgid "DESC" msgstr "降順" -#: src/blocks/_pro/post-list/edit.js:422 +#: src/blocks/_pro/post-list/edit.js:387 msgid "Order by" msgstr "表示順" -#: src/blocks/_pro/post-list/edit.js:431 +#: src/blocks/_pro/post-list/edit.js:396 msgid "Published Date" msgstr "公開日" -#: src/blocks/_pro/post-list/edit.js:438 +#: src/blocks/_pro/post-list/edit.js:403 msgid "Modefied Date" msgstr "更新日" -#: src/blocks/_pro/post-list/edit.js:446 +#: src/blocks/_pro/post-list/edit.js:411 msgid "Random" msgstr "ランダム" -#: src/blocks/_pro/post-list/edit.js:452 +#: src/blocks/_pro/post-list/edit.js:417 msgid "offset" msgstr "オフセット数" -#: src/blocks/_pro/post-list/edit.js:468 +#: src/blocks/_pro/post-list/edit.js:433 msgid "Display from the first post always" msgstr "常に最初の投稿から表示する" -#: src/blocks/_pro/post-list/edit.js:474 +#: src/blocks/_pro/post-list/edit.js:439 msgid "Display from the first post even on pages beyond the second page." msgstr "2ページ目以降のページでも、常に最初の投稿から表示する。" @@ -2277,7 +2227,7 @@ msgstr "スタイル設定" msgid "Alert Style" msgstr "アラートスタイル" -#: src/blocks/alert/edit.js:53 src/blocks/alert/variations.js:16 +#: src/blocks/alert/edit.js:53 src/blocks/alert/variations.js:13 #: src/blocks/button/edit.js:692 src/blocks/pr-content/edit.js:171 #: inc/vk-blocks/class-vk-blocks-global-settings.php:476 msgid "Success" @@ -2289,51 +2239,51 @@ msgstr "Success" msgid "Info" msgstr "Info" -#: src/blocks/alert/edit.js:61 src/blocks/alert/variations.js:57 +#: src/blocks/alert/edit.js:61 src/blocks/alert/variations.js:54 #: src/blocks/button/edit.js:700 src/blocks/pr-content/edit.js:179 #: inc/vk-blocks/class-vk-blocks-global-settings.php:480 msgid "Warning" msgstr "Warning" -#: src/blocks/alert/edit.js:65 src/blocks/alert/variations.js:76 +#: src/blocks/alert/edit.js:65 src/blocks/alert/variations.js:73 #: src/blocks/button/edit.js:704 src/blocks/pr-content/edit.js:183 #: inc/vk-blocks/class-vk-blocks-global-settings.php:484 msgid "Danger" msgstr "Danger" -#: src/blocks/alert/variations.js:10 -msgid "Alert Success" -msgstr "アラート Success" - -#: src/blocks/alert/variations.js:22 +#: src/blocks/alert/variations.js:19 msgid "This is a success alert." msgstr "This is a success alert." -#: src/blocks/alert/variations.js:29 +#: src/blocks/alert/variations.js:26 msgid "Alert Info" msgstr "アラート Info" -#: src/blocks/alert/variations.js:35 +#: src/blocks/alert/variations.js:32 msgid "Information" msgstr "Information" -#: src/blocks/alert/variations.js:41 +#: src/blocks/alert/variations.js:38 msgid "This is a information alert." msgstr "This is a information alert." -#: src/blocks/alert/variations.js:51 +#: src/blocks/alert/variations.js:48 msgid "Alert Warning" msgstr "アラート Warning" -#: src/blocks/alert/variations.js:63 +#: src/blocks/alert/variations.js:60 msgid "This is a warning alert." msgstr "This is a warning alert." -#: src/blocks/alert/variations.js:70 +#: src/blocks/alert/variations.js:67 msgid "Alert Danger" msgstr "アラート Danger" -#: src/blocks/alert/variations.js:82 +#: src/blocks/alert/variations.js:7 +msgid "Alert Success" +msgstr "アラート Success" + +#: src/blocks/alert/variations.js:79 msgid "This is a danger alert." msgstr "This is a danger alert." @@ -2635,12 +2585,12 @@ msgstr "" "は、クリアボタンをクリックしてください。" #: src/blocks/button/edit.js:767 src/blocks/heading/edit.js:339 -#: src/blocks/pr-content/edit.js:219 src/components/scroll-hint/index.js:115 +#: src/blocks/pr-content/edit.js:219 msgid "Before text" msgstr "文字の前" #: src/blocks/button/edit.js:789 src/blocks/heading/edit.js:348 -#: src/blocks/pr-content/edit.js:231 src/components/scroll-hint/index.js:137 +#: src/blocks/pr-content/edit.js:231 msgid "After text" msgstr "文字の後" @@ -3343,24 +3293,6 @@ msgstr "リンクをコピー: %s" msgid "Copy link" msgstr "リンクをコピー" -#: src/components/scroll-hint/index.js:109 -msgid "Output Before Text Icon" -msgstr "" - -#: src/components/scroll-hint/index.js:131 -msgid "Output After Text Icon" -msgstr "" - -#: src/components/scroll-hint/index.js:91 -#, fuzzy -#| msgid "Show on Scroll" -msgid "Show Scroll Message" -msgstr "スクロールしたら表示" - -#: src/components/scroll-hint/index.js:98 -msgid "Scroll Message Text" -msgstr "" - #: src/extensions/common/custom-block-variation/block-variation-explorer/sidebar.js:17 msgid "Create" msgstr "作成" @@ -3698,36 +3630,37 @@ msgstr "グループリンク" msgid "List Icon Color" msgstr "リストアイコンの色" -#: src/extensions/core/table/style.js:226 -msgid "Table Horizontal Scroll" -msgstr "テーブルの水平方向スクロール" - -#: src/extensions/core/table/style.js:234 -msgid "Scrollable" -msgstr "スクロール" - -#: src/extensions/core/table/style.js:241 +#: src/extensions/core/table/style.js:106 msgid "Horizontal Scroll Breakpoint" msgstr "水平スクロールのブレイクポイント" -#: src/extensions/core/table/style.js:248 +#: src/extensions/core/table/style.js:113 msgid "Mobile size" msgstr "モバイル" -#: src/extensions/core/table/style.js:255 +#: src/extensions/core/table/style.js:120 msgid "Tablet size" msgstr "タブレット" -#: src/extensions/core/table/style.js:262 +#: src/extensions/core/table/style.js:127 msgid "PC size" msgstr "PC" -#: src/extensions/core/table/style.js:41 -#: inc/vk-blocks/view/class-vk-blocks-scrollhintrenderer.php:72 -#, fuzzy -#| msgid "Show on Scroll" -msgid "You can scroll" -msgstr "スクロールしたら表示" +#: src/extensions/core/table/style.js:137 +msgid "" +"Table cells are no longer fixed width when horizontal scroll breakpoint is " +"reached." +msgstr "" +"水平スクロールのブレークポイントに達すると、テーブルセルの幅が固定されなくな" +"ります。" + +#: src/extensions/core/table/style.js:91 +msgid "Table Horizontal Scroll" +msgstr "テーブルの水平方向スクロール" + +#: src/extensions/core/table/style.js:99 +msgid "Scrollable" +msgstr "スクロール" #: src/utils/example-data.js:14 msgid "Theoretical Physicist" @@ -5049,33 +4982,6 @@ msgid "" "explaining the order." msgstr "順番を説明する時に便利でシンプルなスケジュールなどを表示します。" -#~ msgid "Visitor Return Settings" -#~ msgstr "再訪問時の設定" - -#~ msgid "Do not show again for returning visitors" -#~ msgstr "再訪問者には表示しない" - -#~ msgid "" -#~ "Since this feature uses Session Storage, the content may reappear after " -#~ "closing the browser or in private browsing mode." -#~ msgstr "" -#~ "この機能はSession Storageを使用しているため、ブラウザを閉じた後やプライ" -#~ "ベートブラウジングモードでは再度表示される場合があります。" - -#~ msgid "" -#~ "In private browsing mode or environments where certain features are " -#~ "disabled, this block may appear again on future visits." -#~ msgstr "" -#~ "プライベートブラウジングモードや、一部の機能が無効化されている環境では、こ" -#~ "のブロックが再訪問時に再度表示されることがあります。" - -#~ msgid "" -#~ "Table cells are no longer fixed width when horizontal scroll breakpoint " -#~ "is reached." -#~ msgstr "" -#~ "水平スクロールのブレークポイントに達すると、テーブルセルの幅が固定されなく" -#~ "なります。" - #~ msgid "Full Wide" #~ msgstr "全幅" diff --git a/languages/vk-blocks-pro-js.pot b/languages/vk-blocks-pro-js.pot index d2dbf4158..d1bbcdaf4 100644 --- a/languages/vk-blocks-pro-js.pot +++ b/languages/vk-blocks-pro-js.pot @@ -1002,7 +1002,7 @@ msgstr "" #: src/blocks/_pro/card-item/edit.js:182 #: src/blocks/_pro/card/edit.js:134 #: src/blocks/_pro/icon-card/edit.js:75 -#: src/blocks/_pro/post-list/edit.js:442 +#: src/blocks/_pro/post-list/edit.js:407 msgid "Title" msgstr "" @@ -1111,7 +1111,7 @@ msgid "Check your settings from the settings sidebar." msgstr "" #: src/blocks/_pro/child-page/edit.js:115 -#: src/blocks/_pro/post-list/edit.js:310 +#: src/blocks/_pro/post-list/edit.js:275 msgid "Display conditions" msgstr "" @@ -1120,7 +1120,7 @@ msgid "Parent" msgstr "" #: src/blocks/_pro/child-page/edit.js:134 -#: src/blocks/_pro/post-list/edit.js:480 +#: src/blocks/_pro/post-list/edit.js:445 msgid "Ignore this post" msgstr "" @@ -1247,7 +1247,7 @@ msgid "Setting up a link" msgstr "" #: src/blocks/_pro/dynamic-text/edit.js:389 -#: src/blocks/_pro/gridcolcard-item/edit.js:346 +#: src/blocks/_pro/gridcolcard-item/edit.js:348 #: src/blocks/_pro/icon-card-item/edit.js:128 #: src/blocks/button/edit.js:283 #: src/blocks/icon/edit.js:292 @@ -1298,23 +1298,11 @@ msgstr "" msgid "span" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:103 -msgid "Always Visible" -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:107 -msgid "Show on Scroll" -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:113 -msgid "Fixed position" -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:117 +#: src/blocks/_pro/fixed-display/edit.js:100 msgid "Top" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:119 +#: src/blocks/_pro/fixed-display/edit.js:102 #: src/blocks/balloon/edit.js:434 #: src/blocks/button/edit.js:375 #: src/blocks/pr-content/edit.js:252 @@ -1322,11 +1310,11 @@ msgstr "" msgid "Right" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:123 +#: src/blocks/_pro/fixed-display/edit.js:106 msgid "Bottom" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:127 +#: src/blocks/_pro/fixed-display/edit.js:110 #: src/blocks/balloon/edit.js:422 #: src/blocks/button/edit.js:355 #: src/blocks/pr-content/edit.js:256 @@ -1334,93 +1322,60 @@ msgstr "" msgid "Left" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:135 +#: src/blocks/_pro/fixed-display/edit.js:118 msgid "Fixed position origin" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:142 +#: src/blocks/_pro/fixed-display/edit.js:125 msgid "Top section" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:149 +#: src/blocks/_pro/fixed-display/edit.js:132 msgid "Bottom section" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:163 +#: src/blocks/_pro/fixed-display/edit.js:146 msgid "Fixed position from the top" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:167 +#: src/blocks/_pro/fixed-display/edit.js:150 msgid "Fixed position from the bottom" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:191 -msgid "Scroll Display Settings" -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:194 +#: src/blocks/_pro/fixed-display/edit.js:174 msgid "Timing to display" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:210 +#: src/blocks/_pro/fixed-display/edit.js:190 msgid "Persist visibility once visible" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:221 -msgid "Timer Settings" +#: src/blocks/_pro/fixed-display/edit.js:71 +msgid "Fixed Display Setting" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:223 -msgid "Enable Display After Seconds" -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:240 -msgid "Display after seconds" -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:259 -msgid "Enable Hide After Seconds" -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:271 -msgid "Hide after seconds" -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:289 +#: src/blocks/_pro/fixed-display/edit.js:74 msgid "" -"When combined with \"Show on Scroll\", you can set the time the block " -"remains visible after the user scrolls to a specific point, as well as when " -"it disappears." -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:297 -msgid "Display Settings Until Browser is Closed" -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:300 -msgid "Do not display again until the browser is closed" +"The fixed position of the fixed position block will not change on the edit " +"screen. Please check on the front screen." msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:311 -msgid "" -"When enabled, the same content will not be shown again until the visitor " -"closes their browser." +#: src/blocks/_pro/fixed-display/edit.js:81 +#: src/blocks/_pro/table-of-contents-new/edit.js:114 +#: src/components/column-layout-control/index.js:69 +msgid "Display type" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:87 -msgid "Fixed Display Settings" +#: src/blocks/_pro/fixed-display/edit.js:86 +msgid "Always Visible" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:91 -msgid "" -"The fixed position of the block will not change on the edit screen. Please " -"check on the front screen." +#: src/blocks/_pro/fixed-display/edit.js:90 +msgid "Show on Scroll" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:98 -#: src/blocks/_pro/table-of-contents-new/edit.js:114 -#: src/components/column-layout-control/index.js:69 -msgid "Display type" +#: src/blocks/_pro/fixed-display/edit.js:96 +msgid "Fixed position" msgstr "" #: src/blocks/_pro/grid-column-item/edit.js:100 @@ -1501,63 +1456,63 @@ msgstr "" msgid "You can create a variety of layouts with grid column card blocks." msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:242 +#: src/blocks/_pro/gridcolcard-item/edit.js:244 #: src/blocks/_pro/select-post-list-item/edit.js:66 #: src/blocks/button/edit.js:249 #: src/components/link-toolbar/index.js:238 msgid "Unlink" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:243 +#: src/blocks/_pro/gridcolcard-item/edit.js:245 #: src/blocks/button/edit.js:250 #: src/components/link-toolbar/index.js:239 msgid "Input Link URL" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:273 +#: src/blocks/_pro/gridcolcard-item/edit.js:275 #: src/blocks/_pro/select-post-list-item/edit.js:102 #: src/blocks/button/edit.js:278 #: src/components/link-toolbar/index.js:273 msgid "Submit" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:297 +#: src/blocks/_pro/gridcolcard-item/edit.js:299 msgid "Edit mode" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:307 +#: src/blocks/_pro/gridcolcard-item/edit.js:309 msgid "All columns" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:315 +#: src/blocks/_pro/gridcolcard-item/edit.js:317 msgid "This column only" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:320 +#: src/blocks/_pro/gridcolcard-item/edit.js:322 msgid "Edit Lock" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:323 +#: src/blocks/_pro/gridcolcard-item/edit.js:325 msgid "Lock edits this block from the parent and other Grid Column Item block" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:334 +#: src/blocks/_pro/gridcolcard-item/edit.js:336 msgid "Column Setting" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:338 +#: src/blocks/_pro/gridcolcard-item/edit.js:340 #: src/blocks/_pro/icon-card-item/edit.js:120 #: src/blocks/pr-blocks/edit.js:254 msgid "Link URL:" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:353 +#: src/blocks/_pro/gridcolcard-item/edit.js:355 msgid "" "If you set a link URL, do not place the link element (text or button) in " "the Grid Column Card Item. It may not be displayed correctly." msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:357 +#: src/blocks/_pro/gridcolcard-item/edit.js:359 msgid "Make sure that no link is specified for the image block, etc." msgstr "" @@ -1676,7 +1631,6 @@ msgstr "" #: src/blocks/heading/edit.js:335 #: src/blocks/icon/edit.js:276 #: src/blocks/pr-content/edit.js:212 -#: src/components/scroll-hint/index.js:103 #: src/extensions/common/custom-block-variation/block-variation-list/item/body-area/index.js:142 #: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:167 #: src/utils/font-awesome-new.js:189 @@ -1979,93 +1933,93 @@ msgstr "" msgid "Filter by %s" msgstr "" -#: src/blocks/_pro/post-list/edit.js:314 +#: src/blocks/_pro/post-list/edit.js:279 msgid "Filter by PostTypes" msgstr "" -#: src/blocks/_pro/post-list/edit.js:327 +#: src/blocks/_pro/post-list/edit.js:292 msgid "Taxonomy filter condition" msgstr "" -#: src/blocks/_pro/post-list/edit.js:338 +#: src/blocks/_pro/post-list/edit.js:303 msgid "OR ( Whichever apply )" msgstr "" -#: src/blocks/_pro/post-list/edit.js:348 +#: src/blocks/_pro/post-list/edit.js:313 msgid "AND ( All apply )" msgstr "" -#: src/blocks/_pro/post-list/edit.js:354 +#: src/blocks/_pro/post-list/edit.js:319 msgid "Number of Posts" msgstr "" -#: src/blocks/_pro/post-list/edit.js:367 +#: src/blocks/_pro/post-list/edit.js:332 msgid "Filter by Date" msgstr "" -#: src/blocks/_pro/post-list/edit.js:371 +#: src/blocks/_pro/post-list/edit.js:336 msgid "Period of Time" msgstr "" -#: src/blocks/_pro/post-list/edit.js:379 +#: src/blocks/_pro/post-list/edit.js:344 msgid "Whole Period" msgstr "" -#: src/blocks/_pro/post-list/edit.js:383 +#: src/blocks/_pro/post-list/edit.js:348 msgid "From Today" msgstr "" -#: src/blocks/_pro/post-list/edit.js:387 +#: src/blocks/_pro/post-list/edit.js:352 msgid "From Now" msgstr "" -#: src/blocks/_pro/post-list/edit.js:391 +#: src/blocks/_pro/post-list/edit.js:356 msgid "From Tomorrow" msgstr "" -#: src/blocks/_pro/post-list/edit.js:396 +#: src/blocks/_pro/post-list/edit.js:361 msgid "" "* If you choose a future period, you will need to customize it so that " "future posts will be published immediately." msgstr "" -#: src/blocks/_pro/post-list/edit.js:403 +#: src/blocks/_pro/post-list/edit.js:368 msgid "Order" msgstr "" -#: src/blocks/_pro/post-list/edit.js:412 +#: src/blocks/_pro/post-list/edit.js:377 msgid "ASC" msgstr "" -#: src/blocks/_pro/post-list/edit.js:416 +#: src/blocks/_pro/post-list/edit.js:381 msgid "DESC" msgstr "" -#: src/blocks/_pro/post-list/edit.js:422 +#: src/blocks/_pro/post-list/edit.js:387 msgid "Order by" msgstr "" -#: src/blocks/_pro/post-list/edit.js:431 +#: src/blocks/_pro/post-list/edit.js:396 msgid "Published Date" msgstr "" -#: src/blocks/_pro/post-list/edit.js:438 +#: src/blocks/_pro/post-list/edit.js:403 msgid "Modefied Date" msgstr "" -#: src/blocks/_pro/post-list/edit.js:446 +#: src/blocks/_pro/post-list/edit.js:411 msgid "Random" msgstr "" -#: src/blocks/_pro/post-list/edit.js:452 +#: src/blocks/_pro/post-list/edit.js:417 msgid "offset" msgstr "" -#: src/blocks/_pro/post-list/edit.js:468 +#: src/blocks/_pro/post-list/edit.js:433 msgid "Display from the first post always" msgstr "" -#: src/blocks/_pro/post-list/edit.js:474 +#: src/blocks/_pro/post-list/edit.js:439 msgid "Display from the first post even on pages beyond the second page." msgstr "" @@ -2309,7 +2263,7 @@ msgid "Alert Style" msgstr "" #: src/blocks/alert/edit.js:53 -#: src/blocks/alert/variations.js:16 +#: src/blocks/alert/variations.js:13 #: src/blocks/button/edit.js:692 #: src/blocks/pr-content/edit.js:171 msgid "Success" @@ -2322,52 +2276,52 @@ msgid "Info" msgstr "" #: src/blocks/alert/edit.js:61 -#: src/blocks/alert/variations.js:57 +#: src/blocks/alert/variations.js:54 #: src/blocks/button/edit.js:700 #: src/blocks/pr-content/edit.js:179 msgid "Warning" msgstr "" #: src/blocks/alert/edit.js:65 -#: src/blocks/alert/variations.js:76 +#: src/blocks/alert/variations.js:73 #: src/blocks/button/edit.js:704 #: src/blocks/pr-content/edit.js:183 msgid "Danger" msgstr "" -#: src/blocks/alert/variations.js:10 -msgid "Alert Success" -msgstr "" - -#: src/blocks/alert/variations.js:22 +#: src/blocks/alert/variations.js:19 msgid "This is a success alert." msgstr "" -#: src/blocks/alert/variations.js:29 +#: src/blocks/alert/variations.js:26 msgid "Alert Info" msgstr "" -#: src/blocks/alert/variations.js:35 +#: src/blocks/alert/variations.js:32 msgid "Information" msgstr "" -#: src/blocks/alert/variations.js:41 +#: src/blocks/alert/variations.js:38 msgid "This is a information alert." msgstr "" -#: src/blocks/alert/variations.js:51 +#: src/blocks/alert/variations.js:48 msgid "Alert Warning" msgstr "" -#: src/blocks/alert/variations.js:63 +#: src/blocks/alert/variations.js:60 msgid "This is a warning alert." msgstr "" -#: src/blocks/alert/variations.js:70 +#: src/blocks/alert/variations.js:67 msgid "Alert Danger" msgstr "" -#: src/blocks/alert/variations.js:82 +#: src/blocks/alert/variations.js:7 +msgid "Alert Success" +msgstr "" + +#: src/blocks/alert/variations.js:79 msgid "This is a danger alert." msgstr "" @@ -2671,14 +2625,12 @@ msgstr "" #: src/blocks/button/edit.js:767 #: src/blocks/heading/edit.js:339 #: src/blocks/pr-content/edit.js:219 -#: src/components/scroll-hint/index.js:115 msgid "Before text" msgstr "" #: src/blocks/button/edit.js:789 #: src/blocks/heading/edit.js:348 #: src/blocks/pr-content/edit.js:231 -#: src/components/scroll-hint/index.js:137 msgid "After text" msgstr "" @@ -3383,22 +3335,6 @@ msgstr "" msgid "Copy link" msgstr "" -#: src/components/scroll-hint/index.js:109 -msgid "Output Before Text Icon" -msgstr "" - -#: src/components/scroll-hint/index.js:131 -msgid "Output After Text Icon" -msgstr "" - -#: src/components/scroll-hint/index.js:91 -msgid "Show Scroll Message" -msgstr "" - -#: src/components/scroll-hint/index.js:98 -msgid "Scroll Message Text" -msgstr "" - #: src/extensions/common/custom-block-variation/block-variation-explorer/sidebar.js:17 msgid "Create" msgstr "" @@ -3718,32 +3654,34 @@ msgstr "" msgid "List Icon Color" msgstr "" -#: src/extensions/core/table/style.js:226 -msgid "Table Horizontal Scroll" -msgstr "" - -#: src/extensions/core/table/style.js:234 -msgid "Scrollable" -msgstr "" - -#: src/extensions/core/table/style.js:241 +#: src/extensions/core/table/style.js:106 msgid "Horizontal Scroll Breakpoint" msgstr "" -#: src/extensions/core/table/style.js:248 +#: src/extensions/core/table/style.js:113 msgid "Mobile size" msgstr "" -#: src/extensions/core/table/style.js:255 +#: src/extensions/core/table/style.js:120 msgid "Tablet size" msgstr "" -#: src/extensions/core/table/style.js:262 +#: src/extensions/core/table/style.js:127 msgid "PC size" msgstr "" -#: src/extensions/core/table/style.js:41 -msgid "You can scroll" +#: src/extensions/core/table/style.js:137 +msgid "" +"Table cells are no longer fixed width when horizontal scroll breakpoint is " +"reached." +msgstr "" + +#: src/extensions/core/table/style.js:91 +msgid "Table Horizontal Scroll" +msgstr "" + +#: src/extensions/core/table/style.js:99 +msgid "Scrollable" msgstr "" #: src/utils/example-data.js:14 @@ -3853,4 +3791,4 @@ msgstr "" #: src/blocks/_pro/blog-card/edit/url-placeholder.js:49 msgctxt "button label" msgid "Convert to link" -msgstr "" \ No newline at end of file +msgstr "" diff --git a/languages/vk-blocks-pro.pot b/languages/vk-blocks-pro.pot index 820852b94..c40b968d9 100644 --- a/languages/vk-blocks-pro.pot +++ b/languages/vk-blocks-pro.pot @@ -2,14 +2,14 @@ # This file is distributed under the same license as the VK Blocks Pro plugin. msgid "" msgstr "" -"Project-Id-Version: VK Blocks Pro 1.86.0.0\n" +"Project-Id-Version: VK Blocks Pro 1.84.0.0\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/vk-blocks-pro\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-10-07T01:16:14+00:00\n" +"POT-Creation-Date: 2024-09-26T00:56:51+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.10.0\n" "X-Domain: vk-blocks-pro\n" @@ -996,7 +996,7 @@ msgstr "" #: src/blocks/_pro/card-item/edit.js:182 #: src/blocks/_pro/card/edit.js:134 #: src/blocks/_pro/icon-card/edit.js:75 -#: src/blocks/_pro/post-list/edit.js:442 +#: src/blocks/_pro/post-list/edit.js:407 msgid "Title" msgstr "" @@ -1103,7 +1103,7 @@ msgid "Check your settings from the settings sidebar." msgstr "" #: src/blocks/_pro/child-page/edit.js:115 -#: src/blocks/_pro/post-list/edit.js:310 +#: src/blocks/_pro/post-list/edit.js:275 msgid "Display conditions" msgstr "" @@ -1112,7 +1112,7 @@ msgid "Parent" msgstr "" #: src/blocks/_pro/child-page/edit.js:134 -#: src/blocks/_pro/post-list/edit.js:480 +#: src/blocks/_pro/post-list/edit.js:445 msgid "Ignore this post" msgstr "" @@ -1239,7 +1239,7 @@ msgid "Setting up a link" msgstr "" #: src/blocks/_pro/dynamic-text/edit.js:389 -#: src/blocks/_pro/gridcolcard-item/edit.js:346 +#: src/blocks/_pro/gridcolcard-item/edit.js:348 #: src/blocks/_pro/icon-card-item/edit.js:128 #: src/blocks/button/edit.js:283 #: src/blocks/icon/edit.js:292 @@ -1290,23 +1290,11 @@ msgstr "" msgid "span" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:103 -msgid "Always Visible" -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:107 -msgid "Show on Scroll" -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:113 -msgid "Fixed position" -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:117 +#: src/blocks/_pro/fixed-display/edit.js:100 msgid "Top" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:119 +#: src/blocks/_pro/fixed-display/edit.js:102 #: src/blocks/balloon/edit.js:434 #: src/blocks/button/edit.js:375 #: src/blocks/pr-content/edit.js:252 @@ -1314,11 +1302,11 @@ msgstr "" msgid "Right" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:123 +#: src/blocks/_pro/fixed-display/edit.js:106 msgid "Bottom" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:127 +#: src/blocks/_pro/fixed-display/edit.js:110 #: src/blocks/balloon/edit.js:422 #: src/blocks/button/edit.js:355 #: src/blocks/pr-content/edit.js:256 @@ -1326,86 +1314,58 @@ msgstr "" msgid "Left" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:135 +#: src/blocks/_pro/fixed-display/edit.js:118 msgid "Fixed position origin" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:142 +#: src/blocks/_pro/fixed-display/edit.js:125 msgid "Top section" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:149 +#: src/blocks/_pro/fixed-display/edit.js:132 msgid "Bottom section" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:163 +#: src/blocks/_pro/fixed-display/edit.js:146 msgid "Fixed position from the top" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:167 +#: src/blocks/_pro/fixed-display/edit.js:150 msgid "Fixed position from the bottom" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:191 -msgid "Scroll Display Settings" -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:194 +#: src/blocks/_pro/fixed-display/edit.js:174 msgid "Timing to display" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:210 +#: src/blocks/_pro/fixed-display/edit.js:190 msgid "Persist visibility once visible" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:221 -msgid "Timer Settings" -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:223 -msgid "Enable Display After Seconds" -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:240 -msgid "Display after seconds" -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:259 -msgid "Enable Hide After Seconds" +#: src/blocks/_pro/fixed-display/edit.js:71 +msgid "Fixed Display Setting" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:271 -msgid "Hide after seconds" +#: src/blocks/_pro/fixed-display/edit.js:74 +msgid "The fixed position of the fixed position block will not change on the edit screen. Please check on the front screen." msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:289 -msgid "When combined with \"Show on Scroll\", you can set the time the block remains visible after the user scrolls to a specific point, as well as when it disappears." -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:297 -msgid "Display Settings Until Browser is Closed" -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:300 -msgid "Do not display again until the browser is closed" -msgstr "" - -#: src/blocks/_pro/fixed-display/edit.js:311 -msgid "When enabled, the same content will not be shown again until the visitor closes their browser." +#: src/blocks/_pro/fixed-display/edit.js:81 +#: src/blocks/_pro/table-of-contents-new/edit.js:114 +#: src/components/column-layout-control/index.js:69 +msgid "Display type" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:87 -msgid "Fixed Display Settings" +#: src/blocks/_pro/fixed-display/edit.js:86 +msgid "Always Visible" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:91 -msgid "The fixed position of the block will not change on the edit screen. Please check on the front screen." +#: src/blocks/_pro/fixed-display/edit.js:90 +msgid "Show on Scroll" msgstr "" -#: src/blocks/_pro/fixed-display/edit.js:98 -#: src/blocks/_pro/table-of-contents-new/edit.js:114 -#: src/components/column-layout-control/index.js:69 -msgid "Display type" +#: src/blocks/_pro/fixed-display/edit.js:96 +msgid "Fixed position" msgstr "" #: src/blocks/_pro/grid-column-item/edit.js:100 @@ -1486,61 +1446,61 @@ msgstr "" msgid "You can create a variety of layouts with grid column card blocks." msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:242 +#: src/blocks/_pro/gridcolcard-item/edit.js:244 #: src/blocks/_pro/select-post-list-item/edit.js:66 #: src/blocks/button/edit.js:249 #: src/components/link-toolbar/index.js:238 msgid "Unlink" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:243 +#: src/blocks/_pro/gridcolcard-item/edit.js:245 #: src/blocks/button/edit.js:250 #: src/components/link-toolbar/index.js:239 msgid "Input Link URL" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:273 +#: src/blocks/_pro/gridcolcard-item/edit.js:275 #: src/blocks/_pro/select-post-list-item/edit.js:102 #: src/blocks/button/edit.js:278 #: src/components/link-toolbar/index.js:273 msgid "Submit" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:297 +#: src/blocks/_pro/gridcolcard-item/edit.js:299 msgid "Edit mode" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:307 +#: src/blocks/_pro/gridcolcard-item/edit.js:309 msgid "All columns" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:315 +#: src/blocks/_pro/gridcolcard-item/edit.js:317 msgid "This column only" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:320 +#: src/blocks/_pro/gridcolcard-item/edit.js:322 msgid "Edit Lock" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:323 +#: src/blocks/_pro/gridcolcard-item/edit.js:325 msgid "Lock edits this block from the parent and other Grid Column Item block" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:334 +#: src/blocks/_pro/gridcolcard-item/edit.js:336 msgid "Column Setting" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:338 +#: src/blocks/_pro/gridcolcard-item/edit.js:340 #: src/blocks/_pro/icon-card-item/edit.js:120 #: src/blocks/pr-blocks/edit.js:254 msgid "Link URL:" msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:353 +#: src/blocks/_pro/gridcolcard-item/edit.js:355 msgid "If you set a link URL, do not place the link element (text or button) in the Grid Column Card Item. It may not be displayed correctly." msgstr "" -#: src/blocks/_pro/gridcolcard-item/edit.js:357 +#: src/blocks/_pro/gridcolcard-item/edit.js:359 msgid "Make sure that no link is specified for the image block, etc." msgstr "" @@ -1658,7 +1618,6 @@ msgstr "" #: src/blocks/heading/edit.js:335 #: src/blocks/icon/edit.js:276 #: src/blocks/pr-content/edit.js:212 -#: src/components/scroll-hint/index.js:103 #: src/extensions/common/custom-block-variation/block-variation-list/item/body-area/index.js:142 #: src/extensions/common/custom-block-variation/create-variation/block-variation-form/index.js:167 #: src/utils/font-awesome-new.js:189 @@ -1963,91 +1922,91 @@ msgstr "" msgid "Filter by %s" msgstr "" -#: src/blocks/_pro/post-list/edit.js:314 +#: src/blocks/_pro/post-list/edit.js:279 msgid "Filter by PostTypes" msgstr "" -#: src/blocks/_pro/post-list/edit.js:327 +#: src/blocks/_pro/post-list/edit.js:292 msgid "Taxonomy filter condition" msgstr "" -#: src/blocks/_pro/post-list/edit.js:338 +#: src/blocks/_pro/post-list/edit.js:303 msgid "OR ( Whichever apply )" msgstr "" -#: src/blocks/_pro/post-list/edit.js:348 +#: src/blocks/_pro/post-list/edit.js:313 msgid "AND ( All apply )" msgstr "" -#: src/blocks/_pro/post-list/edit.js:354 +#: src/blocks/_pro/post-list/edit.js:319 msgid "Number of Posts" msgstr "" -#: src/blocks/_pro/post-list/edit.js:367 +#: src/blocks/_pro/post-list/edit.js:332 msgid "Filter by Date" msgstr "" -#: src/blocks/_pro/post-list/edit.js:371 +#: src/blocks/_pro/post-list/edit.js:336 msgid "Period of Time" msgstr "" -#: src/blocks/_pro/post-list/edit.js:379 +#: src/blocks/_pro/post-list/edit.js:344 msgid "Whole Period" msgstr "" -#: src/blocks/_pro/post-list/edit.js:383 +#: src/blocks/_pro/post-list/edit.js:348 msgid "From Today" msgstr "" -#: src/blocks/_pro/post-list/edit.js:387 +#: src/blocks/_pro/post-list/edit.js:352 msgid "From Now" msgstr "" -#: src/blocks/_pro/post-list/edit.js:391 +#: src/blocks/_pro/post-list/edit.js:356 msgid "From Tomorrow" msgstr "" -#: src/blocks/_pro/post-list/edit.js:396 +#: src/blocks/_pro/post-list/edit.js:361 msgid "* If you choose a future period, you will need to customize it so that future posts will be published immediately." msgstr "" -#: src/blocks/_pro/post-list/edit.js:403 +#: src/blocks/_pro/post-list/edit.js:368 msgid "Order" msgstr "" -#: src/blocks/_pro/post-list/edit.js:412 +#: src/blocks/_pro/post-list/edit.js:377 msgid "ASC" msgstr "" -#: src/blocks/_pro/post-list/edit.js:416 +#: src/blocks/_pro/post-list/edit.js:381 msgid "DESC" msgstr "" -#: src/blocks/_pro/post-list/edit.js:422 +#: src/blocks/_pro/post-list/edit.js:387 msgid "Order by" msgstr "" -#: src/blocks/_pro/post-list/edit.js:431 +#: src/blocks/_pro/post-list/edit.js:396 msgid "Published Date" msgstr "" -#: src/blocks/_pro/post-list/edit.js:438 +#: src/blocks/_pro/post-list/edit.js:403 msgid "Modefied Date" msgstr "" -#: src/blocks/_pro/post-list/edit.js:446 +#: src/blocks/_pro/post-list/edit.js:411 msgid "Random" msgstr "" -#: src/blocks/_pro/post-list/edit.js:452 +#: src/blocks/_pro/post-list/edit.js:417 msgid "offset" msgstr "" -#: src/blocks/_pro/post-list/edit.js:468 +#: src/blocks/_pro/post-list/edit.js:433 msgid "Display from the first post always" msgstr "" -#: src/blocks/_pro/post-list/edit.js:474 +#: src/blocks/_pro/post-list/edit.js:439 msgid "Display from the first post even on pages beyond the second page." msgstr "" @@ -2287,7 +2246,7 @@ msgid "Alert Style" msgstr "" #: src/blocks/alert/edit.js:53 -#: src/blocks/alert/variations.js:16 +#: src/blocks/alert/variations.js:13 #: src/blocks/button/edit.js:692 #: src/blocks/pr-content/edit.js:171 #: inc/vk-blocks/class-vk-blocks-global-settings.php:476 @@ -2302,7 +2261,7 @@ msgid "Info" msgstr "" #: src/blocks/alert/edit.js:61 -#: src/blocks/alert/variations.js:57 +#: src/blocks/alert/variations.js:54 #: src/blocks/button/edit.js:700 #: src/blocks/pr-content/edit.js:179 #: inc/vk-blocks/class-vk-blocks-global-settings.php:480 @@ -2310,46 +2269,46 @@ msgid "Warning" msgstr "" #: src/blocks/alert/edit.js:65 -#: src/blocks/alert/variations.js:76 +#: src/blocks/alert/variations.js:73 #: src/blocks/button/edit.js:704 #: src/blocks/pr-content/edit.js:183 #: inc/vk-blocks/class-vk-blocks-global-settings.php:484 msgid "Danger" msgstr "" -#: src/blocks/alert/variations.js:10 -msgid "Alert Success" -msgstr "" - -#: src/blocks/alert/variations.js:22 +#: src/blocks/alert/variations.js:19 msgid "This is a success alert." msgstr "" -#: src/blocks/alert/variations.js:29 +#: src/blocks/alert/variations.js:26 msgid "Alert Info" msgstr "" -#: src/blocks/alert/variations.js:35 +#: src/blocks/alert/variations.js:32 msgid "Information" msgstr "" -#: src/blocks/alert/variations.js:41 +#: src/blocks/alert/variations.js:38 msgid "This is a information alert." msgstr "" -#: src/blocks/alert/variations.js:51 +#: src/blocks/alert/variations.js:48 msgid "Alert Warning" msgstr "" -#: src/blocks/alert/variations.js:63 +#: src/blocks/alert/variations.js:60 msgid "This is a warning alert." msgstr "" -#: src/blocks/alert/variations.js:70 +#: src/blocks/alert/variations.js:67 msgid "Alert Danger" msgstr "" -#: src/blocks/alert/variations.js:82 +#: src/blocks/alert/variations.js:7 +msgid "Alert Success" +msgstr "" + +#: src/blocks/alert/variations.js:79 msgid "This is a danger alert." msgstr "" @@ -2649,14 +2608,12 @@ msgstr "" #: src/blocks/button/edit.js:767 #: src/blocks/heading/edit.js:339 #: src/blocks/pr-content/edit.js:219 -#: src/components/scroll-hint/index.js:115 msgid "Before text" msgstr "" #: src/blocks/button/edit.js:789 #: src/blocks/heading/edit.js:348 #: src/blocks/pr-content/edit.js:231 -#: src/components/scroll-hint/index.js:137 msgid "After text" msgstr "" @@ -3343,22 +3300,6 @@ msgstr "" msgid "Copy link" msgstr "" -#: src/components/scroll-hint/index.js:109 -msgid "Output Before Text Icon" -msgstr "" - -#: src/components/scroll-hint/index.js:131 -msgid "Output After Text Icon" -msgstr "" - -#: src/components/scroll-hint/index.js:91 -msgid "Show Scroll Message" -msgstr "" - -#: src/components/scroll-hint/index.js:98 -msgid "Scroll Message Text" -msgstr "" - #: src/extensions/common/custom-block-variation/block-variation-explorer/sidebar.js:17 msgid "Create" msgstr "" @@ -3661,33 +3602,32 @@ msgstr "" msgid "List Icon Color" msgstr "" -#: src/extensions/core/table/style.js:226 -msgid "Table Horizontal Scroll" -msgstr "" - -#: src/extensions/core/table/style.js:234 -msgid "Scrollable" -msgstr "" - -#: src/extensions/core/table/style.js:241 +#: src/extensions/core/table/style.js:106 msgid "Horizontal Scroll Breakpoint" msgstr "" -#: src/extensions/core/table/style.js:248 +#: src/extensions/core/table/style.js:113 msgid "Mobile size" msgstr "" -#: src/extensions/core/table/style.js:255 +#: src/extensions/core/table/style.js:120 msgid "Tablet size" msgstr "" -#: src/extensions/core/table/style.js:262 +#: src/extensions/core/table/style.js:127 msgid "PC size" msgstr "" -#: src/extensions/core/table/style.js:41 -#: inc/vk-blocks/view/class-vk-blocks-scrollhintrenderer.php:72 -msgid "You can scroll" +#: src/extensions/core/table/style.js:137 +msgid "Table cells are no longer fixed width when horizontal scroll breakpoint is reached." +msgstr "" + +#: src/extensions/core/table/style.js:91 +msgid "Table Horizontal Scroll" +msgstr "" + +#: src/extensions/core/table/style.js:99 +msgid "Scrollable" msgstr "" #: src/utils/example-data.js:14 From b2fb09c0906f5f676bbac7fece1168de23b9a99e Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 8 Oct 2024 11:29:21 +0900 Subject: [PATCH 36/83] Fix: Improved input handling for display seconds, ensuring minimum value and handling empty input --- src/blocks/_pro/fixed-display/edit.js | 51 ++++++++++++++------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index cc95acd56..555cea0ab 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -13,7 +13,7 @@ import { RadioControl, TextControl, } from '@wordpress/components'; -import { useEffect } from '@wordpress/element'; +import { useState, useEffect } from '@wordpress/element'; import { isParentReusableBlock } from '@vkblocks/utils/is-parent-reusable-block'; const units = [ @@ -42,6 +42,9 @@ export default function FixedDisplayEdit(props) { dontShowAgain, } = attributes; + const [tempDisplayAfterSeconds, setTempDisplayAfterSeconds] = useState(displayAfterSeconds || '0'); + const [tempHideAfterSeconds, setTempHideAfterSeconds] = useState(hideAfterSeconds || '0'); + useEffect(() => { if ( blockId === undefined || @@ -227,10 +230,8 @@ export default function FixedDisplayEdit(props) { checked={displayAfterSeconds > 0} onChange={(value) => { if (value) { - // ONにしたときにデフォルトの秒数を設定 - setAttributes({ displayAfterSeconds: 1 }); + setAttributes({ displayAfterSeconds: Math.max(0.1, displayAfterSeconds || 0.1) }); } else { - // OFFにしたときに値を0にする setAttributes({ displayAfterSeconds: 0 }); } }} @@ -238,29 +239,29 @@ export default function FixedDisplayEdit(props) { {displayAfterSeconds > 0 && ( { - const parsedValue = parseFloat(value) || 0; + setTempDisplayAfterSeconds(value); + }} + onBlur={() => { + const parsedValue = parseFloat(tempDisplayAfterSeconds); + const finalValue = isNaN(parsedValue) || parsedValue < 0.1 ? 0.1 : parsedValue; setAttributes({ - displayAfterSeconds: parsedValue, + displayAfterSeconds: finalValue, }); - if (parsedValue === 0) { - // 0になったらトグルを自動的にOFFにする - setAttributes({ displayAfterSeconds: 0 }); - } + setTempDisplayAfterSeconds(finalValue.toString()); }} type="number" - min="0" + min="0.1" step="0.1" /> )} - 0} onChange={(value) => { if (value) { - setAttributes({ hideAfterSeconds: 1 }); + setAttributes({ hideAfterSeconds: Math.max(0.1, hideAfterSeconds || 0.1) }); } else { setAttributes({ hideAfterSeconds: 0 }); } @@ -269,20 +270,22 @@ export default function FixedDisplayEdit(props) { {hideAfterSeconds > 0 && ( { - const parsedValue = parseFloat(value) || 0; + setTempHideAfterSeconds(value); + }} + onBlur={() => { + const parsedValue = parseFloat(tempHideAfterSeconds); + const finalValue = isNaN(parsedValue) || parsedValue < 0.1 ? 0.1 : parsedValue; setAttributes({ - hideAfterSeconds: parsedValue, + hideAfterSeconds: finalValue, }); - if (parsedValue === 0) { - setAttributes({ hideAfterSeconds: 0 }); - } + setTempHideAfterSeconds(finalValue.toString()); }} - type="number" - min="0" - step="0.1" - /> + type="number" + min="0.1" + step="0.1" + /> )}

From 7166af54026b40bfcc80ed9f2ff9ac6a0b5401f3 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 15 Oct 2024 13:42:32 +0900 Subject: [PATCH 37/83] Update readme.txt --- readme.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/readme.txt b/readme.txt index 20a9a6f5a..8c7962833 100644 --- a/readme.txt +++ b/readme.txt @@ -106,13 +106,11 @@ e.g. == Changelog == -<<<<<<< HEAD [ Add function ][ Fixed Display (Pro) ] Added a timer feature to control block appearance/disappearance and a "Do not show again for returning visitors" option. Session Storage is used, and no personal data is collected or tracked. Since Session Storage is used, the block may reappear after the browser is closed or in private browsing mode. [ Bug fix ][ Grid Column Card (Pro) ] Add translation. [ Bug fix ][ Category Badge (Pro) ] Added Pro label to the inserter. -======= + = 1.87.0 = ->>>>>>> develop [ Add function ][ Link Toolbar ] Added to skip retrieving metadata (title and favicon) for external links in link toolbar to prevent CORS errors. [ Add function ][ icon ] Add toolbar link for components. [ Bug fix ][ Slider ] Adjusting the timing of loading swiper to prevent the slider from collapsing. From 21c212240da92319f9b09f4c49ebdaaf9c68023b Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 15 Oct 2024 16:05:42 +0900 Subject: [PATCH 38/83] Fix: Prevent 'undefined' class output for fixed position type --- src/blocks/_pro/fixed-display/edit.js | 53 ++++++++++++++++++++------- src/blocks/_pro/fixed-display/save.js | 4 +- 2 files changed, 42 insertions(+), 15 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index 555cea0ab..802ab1035 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -42,8 +42,12 @@ export default function FixedDisplayEdit(props) { dontShowAgain, } = attributes; - const [tempDisplayAfterSeconds, setTempDisplayAfterSeconds] = useState(displayAfterSeconds || '0'); - const [tempHideAfterSeconds, setTempHideAfterSeconds] = useState(hideAfterSeconds || '0'); + const [tempDisplayAfterSeconds, setTempDisplayAfterSeconds] = useState( + displayAfterSeconds || '0' + ); + const [tempHideAfterSeconds, setTempHideAfterSeconds] = useState( + hideAfterSeconds || '0' + ); useEffect(() => { if ( @@ -65,7 +69,7 @@ export default function FixedDisplayEdit(props) { const handlePositionChange = (newPosition) => { if (['top', 'bottom'].includes(newPosition)) { - setAttributes({ fixedPositionType: undefined }); + setAttributes({ fixedPositionType: '' }); } setAttributes({ position: newPosition }); }; @@ -230,7 +234,12 @@ export default function FixedDisplayEdit(props) { checked={displayAfterSeconds > 0} onChange={(value) => { if (value) { - setAttributes({ displayAfterSeconds: Math.max(0.1, displayAfterSeconds || 0.1) }); + setAttributes({ + displayAfterSeconds: Math.max( + 0.1, + displayAfterSeconds || 0.1 + ), + }); } else { setAttributes({ displayAfterSeconds: 0 }); } @@ -244,12 +253,19 @@ export default function FixedDisplayEdit(props) { setTempDisplayAfterSeconds(value); }} onBlur={() => { - const parsedValue = parseFloat(tempDisplayAfterSeconds); - const finalValue = isNaN(parsedValue) || parsedValue < 0.1 ? 0.1 : parsedValue; + const parsedValue = parseFloat( + tempDisplayAfterSeconds + ); + const finalValue = + isNaN(parsedValue) || parsedValue < 0.1 + ? 0.1 + : parsedValue; setAttributes({ displayAfterSeconds: finalValue, }); - setTempDisplayAfterSeconds(finalValue.toString()); + setTempDisplayAfterSeconds( + finalValue.toString() + ); }} type="number" min="0.1" @@ -261,7 +277,12 @@ export default function FixedDisplayEdit(props) { checked={hideAfterSeconds > 0} onChange={(value) => { if (value) { - setAttributes({ hideAfterSeconds: Math.max(0.1, hideAfterSeconds || 0.1) }); + setAttributes({ + hideAfterSeconds: Math.max( + 0.1, + hideAfterSeconds || 0.1 + ), + }); } else { setAttributes({ hideAfterSeconds: 0 }); } @@ -275,17 +296,21 @@ export default function FixedDisplayEdit(props) { setTempHideAfterSeconds(value); }} onBlur={() => { - const parsedValue = parseFloat(tempHideAfterSeconds); - const finalValue = isNaN(parsedValue) || parsedValue < 0.1 ? 0.1 : parsedValue; + const parsedValue = + parseFloat(tempHideAfterSeconds); + const finalValue = + isNaN(parsedValue) || parsedValue < 0.1 + ? 0.1 + : parsedValue; setAttributes({ hideAfterSeconds: finalValue, }); setTempHideAfterSeconds(finalValue.toString()); }} - type="number" - min="0.1" - step="0.1" - /> + type="number" + min="0.1" + step="0.1" + /> )}

diff --git a/src/blocks/_pro/fixed-display/save.js b/src/blocks/_pro/fixed-display/save.js index 4057443e3..a0db99423 100644 --- a/src/blocks/_pro/fixed-display/save.js +++ b/src/blocks/_pro/fixed-display/save.js @@ -40,7 +40,9 @@ export default function save({ attributes }) { } const blockProps = useBlockProps.save({ - className: `vk_fixed-display vk_fixed-display-mode-${mode} vk_fixed-display-position-${position} vk_fixed-display-position-from-${fixedPositionType} vk_fixed-display-${blockId}`, + className: `vk_fixed-display vk_fixed-display-mode-${mode} vk_fixed-display-position-${position} ${ + fixedPositionType !== undefined ? `vk_fixed-display-position-from-${fixedPositionType}` : '' + } vk_fixed-display-${blockId}`, style: { [fixedPositionType]: ['right', 'left'].includes(position) ? `${fixedPositionValue}${fixedPositionUnit}` From cb61b5ff73e203452e1ea77a62f19d78db906dd9 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 15 Oct 2024 16:05:57 +0900 Subject: [PATCH 39/83] Fix: Prevent 'undefined' class output for fixed position type --- src/blocks/_pro/fixed-display/save.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/blocks/_pro/fixed-display/save.js b/src/blocks/_pro/fixed-display/save.js index a0db99423..7bb486a8d 100644 --- a/src/blocks/_pro/fixed-display/save.js +++ b/src/blocks/_pro/fixed-display/save.js @@ -41,7 +41,9 @@ export default function save({ attributes }) { const blockProps = useBlockProps.save({ className: `vk_fixed-display vk_fixed-display-mode-${mode} vk_fixed-display-position-${position} ${ - fixedPositionType !== undefined ? `vk_fixed-display-position-from-${fixedPositionType}` : '' + fixedPositionType !== undefined + ? `vk_fixed-display-position-from-${fixedPositionType}` + : '' } vk_fixed-display-${blockId}`, style: { [fixedPositionType]: ['right', 'left'].includes(position) From 4ce660218a6d6d8f70c2b5446db4477e98c59d88 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 23 Oct 2024 09:44:01 +0900 Subject: [PATCH 40/83] Fix: Ensure 'is-timed-display' class is properly added in save function --- src/blocks/_pro/fixed-display/save.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/blocks/_pro/fixed-display/save.js b/src/blocks/_pro/fixed-display/save.js index 7bb486a8d..2d3d05161 100644 --- a/src/blocks/_pro/fixed-display/save.js +++ b/src/blocks/_pro/fixed-display/save.js @@ -41,17 +41,17 @@ export default function save({ attributes }) { const blockProps = useBlockProps.save({ className: `vk_fixed-display vk_fixed-display-mode-${mode} vk_fixed-display-position-${position} ${ - fixedPositionType !== undefined - ? `vk_fixed-display-position-from-${fixedPositionType}` - : '' - } vk_fixed-display-${blockId}`, + fixedPositionType !== undefined ? `vk_fixed-display-position-from-${fixedPositionType}` : '' + } vk_fixed-display-${blockId} ${ + displayAfterSeconds > 0 ? 'is-timed-display' : '' + }`, style: { [fixedPositionType]: ['right', 'left'].includes(position) ? `${fixedPositionValue}${fixedPositionUnit}` : undefined, }, ...dataAttributes, - }); + }); return (

From 1b78afb1996cb0c09a6c9d99c2e89a1007889ae4 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 23 Oct 2024 12:21:41 +0900 Subject: [PATCH 41/83] Delete timing setting for scroll --- src/blocks/_pro/fixed-display/edit.js | 97 +++++++-------------------- src/blocks/_pro/fixed-display/view.js | 39 ++--------- 2 files changed, 31 insertions(+), 105 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index 802ab1035..a1a9e0d64 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -114,6 +114,10 @@ export default function FixedDisplayEdit(props) { label: __('Show on Scroll', 'vk-blocks-pro'), value: 'show-on-scroll', }, + { + label: __('Display and Hide After Time', 'vk-blocks-pro'), + value: 'display-after-time', + }, ]} /> { @@ -225,27 +217,8 @@ export default function FixedDisplayEdit(props) { /> )} - - 0} - onChange={(value) => { - if (value) { - setAttributes({ - displayAfterSeconds: Math.max( - 0.1, - displayAfterSeconds || 0.1 - ), - }); - } else { - setAttributes({ displayAfterSeconds: 0 }); - } - }} - /> - {displayAfterSeconds > 0 && ( + {mode === 'display-after-time' && ( + - )} - 0} - onChange={(value) => { - if (value) { - setAttributes({ - hideAfterSeconds: Math.max( - 0.1, - hideAfterSeconds || 0.1 - ), - }); - } else { - setAttributes({ hideAfterSeconds: 0 }); - } - }} - /> - {hideAfterSeconds > 0 && ( - )} - -

- {__( - 'When combined with "Show on Scroll", you can set the time the block remains visible after the user scrolls to a specific point, as well as when it disappears.', - 'vk-blocks-pro' - )} -

-
-
+ +

+ {__( + 'When combined with "Show on Scroll", you can set the time the block remains visible after the user scrolls to a specific point, as well as when it disappears.', + 'vk-blocks-pro' + )} +

+
+
+ )} timingInPixels && - !item.classList.contains('is-visible') && - !isTriggered - ) { + // スクロール位置が指定したタイミングを超えた場合に要素を表示 + if (window.scrollY > timingInPixels) { item.classList.add('is-visible'); - item.setAttribute('data-is-triggered', 'true'); // 発火済みと設定 - - const displayAfterSeconds = - parseFloat(item.getAttribute('data-display-after-seconds')) || - 0; - const hideAfterSeconds = - parseFloat(item.getAttribute('data-hide-after-seconds')) || 0; - - // handleVisibility関数を使用して表示・非表示を制御 - handleVisibility( - item, - displayAfterSeconds, - hideAfterSeconds, - blockId, - dontShowAgain - ); - } - // scrollPersistVisibleがONのときだけ再発火可能にする - else if (!scrollPersistVisible && window.scrollY < timingInPixels) { + } else if (!scrollPersistVisible) { item.classList.remove('is-visible'); - item.classList.remove('is-timed-visible'); - item.setAttribute('data-is-triggered', 'false'); // 発火解除 } }); }); @@ -102,7 +73,7 @@ window.addEventListener('scroll', function () { // 表示・非表示タイマー設定 window.addEventListener('DOMContentLoaded', function () { const items = document.querySelectorAll( - '.vk_fixed-display-mode-always-visible' + '.vk_fixed-display-mode-display-hide-after-time' ); items.forEach((item) => { From a5e6a8edef9b3eec89e746b975615793bc1b19ea Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 23 Oct 2024 12:22:16 +0900 Subject: [PATCH 42/83] Add Display and Hide After Time --- src/blocks/_pro/fixed-display/edit.js | 29 ++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index a1a9e0d64..cba532e46 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -115,8 +115,11 @@ export default function FixedDisplayEdit(props) { value: 'show-on-scroll', }, { - label: __('Display and Hide After Time', 'vk-blocks-pro'), - value: 'display-after-time', + label: __( + 'Display and Hide After Time', + 'vk-blocks-pro' + ), + value: 'display-hide-after-time', }, ]} /> @@ -150,11 +153,17 @@ export default function FixedDisplayEdit(props) { selected={fixedPositionType} options={[ { - label: __('Top section', 'vk-blocks-pro'), + label: __( + 'Top section', + 'vk-blocks-pro' + ), value: 'top', }, { - label: __('Bottom section', 'vk-blocks-pro'), + label: __( + 'Bottom section', + 'vk-blocks-pro' + ), value: 'bottom', }, ]} @@ -165,8 +174,14 @@ export default function FixedDisplayEdit(props) { { @@ -217,7 +232,7 @@ export default function FixedDisplayEdit(props) { /> )} - {mode === 'display-after-time' && ( + {mode === 'display-hide-after-time' && ( Date: Wed, 23 Oct 2024 12:23:47 +0900 Subject: [PATCH 43/83] Organized --- src/blocks/_pro/fixed-display/save.js | 50 +++++++++++++++------------ src/blocks/_pro/fixed-display/view.js | 3 +- 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/src/blocks/_pro/fixed-display/save.js b/src/blocks/_pro/fixed-display/save.js index 2d3d05161..37aa750f5 100644 --- a/src/blocks/_pro/fixed-display/save.js +++ b/src/blocks/_pro/fixed-display/save.js @@ -16,32 +16,36 @@ export default function save({ attributes }) { blockId, } = attributes; - const dataAttributes = { - ...(mode === 'show-on-scroll' && { - 'data-scroll-timing': scrollTiming.toString(), - 'data-scroll-timing-unit': scrollTimingUnit, - 'data-persist-visible': scrollPersistVisible ? 'true' : 'false', - }), - ...(displayAfterSeconds > 0 && { - 'data-display-after-seconds': displayAfterSeconds.toString(), - }), - ...(hideAfterSeconds > 0 && { - 'data-hide-after-seconds': hideAfterSeconds.toString(), - }), - ...(dontShowAgain && { - 'data-dont-show-again': 'true', - }), - }; - - if (mode !== 'show-on-scroll') { - delete dataAttributes['data-scroll-timing']; - delete dataAttributes['data-scroll-timing-unit']; - delete dataAttributes['data-persist-visible']; + // データ属性を定義し、条件に基づいて設定する + const dataAttributes = {}; + + if (mode === 'show-on-scroll') { + dataAttributes['data-scroll-timing'] = scrollTiming.toString(); + dataAttributes['data-scroll-timing-unit'] = scrollTimingUnit; + if (scrollPersistVisible) { + dataAttributes['data-persist-visible'] = 'true'; + } + } + + if (mode === 'display-hide-after-time' && displayAfterSeconds > 0) { + dataAttributes['data-display-after-seconds'] = + displayAfterSeconds.toString(); + } + + if (mode === 'display-hide-after-time' && hideAfterSeconds > 0) { + dataAttributes['data-hide-after-seconds'] = hideAfterSeconds.toString(); + } + + if (dontShowAgain) { + dataAttributes['data-dont-show-again'] = 'true'; } + // ブロックのプロパティを定義 const blockProps = useBlockProps.save({ className: `vk_fixed-display vk_fixed-display-mode-${mode} vk_fixed-display-position-${position} ${ - fixedPositionType !== undefined ? `vk_fixed-display-position-from-${fixedPositionType}` : '' + ['right', 'left'].includes(position) && fixedPositionType + ? `vk_fixed-display-position-from-${fixedPositionType}` + : '' } vk_fixed-display-${blockId} ${ displayAfterSeconds > 0 ? 'is-timed-display' : '' }`, @@ -51,7 +55,7 @@ export default function save({ attributes }) { : undefined, }, ...dataAttributes, - }); + }); return (
diff --git a/src/blocks/_pro/fixed-display/view.js b/src/blocks/_pro/fixed-display/view.js index e99d24cd5..d1e8e9141 100644 --- a/src/blocks/_pro/fixed-display/view.js +++ b/src/blocks/_pro/fixed-display/view.js @@ -58,7 +58,8 @@ window.addEventListener('scroll', function () { const timing = parseInt(item.getAttribute('data-scroll-timing'), 10); const unit = item.getAttribute('data-scroll-timing-unit'); - const scrollPersistVisible = item.getAttribute('data-persist-visible') === 'true'; + const scrollPersistVisible = + item.getAttribute('data-persist-visible') === 'true'; const timingInPixels = convertUnitToPixels(timing, unit); // スクロール位置が指定したタイミングを超えた場合に要素を表示 From fdb639404a8ac8b0a0671573ba6d9806e26d04c4 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Fri, 1 Nov 2024 16:24:38 +0900 Subject: [PATCH 44/83] Add ver.1.86.0 --- .../fixed-display/deprecated/1.86.0/save.js | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/blocks/_pro/fixed-display/deprecated/1.86.0/save.js diff --git a/src/blocks/_pro/fixed-display/deprecated/1.86.0/save.js b/src/blocks/_pro/fixed-display/deprecated/1.86.0/save.js new file mode 100644 index 000000000..4a73fe296 --- /dev/null +++ b/src/blocks/_pro/fixed-display/deprecated/1.86.0/save.js @@ -0,0 +1,39 @@ +import { InnerBlocks, useBlockProps } from '@wordpress/block-editor'; + +export default function save({ attributes }) { + const { + mode, + position, + scrollTiming, + scrollTimingUnit, + blockId, + scrollPersistVisible, + fixedPositionType, + fixedPositionValue, + fixedPositionUnit, + } = attributes; + + const blockProps = useBlockProps.save({ + className: `vk_fixed-display vk_fixed-display-mode-${mode} vk_fixed-display-position-${position} ${ + ['right', 'left'].includes(position) + ? `vk_fixed-display-position-from-${fixedPositionType}` + : '' + } vk_fixed-display-${blockId}`, + style: { + [fixedPositionType]: ['right', 'left'].includes(position) + ? `${fixedPositionValue}${fixedPositionUnit}` + : undefined, + }, + ...(mode === 'show-on-scroll' && { + 'data-scroll-timing': scrollTiming.toString(), + 'data-scroll-timing-unit': scrollTimingUnit, + 'data-persist-visible': scrollPersistVisible ? 'true' : 'false', + }), + }); + + return ( +
+ +
+ ); +} From dde5251a4ca98e5b52cb2c4a849e14b883095b8b Mon Sep 17 00:00:00 2001 From: mtdkei Date: Fri, 1 Nov 2024 16:27:06 +0900 Subject: [PATCH 45/83] Delete src/blocks/_pro/fixed-display/deprecated/1.85.1/save.js --- .../fixed-display/deprecated/1.85.1/save.js | 35 ------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/blocks/_pro/fixed-display/deprecated/1.85.1/save.js diff --git a/src/blocks/_pro/fixed-display/deprecated/1.85.1/save.js b/src/blocks/_pro/fixed-display/deprecated/1.85.1/save.js deleted file mode 100644 index e711662e2..000000000 --- a/src/blocks/_pro/fixed-display/deprecated/1.85.1/save.js +++ /dev/null @@ -1,35 +0,0 @@ -import { InnerBlocks, useBlockProps } from '@wordpress/block-editor'; - -export default function save({ attributes }) { - const { - mode, - position, - scrollTiming, - scrollTimingUnit, - blockId, - scrollPersistVisible, - fixedPositionType, - fixedPositionValue, - fixedPositionUnit, - } = attributes; - - const blockProps = useBlockProps.save({ - className: `vk_fixed-display vk_fixed-display-mode-${mode} vk_fixed-display-position-${position} vk_fixed-display-position-from-${fixedPositionType} vk_fixed-display-${blockId}`, - style: { - [fixedPositionType]: ['right', 'left'].includes(position) - ? `${fixedPositionValue}${fixedPositionUnit}` - : undefined, - }, - ...(mode === 'show-on-scroll' && { - 'data-scroll-timing': scrollTiming.toString(), - 'data-scroll-timing-unit': scrollTimingUnit, - 'data-persist-visible': scrollPersistVisible ? 'true' : 'false', - }), - }); - - return ( -
- -
- ); -} From 78a5cb6b9e6be6aeaad166a3b2239a2f60c899f1 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Fri, 1 Nov 2024 16:27:46 +0900 Subject: [PATCH 46/83] Delete save_1_85_1 --- src/blocks/_pro/fixed-display/deprecated/index.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/blocks/_pro/fixed-display/deprecated/index.js b/src/blocks/_pro/fixed-display/deprecated/index.js index 7edb69bf5..c6eda15f8 100644 --- a/src/blocks/_pro/fixed-display/deprecated/index.js +++ b/src/blocks/_pro/fixed-display/deprecated/index.js @@ -1,6 +1,5 @@ import save1_75_0 from './1.75.0/save'; import save1_81_1 from './1.81.1/save'; -import save1_85_1 from './1.85.1/save'; import save1_86_0 from './1.86.0/save'; const blockAttributes = { @@ -74,13 +73,9 @@ const blockAttributes3 = { const deprecated = [ { - attributes: blockAttributes2, + attributes: blockAttributes3, save: save1_86_0, }, - { - attributes: blockAttributes2, - save: save1_85_1, - }, { attributes: blockAttributes2, save: save1_81_1, From 4b7f2430a2f887e15b0a797786cbc1e8b77c4d7c Mon Sep 17 00:00:00 2001 From: mtdkei Date: Fri, 1 Nov 2024 16:30:45 +0900 Subject: [PATCH 47/83] Add test fle --- .../fixtures/blocks/vk-blocks__fixed-display__default.html | 4 ++-- .../blocks/vk-blocks__fixed-display__deprecated-1-86-0.html | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__deprecated-1-86-0.html diff --git a/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__default.html b/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__default.html index a72daca27..203b5569f 100644 --- a/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__default.html +++ b/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__default.html @@ -1,5 +1,5 @@ - -
+ +

あああああああああ

\ No newline at end of file diff --git a/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__deprecated-1-86-0.html b/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__deprecated-1-86-0.html new file mode 100644 index 000000000..a72daca27 --- /dev/null +++ b/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__deprecated-1-86-0.html @@ -0,0 +1,5 @@ + +
+

あああああああああ

+
+ \ No newline at end of file From a4396d092f2ff08110adb2cb317e9cb2edd06a3f Mon Sep 17 00:00:00 2001 From: mtdkei Date: Fri, 8 Nov 2024 09:42:35 +0900 Subject: [PATCH 48/83] In 'Always Visible' mode, 'Do not display again until the browser is closed' is hidden --- src/blocks/_pro/fixed-display/edit.js | 36 +++++++++++++++------------ 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index cba532e46..fa8de733c 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -297,24 +297,28 @@ export default function FixedDisplayEdit(props) { 'vk-blocks-pro' )} > - - setAttributes({ dontShowAgain: value }) - } - /> - -

- {__( - 'When enabled, the same content will not be shown again until the visitor closes their browser.', + {mode !== 'always-visible' && ( + - + checked={dontShowAgain} + onChange={(value) => + setAttributes({ dontShowAgain: value }) + } + /> + )} + {mode !== 'always-visible' && ( + +

+ {__( + 'When enabled, the same content will not be shown again until the visitor closes their browser.', + 'vk-blocks-pro' + )} +

+
+ )}
From e01f7542489965b813c667614825f9a506467b99 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Fri, 8 Nov 2024 09:52:42 +0900 Subject: [PATCH 49/83] Fix: pointer-events for show-on-scroll --- src/blocks/_pro/fixed-display/style.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/blocks/_pro/fixed-display/style.scss b/src/blocks/_pro/fixed-display/style.scss index 8b692e546..e445e799c 100644 --- a/src/blocks/_pro/fixed-display/style.scss +++ b/src/blocks/_pro/fixed-display/style.scss @@ -40,9 +40,11 @@ &-show-on-scroll { opacity: 0; transition: opacity 0.3s ease; + pointer-events: none; &.is-visible { opacity: 1; + pointer-events: auto; } } } From 24309a2e5cfb151d4e31654bea33b676b1cb5dc8 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Fri, 8 Nov 2024 09:55:24 +0900 Subject: [PATCH 50/83] Fix: PanelBody setting --- src/blocks/_pro/fixed-display/edit.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index fa8de733c..50cc875f5 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -291,13 +291,13 @@ export default function FixedDisplayEdit(props) { )} + {mode !== 'always-visible' && ( - {mode !== 'always-visible' && ( - )} - {mode !== 'always-visible' && (

{__( @@ -318,8 +316,8 @@ export default function FixedDisplayEdit(props) { )}

- )}
+ )}
Date: Fri, 8 Nov 2024 10:01:00 +0900 Subject: [PATCH 51/83] Delete blockProps style --- src/blocks/_pro/fixed-display/edit.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index 50cc875f5..c9c17c30e 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -80,11 +80,6 @@ export default function FixedDisplayEdit(props) { ? `vk_fixed-display-position-from-${fixedPositionType}` : '' } vk_fixed-display-${blockId}`, - style: { - [fixedPositionType]: ['right', 'left'].includes(position) - ? `${fixedPositionValue}${fixedPositionUnit}` - : undefined, - }, }); return ( @@ -292,12 +287,12 @@ export default function FixedDisplayEdit(props) { )} {mode !== 'always-visible' && ( - + - + )}
From 1d093faf24dc906d6bc0ae9f33e1f44d9f68c951 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Fri, 8 Nov 2024 10:02:09 +0900 Subject: [PATCH 52/83] Add: initializeDisplayHide --- src/blocks/_pro/fixed-display/view.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/blocks/_pro/fixed-display/view.js b/src/blocks/_pro/fixed-display/view.js index d1e8e9141..85e69bbf4 100644 --- a/src/blocks/_pro/fixed-display/view.js +++ b/src/blocks/_pro/fixed-display/view.js @@ -72,7 +72,7 @@ window.addEventListener('scroll', function () { }); // 表示・非表示タイマー設定 -window.addEventListener('DOMContentLoaded', function () { +function initializeDisplayHide() { const items = document.querySelectorAll( '.vk_fixed-display-mode-display-hide-after-time' ); @@ -99,7 +99,11 @@ window.addEventListener('DOMContentLoaded', function () { dontShowAgain ); }); -}); +} + +// 両方のイベントで関数を呼び出し +window.addEventListener('DOMContentLoaded', initializeDisplayHide); +window.addEventListener('load', initializeDisplayHide); // 単位をピクセル値に変換する関数 function convertUnitToPixels(value, unit) { From bbc53f08c521b234d294681969839def37ee7acc Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 11 Nov 2024 09:50:04 +0900 Subject: [PATCH 53/83] Undo toggle settting for Timer --- src/blocks/_pro/fixed-display/edit.js | 63 +++++++++++++++++++++++---- 1 file changed, 55 insertions(+), 8 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index c9c17c30e..67028e9e5 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -49,6 +49,20 @@ export default function FixedDisplayEdit(props) { hideAfterSeconds || '0' ); + const resetModeAttributes = () => { + setAttributes({ + scrollTiming: undefined, + scrollTimingUnit: undefined, + scrollPersistVisible: false, + displayAfterSeconds: undefined, + hideAfterSeconds: undefined, + }); + }; + + useEffect(() => { + resetModeAttributes(); + }, [mode]); + useEffect(() => { if ( blockId === undefined || @@ -229,6 +243,27 @@ export default function FixedDisplayEdit(props) { )} {mode === 'display-hide-after-time' && ( + + 0} + onChange={(value) => { + if (value) { + setAttributes({ + displayAfterSeconds: Math.max( + 0.1, + displayAfterSeconds || 0.1 + ), + }); + } else { + setAttributes({ displayAfterSeconds: 0 }); + } + }} + /> + {displayAfterSeconds > 0 && ( + + )} + 0} + onChange={(value) => { + if (value) { + setAttributes({ + hideAfterSeconds: Math.max( + 0.1, + hideAfterSeconds || 0.1 + ), + }); + } else { + setAttributes({ hideAfterSeconds: 0 }); + } + }} + /> + {hideAfterSeconds > 0 && ( - -

- {__( - 'When combined with "Show on Scroll", you can set the time the block remains visible after the user scrolls to a specific point, as well as when it disappears.', - 'vk-blocks-pro' - )} -

-
+ )}
)} {mode !== 'always-visible' && ( From b282a781ccbd0ce8812f8a7b34ab31d4695a437b Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 11 Nov 2024 09:51:01 +0900 Subject: [PATCH 54/83] Fix: Switch between classes by mode --- src/blocks/_pro/fixed-display/save.js | 59 +++++++++++++++------------ 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/src/blocks/_pro/fixed-display/save.js b/src/blocks/_pro/fixed-display/save.js index 37aa750f5..563d4d374 100644 --- a/src/blocks/_pro/fixed-display/save.js +++ b/src/blocks/_pro/fixed-display/save.js @@ -4,52 +4,61 @@ export default function save({ attributes }) { const { mode, position, - scrollTiming, - scrollTimingUnit, - scrollPersistVisible, - fixedPositionType, - fixedPositionValue, - fixedPositionUnit, - displayAfterSeconds, - hideAfterSeconds, - dontShowAgain, + scrollTiming = 0, // デフォルト値を設定 + scrollTimingUnit = 'px', + scrollPersistVisible = false, + fixedPositionType = 'top', + fixedPositionValue = 50, + fixedPositionUnit = 'svh', + displayAfterSeconds = 0, + hideAfterSeconds = 0, + dontShowAgain = false, blockId, } = attributes; - // データ属性を定義し、条件に基づいて設定する - const dataAttributes = {}; + // dataAttributesとクラスを初期化 + const dataAttributes = { 'data-block-id': blockId || '' }; + let extraClasses = ''; + // "show-on-scroll"モードのときにのみスクロール関連の属性を設定 if (mode === 'show-on-scroll') { dataAttributes['data-scroll-timing'] = scrollTiming.toString(); dataAttributes['data-scroll-timing-unit'] = scrollTimingUnit; if (scrollPersistVisible) { dataAttributes['data-persist-visible'] = 'true'; } + extraClasses += ' vk_fixed-display-mode-show-on-scroll'; + } else if (mode === 'display-hide-after-time') { + // "display-hide-after-time"モードのときにのみタイミング属性を設定 + if (displayAfterSeconds > 0) { + dataAttributes['data-display-after-seconds'] = + displayAfterSeconds.toString(); + extraClasses += ' is-timed-display'; // displayタイミングがある場合のクラス + } + if (hideAfterSeconds > 0) { + dataAttributes['data-hide-after-seconds'] = + hideAfterSeconds.toString(); + } + extraClasses += ' vk_fixed-display-mode-display-hide-after-time'; + } else if (mode === 'always-visible') { + // "always-visible"モード専用のクラス + extraClasses += ' vk_fixed-display-mode-always-visible'; } - if (mode === 'display-hide-after-time' && displayAfterSeconds > 0) { - dataAttributes['data-display-after-seconds'] = - displayAfterSeconds.toString(); - } - - if (mode === 'display-hide-after-time' && hideAfterSeconds > 0) { - dataAttributes['data-hide-after-seconds'] = hideAfterSeconds.toString(); - } - + // dontShowAgain が true のときにデータ属性を追加 if (dontShowAgain) { dataAttributes['data-dont-show-again'] = 'true'; } - // ブロックのプロパティを定義 + // ブロックのプロパティを設定し、不要なクラスが残らないようにする const blockProps = useBlockProps.save({ - className: `vk_fixed-display vk_fixed-display-mode-${mode} vk_fixed-display-position-${position} ${ + className: `vk_fixed-display vk_fixed-display-position-${position} ${ ['right', 'left'].includes(position) && fixedPositionType ? `vk_fixed-display-position-from-${fixedPositionType}` : '' - } vk_fixed-display-${blockId} ${ - displayAfterSeconds > 0 ? 'is-timed-display' : '' - }`, + } vk_fixed-display-${blockId}${extraClasses}`, // モード別にクラスを切り替え style: { + // モードに応じて必要な場合のみポジションスタイルを適用 [fixedPositionType]: ['right', 'left'].includes(position) ? `${fixedPositionValue}${fixedPositionUnit}` : undefined, From 128b20e045acbb1fce66748b7e5dab8c1a099c99 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 11 Nov 2024 09:51:28 +0900 Subject: [PATCH 55/83] Fix: lint --- src/blocks/_pro/fixed-display/edit.js | 175 ++++++++++++++------------ src/blocks/_pro/fixed-display/save.js | 2 +- 2 files changed, 93 insertions(+), 84 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index 67028e9e5..e191e8ed3 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -62,7 +62,7 @@ export default function FixedDisplayEdit(props) { useEffect(() => { resetModeAttributes(); }, [mode]); - + useEffect(() => { if ( blockId === undefined || @@ -243,94 +243,103 @@ export default function FixedDisplayEdit(props) { )} {mode === 'display-hide-after-time' && ( - - 0} - onChange={(value) => { - if (value) { - setAttributes({ - displayAfterSeconds: Math.max( - 0.1, - displayAfterSeconds || 0.1 - ), - }); - } else { - setAttributes({ displayAfterSeconds: 0 }); - } - }} - /> - {displayAfterSeconds > 0 && ( - 0} onChange={(value) => { - setTempDisplayAfterSeconds(value); - }} - onBlur={() => { - const parsedValue = parseFloat( - tempDisplayAfterSeconds - ); - const finalValue = - isNaN(parsedValue) || parsedValue < 0 - ? 0 - : parsedValue; - setAttributes({ - displayAfterSeconds: finalValue, - }); - setTempDisplayAfterSeconds( - finalValue.toString() - ); + if (value) { + setAttributes({ + displayAfterSeconds: Math.max( + 0.1, + displayAfterSeconds || 0.1 + ), + }); + } else { + setAttributes({ displayAfterSeconds: 0 }); + } }} - type="number" - min="0" - step="0.1" /> - - )} - 0} - onChange={(value) => { - if (value) { - setAttributes({ - hideAfterSeconds: Math.max( - 0.1, - hideAfterSeconds || 0.1 - ), - }); - } else { - setAttributes({ hideAfterSeconds: 0 }); - } - }} - /> - {hideAfterSeconds > 0 && ( - 0 && ( + { + setTempDisplayAfterSeconds(value); + }} + onBlur={() => { + const parsedValue = parseFloat( + tempDisplayAfterSeconds + ); + const finalValue = + isNaN(parsedValue) || parsedValue < 0 + ? 0 + : parsedValue; + setAttributes({ + displayAfterSeconds: finalValue, + }); + setTempDisplayAfterSeconds( + finalValue.toString() + ); + }} + type="number" + min="0" + step="0.1" + /> + )} + 0} onChange={(value) => { - setTempHideAfterSeconds(value); - }} - onBlur={() => { - const parsedValue = - parseFloat(tempHideAfterSeconds); - const finalValue = - isNaN(parsedValue) || parsedValue < 0 - ? 0 - : parsedValue; - setAttributes({ - hideAfterSeconds: finalValue, - }); - setTempHideAfterSeconds(finalValue.toString()); + if (value) { + setAttributes({ + hideAfterSeconds: Math.max( + 0.1, + hideAfterSeconds || 0.1 + ), + }); + } else { + setAttributes({ hideAfterSeconds: 0 }); + } }} - type="number" - min="0" - step="0.1" /> - )} + {hideAfterSeconds > 0 && ( + { + setTempHideAfterSeconds(value); + }} + onBlur={() => { + const parsedValue = + parseFloat(tempHideAfterSeconds); + const finalValue = + isNaN(parsedValue) || parsedValue < 0 + ? 0 + : parsedValue; + setAttributes({ + hideAfterSeconds: finalValue, + }); + setTempHideAfterSeconds( + finalValue.toString() + ); + }} + type="number" + min="0" + step="0.1" + /> + )} )} {mode !== 'always-visible' && ( diff --git a/src/blocks/_pro/fixed-display/save.js b/src/blocks/_pro/fixed-display/save.js index 563d4d374..8764b32d1 100644 --- a/src/blocks/_pro/fixed-display/save.js +++ b/src/blocks/_pro/fixed-display/save.js @@ -56,7 +56,7 @@ export default function save({ attributes }) { ['right', 'left'].includes(position) && fixedPositionType ? `vk_fixed-display-position-from-${fixedPositionType}` : '' - } vk_fixed-display-${blockId}${extraClasses}`, // モード別にクラスを切り替え + } vk_fixed-display-${blockId}${extraClasses}`, style: { // モードに応じて必要な場合のみポジションスタイルを適用 [fixedPositionType]: ['right', 'left'].includes(position) From 64d08f7b9ad348c63a6d070b70ced5621898801b Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 11 Nov 2024 12:35:15 +0900 Subject: [PATCH 56/83] Add VK_Blocks_Fixed_Display --- .../blocks/class-vk-blocks-fixed-display.php | 51 +++++++++++++++++++ inc/vk-blocks-pro/vk-blocks-pro-functions.php | 2 + 2 files changed, 53 insertions(+) create mode 100644 inc/vk-blocks-pro/blocks/class-vk-blocks-fixed-display.php diff --git a/inc/vk-blocks-pro/blocks/class-vk-blocks-fixed-display.php b/inc/vk-blocks-pro/blocks/class-vk-blocks-fixed-display.php new file mode 100644 index 000000000..0bf3f06f8 --- /dev/null +++ b/inc/vk-blocks-pro/blocks/class-vk-blocks-fixed-display.php @@ -0,0 +1,51 @@ +]*class="[^"]*vk_fixed-display-mode-(display-hide-after-time|show-on-scroll)[^"]*")/i', '$1 style="opacity:0;"', $block_content ); + } + return $block_content; + } +} diff --git a/inc/vk-blocks-pro/vk-blocks-pro-functions.php b/inc/vk-blocks-pro/vk-blocks-pro-functions.php index 62e2f5bf8..715fee00c 100644 --- a/inc/vk-blocks-pro/vk-blocks-pro-functions.php +++ b/inc/vk-blocks-pro/vk-blocks-pro-functions.php @@ -11,7 +11,9 @@ require_once __DIR__ . '/extensions/common/custom-format.php'; require_once __DIR__ . '/extensions/common/custom-block-style.php'; require_once __DIR__ . '/blocks/class-vk-blocks-blog-card.php'; +require_once __DIR__ . '/blocks/class-vk-blocks-fixed-display.php'; VK_Blocks_Blog_Card::init(); +VK_Blocks_Fixed_Display::init(); require_once __DIR__ . '/App/RestAPI/BlockMeta/class-vk-blocks-pro-entrypoint.php'; new Vk_Blocks_Pro_EntryPoint(); From 491edb3a8e6c6a5531fdd766ade5f2ff38583bc0 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 11 Nov 2024 12:35:59 +0900 Subject: [PATCH 57/83] Fix: handleVisibility --- src/blocks/_pro/fixed-display/view.js | 77 +++++++++++++++------------ 1 file changed, 42 insertions(+), 35 deletions(-) diff --git a/src/blocks/_pro/fixed-display/view.js b/src/blocks/_pro/fixed-display/view.js index 85e69bbf4..0d85cc6dd 100644 --- a/src/blocks/_pro/fixed-display/view.js +++ b/src/blocks/_pro/fixed-display/view.js @@ -9,38 +9,6 @@ function getSessionStorageFlag(key) { return sessionStorage.getItem(key) !== null; } -// 要素の表示・非表示を制御する共通関数 -function handleVisibility( - item, - displayAfterSeconds, - hideAfterSeconds, - blockId, - dontShowAgain -) { - if (displayAfterSeconds > 0) { - setTimeout(() => { - item.classList.add('is-timed-visible'); - if (dontShowAgain) { - setSessionStorageFlag(`displayed_${blockId}`, 'true'); - } - }, displayAfterSeconds * 1000); - } else { - item.classList.add('is-timed-visible'); - if (dontShowAgain) { - setSessionStorageFlag(`displayed_${blockId}`, 'true'); - } - } - - if (hideAfterSeconds > 0) { - setTimeout( - () => { - item.classList.remove('is-timed-visible'); - }, - (displayAfterSeconds + hideAfterSeconds) * 1000 - ); - } -} - // スクロールタイミング設定 window.addEventListener('scroll', function () { const items = document.querySelectorAll( @@ -72,16 +40,55 @@ window.addEventListener('scroll', function () { }); // 表示・非表示タイマー設定 +function handleVisibility( + item, + displayAfterSeconds, + hideAfterSeconds, + blockId, + dontShowAgain +) { + // displayAfterSeconds がある場合のみ、is-timed-visible クラスを追加 + if (displayAfterSeconds !== null && displayAfterSeconds > 0) { + setTimeout(() => { + item.classList.add('is-timed-visible'); + if (dontShowAgain) { + setSessionStorageFlag(`displayed_${blockId}`, 'true'); + } + }, displayAfterSeconds * 1000); + } else if (displayAfterSeconds === 0) { + item.classList.add('is-timed-visible'); + if (dontShowAgain) { + setSessionStorageFlag(`displayed_${blockId}`, 'true'); + } + } + + // hideAfterSeconds が指定されている場合、時間経過後に is-timed-hide クラスを追加 + if (hideAfterSeconds > 0) { + setTimeout( + () => { + item.classList.remove('is-timed-visible'); + item.classList.add('is-timed-hide'); + }, + (displayAfterSeconds || 0) * 1000 + hideAfterSeconds * 1000 + ); + } +} + +// DOM読み込み後に初期化関数を実行 function initializeDisplayHide() { const items = document.querySelectorAll( '.vk_fixed-display-mode-display-hide-after-time' ); items.forEach((item) => { - const displayAfterSeconds = - parseFloat(item.getAttribute('data-display-after-seconds')) || 0; + const displayAfterSecondsAttr = item.getAttribute( + 'data-display-after-seconds' + ); const hideAfterSeconds = parseFloat(item.getAttribute('data-hide-after-seconds')) || 0; + const displayAfterSeconds = displayAfterSecondsAttr + ? parseFloat(displayAfterSecondsAttr) + : null; const blockId = item.getAttribute('data-block-id'); const dontShowAgain = item.getAttribute('data-dont-show-again') === 'true'; @@ -101,7 +108,7 @@ function initializeDisplayHide() { }); } -// 両方のイベントで関数を呼び出し +window.initializeDisplayHide = initializeDisplayHide; window.addEventListener('DOMContentLoaded', initializeDisplayHide); window.addEventListener('load', initializeDisplayHide); From 2b3531cd5b1440a67389495be4581b8d14bbb040 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 11 Nov 2024 12:36:55 +0900 Subject: [PATCH 58/83] Add important --- src/blocks/_pro/fixed-display/style.scss | 48 ++++++++++++------------ 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/src/blocks/_pro/fixed-display/style.scss b/src/blocks/_pro/fixed-display/style.scss index e445e799c..086015c84 100644 --- a/src/blocks/_pro/fixed-display/style.scss +++ b/src/blocks/_pro/fixed-display/style.scss @@ -9,27 +9,6 @@ position: fixed; margin-block-start: 0; z-index: 99999; - - /* タイマー機能用クラス */ - &.is-timed-hide { - - &:not(.is-timed-visible) { - opacity: 0; - transition: opacity 0.3s ease; - pointer-events: none; - } - } - - &.is-timed-display { - opacity: 0; - transition: opacity 0.3s ease; - pointer-events: none; - - &.is-timed-visible { - opacity: 1; - } - } - } .vk_fixed-display-mode { @@ -38,15 +17,38 @@ } &-show-on-scroll { - opacity: 0; transition: opacity 0.3s ease; pointer-events: none; &.is-visible { - opacity: 1; + opacity: 1 !important; pointer-events: auto; } } + + &-display-hide-after-time { + opacity: 1 !important; + transition: opacity 0.3s ease; + + &.is-timed-display { + opacity: 0 !important; + pointer-events: none; + + &.is-timed-visible { + opacity: 1 !important; + } + } + + &.is-timed-hide { + transition: opacity 0.3s ease; + + &:not(.is-timed-visible), + &.is-timed-hidden { + opacity: 0 !important; + pointer-events: none; + } + } + } } .vk_fixed-display-position { From 173d61a6afe8bd9cb09ea449556857a2ee4620a8 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 11 Nov 2024 12:38:03 +0900 Subject: [PATCH 59/83] Fix mode switching --- src/blocks/_pro/fixed-display/edit.js | 35 +++++++++++++++++++++------ 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index e191e8ed3..e757fc1ac 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -31,17 +31,24 @@ export default function FixedDisplayEdit(props) { mode, position, blockId, - scrollTiming = 100, - scrollTimingUnit = 'px', - scrollPersistVisible = false, - fixedPositionType = 'top', - fixedPositionValue = 50, - fixedPositionUnit = 'svh', + scrollTiming, + scrollTimingUnit, + scrollPersistVisible, + fixedPositionType, + fixedPositionValue, + fixedPositionUnit, displayAfterSeconds, hideAfterSeconds, dontShowAgain, } = attributes; + const [tempScrollTiming, setTempScrollTiming] = useState( + scrollTiming || '0' + ); + const [tempScrollTimingUnit, setTempScrollTimingUnit] = useState( + scrollTimingUnit || 'px' + ); + const [tempDisplayAfterSeconds, setTempDisplayAfterSeconds] = useState( displayAfterSeconds || '0' ); @@ -49,6 +56,7 @@ export default function FixedDisplayEdit(props) { hideAfterSeconds || '0' ); + // モードが切り替わる際に関連する属性をリセットし、一時変数もリセット const resetModeAttributes = () => { setAttributes({ scrollTiming: undefined, @@ -57,12 +65,23 @@ export default function FixedDisplayEdit(props) { displayAfterSeconds: undefined, hideAfterSeconds: undefined, }); + setTempScrollTiming('0'); + setTempScrollTimingUnit('px'); + setTempDisplayAfterSeconds('0'); + setTempHideAfterSeconds('0'); }; useEffect(() => { resetModeAttributes(); }, [mode]); + useEffect(() => { + setTempScrollTiming(scrollTiming || '0'); + setTempScrollTimingUnit(scrollTimingUnit || 'px'); + setTempDisplayAfterSeconds(displayAfterSeconds || '0'); + setTempHideAfterSeconds(hideAfterSeconds || '0'); + }, [scrollTiming, scrollTimingUnit, displayAfterSeconds, hideAfterSeconds]); + useEffect(() => { if ( blockId === undefined || @@ -215,13 +234,15 @@ export default function FixedDisplayEdit(props) { > { const unit = units.find((unit) => nextValue.endsWith(unit.value) ) || units[0]; const value = parseFloat(nextValue) || 0; + setTempScrollTiming(value); + setTempScrollTimingUnit(unit.value); setAttributes({ scrollTiming: value, scrollTimingUnit: unit.value, From 74a18b1248d04515a16e22e14a82e3cf5689a5f0 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 11 Nov 2024 12:43:39 +0900 Subject: [PATCH 60/83] Fix: lint --- inc/vk-blocks-pro/blocks/class-vk-blocks-fixed-display.php | 4 ++-- inc/vk-blocks-pro/vk-blocks-pro-functions.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/vk-blocks-pro/blocks/class-vk-blocks-fixed-display.php b/inc/vk-blocks-pro/blocks/class-vk-blocks-fixed-display.php index 0bf3f06f8..4aa70db70 100644 --- a/inc/vk-blocks-pro/blocks/class-vk-blocks-fixed-display.php +++ b/inc/vk-blocks-pro/blocks/class-vk-blocks-fixed-display.php @@ -42,10 +42,10 @@ public static function init() { * @return string 変更されたHTMLコンテンツ. */ public function filter_block_opacity( $block_content, $block ) { - if ( isset( $block['attrs']['mode'] ) && in_array( $block['attrs']['mode'], [ 'display-hide-after-time', 'show-on-scroll' ], true ) ) { + if ( isset( $block['attrs']['mode'] ) && in_array( $block['attrs']['mode'], array( 'display-hide-after-time', 'show-on-scroll' ), true ) ) { // 指定されたモードの場合、初期 opacity: 0 を適用 $block_content = preg_replace( '/(]*class="[^"]*vk_fixed-display-mode-(display-hide-after-time|show-on-scroll)[^"]*")/i', '$1 style="opacity:0;"', $block_content ); } return $block_content; - } + } } diff --git a/inc/vk-blocks-pro/vk-blocks-pro-functions.php b/inc/vk-blocks-pro/vk-blocks-pro-functions.php index 715fee00c..6afc2ed7d 100644 --- a/inc/vk-blocks-pro/vk-blocks-pro-functions.php +++ b/inc/vk-blocks-pro/vk-blocks-pro-functions.php @@ -11,7 +11,7 @@ require_once __DIR__ . '/extensions/common/custom-format.php'; require_once __DIR__ . '/extensions/common/custom-block-style.php'; require_once __DIR__ . '/blocks/class-vk-blocks-blog-card.php'; -require_once __DIR__ . '/blocks/class-vk-blocks-fixed-display.php'; +require_once __DIR__ . '/blocks/class-vk-blocks-fixed-display.php'; VK_Blocks_Blog_Card::init(); VK_Blocks_Fixed_Display::init(); require_once __DIR__ . '/App/RestAPI/BlockMeta/class-vk-blocks-pro-entrypoint.php'; From 02d53be14c9d6446b06a307507b650d0ad38dab8 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 11 Nov 2024 12:44:55 +0900 Subject: [PATCH 61/83] Fix: html --- .../fixtures/blocks/vk-blocks__fixed-display__default.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__default.html b/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__default.html index 203b5569f..d0fe90bc6 100644 --- a/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__default.html +++ b/test/e2e-tests/fixtures/blocks/vk-blocks__fixed-display__default.html @@ -1,5 +1,5 @@ - -
+ +

あああああああああ

\ No newline at end of file From bb29dcfd95b5edc88979becbc4e9b8e5ee9419fb Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 18 Nov 2024 15:12:56 +0900 Subject: [PATCH 62/83] Delete toggle for timer setting --- src/blocks/_pro/fixed-display/edit.js | 145 ++++++++------------------ src/blocks/_pro/fixed-display/save.js | 4 +- src/blocks/_pro/fixed-display/view.js | 23 ++-- 3 files changed, 56 insertions(+), 116 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index e757fc1ac..86f388514 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -262,107 +262,54 @@ export default function FixedDisplayEdit(props) { /> )} - {mode === 'display-hide-after-time' && ( - - 0} - onChange={(value) => { - if (value) { - setAttributes({ - displayAfterSeconds: Math.max( - 0.1, - displayAfterSeconds || 0.1 - ), - }); - } else { - setAttributes({ displayAfterSeconds: 0 }); - } - }} - /> - {displayAfterSeconds > 0 && ( - { - setTempDisplayAfterSeconds(value); - }} - onBlur={() => { - const parsedValue = parseFloat( - tempDisplayAfterSeconds - ); - const finalValue = - isNaN(parsedValue) || parsedValue < 0 - ? 0 - : parsedValue; - setAttributes({ - displayAfterSeconds: finalValue, - }); - setTempDisplayAfterSeconds( - finalValue.toString() - ); - }} - type="number" - min="0" - step="0.1" - /> - )} - + +

+ {__( + 'Set the timing for display and hide. Enter 0 to disable timing for each option.', 'vk-blocks-pro' )} - checked={hideAfterSeconds > 0} - onChange={(value) => { - if (value) { - setAttributes({ - hideAfterSeconds: Math.max( - 0.1, - hideAfterSeconds || 0.1 - ), - }); - } else { - setAttributes({ hideAfterSeconds: 0 }); - } - }} - /> - {hideAfterSeconds > 0 && ( - { - setTempHideAfterSeconds(value); - }} - onBlur={() => { - const parsedValue = - parseFloat(tempHideAfterSeconds); - const finalValue = - isNaN(parsedValue) || parsedValue < 0 - ? 0 - : parsedValue; - setAttributes({ - hideAfterSeconds: finalValue, - }); - setTempHideAfterSeconds( - finalValue.toString() - ); - }} - type="number" - min="0" - step="0.1" - /> - )} - - )} +

+
+ { + setTempDisplayAfterSeconds(value); + }} + onBlur={() => { + const parsedValue = parseFloat(tempDisplayAfterSeconds); + const finalValue = + isNaN(parsedValue) || parsedValue < 0 ? 0 : parsedValue; + setAttributes({ + displayAfterSeconds: finalValue, + }); + setTempDisplayAfterSeconds(finalValue.toString()); + }} + type="number" + min="0" + step="0.1" + /> + { + setTempHideAfterSeconds(value); + }} + onBlur={() => { + const parsedValue = parseFloat(tempHideAfterSeconds); + const finalValue = + isNaN(parsedValue) || parsedValue < 0 ? 0 : parsedValue; + setAttributes({ + hideAfterSeconds: finalValue, + }); + setTempHideAfterSeconds(finalValue.toString()); + }} + type="number" + min="0" + step="0.1" + /> +
{mode !== 'always-visible' && ( 0) { dataAttributes['data-display-after-seconds'] = displayAfterSeconds.toString(); - extraClasses += ' is-timed-display'; // displayタイミングがある場合のクラス + extraClasses += ' is-timed-display'; } if (hideAfterSeconds > 0) { dataAttributes['data-hide-after-seconds'] = @@ -56,7 +56,7 @@ export default function save({ attributes }) { ['right', 'left'].includes(position) && fixedPositionType ? `vk_fixed-display-position-from-${fixedPositionType}` : '' - } vk_fixed-display-${blockId}${extraClasses}`, + } vk_fixed-display-${blockId} ${extraClasses}`, style: { // モードに応じて必要な場合のみポジションスタイルを適用 [fixedPositionType]: ['right', 'left'].includes(position) diff --git a/src/blocks/_pro/fixed-display/view.js b/src/blocks/_pro/fixed-display/view.js index 0d85cc6dd..6f33e7aeb 100644 --- a/src/blocks/_pro/fixed-display/view.js +++ b/src/blocks/_pro/fixed-display/view.js @@ -47,30 +47,23 @@ function handleVisibility( blockId, dontShowAgain ) { - // displayAfterSeconds がある場合のみ、is-timed-visible クラスを追加 - if (displayAfterSeconds !== null && displayAfterSeconds > 0) { + // displayAfterSeconds が 0 以上の場合に表示 + if (displayAfterSeconds >= 0) { setTimeout(() => { item.classList.add('is-timed-visible'); + // dontShowAgain が true の場合、SessionStorage に記録 if (dontShowAgain) { setSessionStorageFlag(`displayed_${blockId}`, 'true'); } }, displayAfterSeconds * 1000); - } else if (displayAfterSeconds === 0) { - item.classList.add('is-timed-visible'); - if (dontShowAgain) { - setSessionStorageFlag(`displayed_${blockId}`, 'true'); - } } - // hideAfterSeconds が指定されている場合、時間経過後に is-timed-hide クラスを追加 + // hideAfterSeconds が 0 より大きい場合に非表示 if (hideAfterSeconds > 0) { - setTimeout( - () => { - item.classList.remove('is-timed-visible'); - item.classList.add('is-timed-hide'); - }, - (displayAfterSeconds || 0) * 1000 + hideAfterSeconds * 1000 - ); + setTimeout(() => { + item.classList.remove('is-timed-visible'); + item.classList.add('is-timed-hide'); + }, (displayAfterSeconds || 0) * 1000 + hideAfterSeconds * 1000); } } From 206ad46b9a7b4123f606c81b51b439de8f080d36 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 18 Nov 2024 16:27:12 +0900 Subject: [PATCH 63/83] Move to index.php in Fixed Display block --- .../blocks/class-vk-blocks-fixed-display.php | 51 ------------------- inc/vk-blocks-pro/vk-blocks-pro-functions.php | 2 - src/blocks/_pro/fixed-display/index.php | 51 +++++++++++++++++-- 3 files changed, 47 insertions(+), 57 deletions(-) delete mode 100644 inc/vk-blocks-pro/blocks/class-vk-blocks-fixed-display.php diff --git a/inc/vk-blocks-pro/blocks/class-vk-blocks-fixed-display.php b/inc/vk-blocks-pro/blocks/class-vk-blocks-fixed-display.php deleted file mode 100644 index 4aa70db70..000000000 --- a/inc/vk-blocks-pro/blocks/class-vk-blocks-fixed-display.php +++ /dev/null @@ -1,51 +0,0 @@ -]*class="[^"]*vk_fixed-display-mode-(display-hide-after-time|show-on-scroll)[^"]*")/i', '$1 style="opacity:0;"', $block_content ); - } - return $block_content; - } -} diff --git a/inc/vk-blocks-pro/vk-blocks-pro-functions.php b/inc/vk-blocks-pro/vk-blocks-pro-functions.php index 6afc2ed7d..62e2f5bf8 100644 --- a/inc/vk-blocks-pro/vk-blocks-pro-functions.php +++ b/inc/vk-blocks-pro/vk-blocks-pro-functions.php @@ -11,9 +11,7 @@ require_once __DIR__ . '/extensions/common/custom-format.php'; require_once __DIR__ . '/extensions/common/custom-block-style.php'; require_once __DIR__ . '/blocks/class-vk-blocks-blog-card.php'; -require_once __DIR__ . '/blocks/class-vk-blocks-fixed-display.php'; VK_Blocks_Blog_Card::init(); -VK_Blocks_Fixed_Display::init(); require_once __DIR__ . '/App/RestAPI/BlockMeta/class-vk-blocks-pro-entrypoint.php'; new Vk_Blocks_Pro_EntryPoint(); diff --git a/src/blocks/_pro/fixed-display/index.php b/src/blocks/_pro/fixed-display/index.php index 4f8eb3f73..bf521e536 100644 --- a/src/blocks/_pro/fixed-display/index.php +++ b/src/blocks/_pro/fixed-display/index.php @@ -5,6 +5,52 @@ * @package vk-blocks */ +/** + * VK_Blocks_Fixed_Display class + */ +if ( ! class_exists( 'VK_Blocks_Fixed_Display' ) ) { + + class VK_Blocks_Fixed_Display { + + /** + * インスタンスを保持するためのプロパティ + * + * @var VK_Blocks_Fixed_Display|null + */ + private static $instance = null; + + /** + * シングルトンインスタンスを取得する初期化関数 + * + * @return VK_Blocks_Fixed_Display インスタンス + */ + public static function init() { + if ( ! self::$instance ) { + self::$instance = new self(); + add_filter( 'render_block', array( self::$instance, 'filter_block_opacity' ), 10, 2 ); + } + return self::$instance; + } + + /** + * ブロックに初期 opacity: 0 を適用 + * + * @param string $block_content ブロックのHTMLコンテンツ. + * @param array $block ブロックの情報. + * @return string 変更されたHTMLコンテンツ. + */ + public function filter_block_opacity( $block_content, $block ) { + if ( isset( $block['attrs']['mode'] ) && in_array( $block['attrs']['mode'], array( 'display-hide-after-time', 'show-on-scroll' ), true ) ) { + // 指定されたモードの場合、初期 opacity: 0 を適用 + $block_content = preg_replace( '/(]*class="[^"]*vk_fixed-display-mode-(display-hide-after-time|show-on-scroll)[^"]*")/i', '$1 style="opacity:0;"', $block_content ); + } + return $block_content; + } + } + + VK_Blocks_Fixed_Display::init(); +} + /** * Register Fixed display block. * @@ -21,7 +67,7 @@ function vk_blocks_register_block_fixed_display() { ); } - // Register Style. + // Register Script. if ( ! is_admin() ) { wp_register_script( 'vk-blocks/fixed-display-script', @@ -33,10 +79,7 @@ function vk_blocks_register_block_fixed_display() { } // クラシックテーマ & 6.5 環境で $assets = array() のように空にしないと重複登録になるため - // ここで初期化しておく $assets = array(); - // Attend to load separate assets. - // 分割読み込みが有効な場合のみ、分割読み込み用のスクリプトを登録する if ( method_exists( 'VK_Blocks_Block_Loader', 'should_load_separate_assets' ) && VK_Blocks_Block_Loader::should_load_separate_assets() ) { $assets = array( 'style' => 'vk-blocks/fixed-display', From bcffd864d06e8766b06d1972ff3e768c711d8850 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 18 Nov 2024 16:44:40 +0900 Subject: [PATCH 64/83] Add prevModeRef --- src/blocks/_pro/fixed-display/edit.js | 154 +++++++++++++++++--------- 1 file changed, 100 insertions(+), 54 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index 86f388514..3c486d535 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -13,7 +13,7 @@ import { RadioControl, TextControl, } from '@wordpress/components'; -import { useState, useEffect } from '@wordpress/element'; +import { useRef, useState, useEffect } from '@wordpress/element'; import { isParentReusableBlock } from '@vkblocks/utils/is-parent-reusable-block'; const units = [ @@ -57,6 +57,19 @@ export default function FixedDisplayEdit(props) { ); // モードが切り替わる際に関連する属性をリセットし、一時変数もリセット + + const prevModeRef = useRef(mode); + + useEffect(() => { + const prevMode = prevModeRef.current; + + if (prevMode !== mode) { + resetModeAttributes(); + } + + prevModeRef.current = mode; + }, [mode]); + const resetModeAttributes = () => { setAttributes({ scrollTiming: undefined, @@ -71,10 +84,6 @@ export default function FixedDisplayEdit(props) { setTempHideAfterSeconds('0'); }; - useEffect(() => { - resetModeAttributes(); - }, [mode]); - useEffect(() => { setTempScrollTiming(scrollTiming || '0'); setTempScrollTimingUnit(scrollTimingUnit || 'px'); @@ -260,57 +269,94 @@ export default function FixedDisplayEdit(props) { setAttributes({ scrollPersistVisible: value }) } /> - - )} - - -

- {__( - 'Set the timing for display and hide. Enter 0 to disable timing for each option.', + - - { - setTempDisplayAfterSeconds(value); - }} - onBlur={() => { - const parsedValue = parseFloat(tempDisplayAfterSeconds); - const finalValue = - isNaN(parsedValue) || parsedValue < 0 ? 0 : parsedValue; - setAttributes({ - displayAfterSeconds: finalValue, - }); - setTempDisplayAfterSeconds(finalValue.toString()); - }} - type="number" - min="0" - step="0.1" - /> - { - setTempHideAfterSeconds(value); - }} - onBlur={() => { - const parsedValue = parseFloat(tempHideAfterSeconds); - const finalValue = - isNaN(parsedValue) || parsedValue < 0 ? 0 : parsedValue; - setAttributes({ - hideAfterSeconds: finalValue, - }); - setTempHideAfterSeconds(finalValue.toString()); - }} - type="number" - min="0" - step="0.1" - /> - - {mode !== 'always-visible' && ( + value={tempHideAfterSeconds} + onChange={(value) => { + setTempHideAfterSeconds(value); + }} + onBlur={() => { + const parsedValue = + parseFloat(tempHideAfterSeconds); + const finalValue = + isNaN(parsedValue) || parsedValue < 0 + ? 0 + : parsedValue; + setAttributes({ + hideAfterSeconds: finalValue, + }); + setTempHideAfterSeconds(finalValue.toString()); + }} + type="number" + min="0" + step="0.1" + /> + + )} + {mode === 'display-hide-after-time' && ( + + +

+ {__( + 'Set the timing for display and hide. Enter 0 to disable timing for each option.', + 'vk-blocks-pro' + )} +

+
+ { + setTempDisplayAfterSeconds(value); + }} + onBlur={() => { + const parsedValue = parseFloat( + tempDisplayAfterSeconds + ); + const finalValue = + isNaN(parsedValue) || parsedValue < 0 + ? 0 + : parsedValue; + setAttributes({ + displayAfterSeconds: finalValue, + }); + setTempDisplayAfterSeconds( + finalValue.toString() + ); + }} + type="number" + min="0" + step="0.1" + /> + { + setTempHideAfterSeconds(value); + }} + onBlur={() => { + const parsedValue = + parseFloat(tempHideAfterSeconds); + const finalValue = + isNaN(parsedValue) || parsedValue < 0 + ? 0 + : parsedValue; + setAttributes({ + hideAfterSeconds: finalValue, + }); + setTempHideAfterSeconds(finalValue.toString()); + }} + type="number" + min="0" + step="0.1" + /> +
+ )} + {mode === 'display-hide-after-time' && ( Date: Mon, 18 Nov 2024 17:13:33 +0900 Subject: [PATCH 65/83] Add Hide after seconds for Show on Scroll --- src/blocks/_pro/fixed-display/edit.js | 18 +++++------ src/blocks/_pro/fixed-display/view.js | 43 ++++++++++++++++++++++----- 2 files changed, 44 insertions(+), 17 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index 3c486d535..b68b3b697 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -57,18 +57,17 @@ export default function FixedDisplayEdit(props) { ); // モードが切り替わる際に関連する属性をリセットし、一時変数もリセット + const prevModeRef = useRef(mode); - const prevModeRef = useRef(mode); - - useEffect(() => { - const prevMode = prevModeRef.current; + useEffect(() => { + const prevMode = prevModeRef.current; - if (prevMode !== mode) { - resetModeAttributes(); - } + if (prevMode !== mode) { + resetModeAttributes(); + } - prevModeRef.current = mode; - }, [mode]); + prevModeRef.current = mode; + }, [mode]); const resetModeAttributes = () => { setAttributes({ @@ -294,6 +293,7 @@ export default function FixedDisplayEdit(props) { type="number" min="0" step="0.1" + disabled={scrollPersistVisible} /> )} diff --git a/src/blocks/_pro/fixed-display/view.js b/src/blocks/_pro/fixed-display/view.js index 6f33e7aeb..aa9636834 100644 --- a/src/blocks/_pro/fixed-display/view.js +++ b/src/blocks/_pro/fixed-display/view.js @@ -30,10 +30,33 @@ window.addEventListener('scroll', function () { item.getAttribute('data-persist-visible') === 'true'; const timingInPixels = convertUnitToPixels(timing, unit); + // 一度非表示にされたら再表示しない + const wasHidden = item.getAttribute('data-hide-maintained') === 'true'; + // スクロール位置が指定したタイミングを超えた場合に要素を表示 - if (window.scrollY > timingInPixels) { - item.classList.add('is-visible'); - } else if (!scrollPersistVisible) { + if (window.scrollY > timingInPixels && !wasHidden) { + if (!item.classList.contains('is-visible')) { + item.classList.add('is-visible'); + + // 非表示タイマーの処理 + const hideAfterSecondsAttr = item.getAttribute( + 'data-hide-after-seconds' + ); + const hideAfterSeconds = parseFloat(hideAfterSecondsAttr) || 0; + + // `scrollPersistVisible` が無効な場合のみ非表示タイマーをセット + if (hideAfterSeconds > 0 && !scrollPersistVisible) { + setTimeout(() => { + if (item.classList.contains('is-visible')) { + item.classList.remove('is-visible'); + item.classList.add('is-hidden'); + item.setAttribute('data-hide-maintained', 'true'); // 非表示状態を維持 + } + }, hideAfterSeconds * 1000); + } + } + } else if (!scrollPersistVisible && !wasHidden) { + // タイミングを超えなかった場合、Persistが無効な時に非表示 item.classList.remove('is-visible'); } }); @@ -51,7 +74,6 @@ function handleVisibility( if (displayAfterSeconds >= 0) { setTimeout(() => { item.classList.add('is-timed-visible'); - // dontShowAgain が true の場合、SessionStorage に記録 if (dontShowAgain) { setSessionStorageFlag(`displayed_${blockId}`, 'true'); } @@ -60,10 +82,15 @@ function handleVisibility( // hideAfterSeconds が 0 より大きい場合に非表示 if (hideAfterSeconds > 0) { - setTimeout(() => { - item.classList.remove('is-timed-visible'); - item.classList.add('is-timed-hide'); - }, (displayAfterSeconds || 0) * 1000 + hideAfterSeconds * 1000); + setTimeout( + () => { + if (item.classList.contains('is-visible')) { + item.classList.remove('is-visible'); + item.classList.add('is-hidden'); + } + }, + (displayAfterSeconds || 0) * 1000 + hideAfterSeconds * 1000 + ); } } From e3f88500494edb12744891a5b617271662671ead Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 18 Nov 2024 17:14:29 +0900 Subject: [PATCH 66/83] Add data-hide-after-second for show-on-scroll --- src/blocks/_pro/fixed-display/save.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/blocks/_pro/fixed-display/save.js b/src/blocks/_pro/fixed-display/save.js index 1dc93daec..cdcb8ce2e 100644 --- a/src/blocks/_pro/fixed-display/save.js +++ b/src/blocks/_pro/fixed-display/save.js @@ -26,6 +26,9 @@ export default function save({ attributes }) { dataAttributes['data-scroll-timing-unit'] = scrollTimingUnit; if (scrollPersistVisible) { dataAttributes['data-persist-visible'] = 'true'; + } else if (hideAfterSeconds > 0) { + dataAttributes['data-hide-after-seconds'] = + hideAfterSeconds.toString(); } extraClasses += ' vk_fixed-display-mode-show-on-scroll'; } else if (mode === 'display-hide-after-time') { From 9ea9e1fc23572face295102b694ba12a24915b51 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Mon, 18 Nov 2024 17:24:31 +0900 Subject: [PATCH 67/83] Delete class setting --- src/blocks/_pro/fixed-display/index.php | 61 +++++++------------------ 1 file changed, 16 insertions(+), 45 deletions(-) diff --git a/src/blocks/_pro/fixed-display/index.php b/src/blocks/_pro/fixed-display/index.php index bf521e536..dde6390f3 100644 --- a/src/blocks/_pro/fixed-display/index.php +++ b/src/blocks/_pro/fixed-display/index.php @@ -6,58 +6,28 @@ */ /** - * VK_Blocks_Fixed_Display class + * Adds initial opacity: 0 to blocks in specific modes. + * + * @param string $block_content The HTML content of the block. + * @param array $block The block details array. + * @return string The modified block content. */ -if ( ! class_exists( 'VK_Blocks_Fixed_Display' ) ) { - - class VK_Blocks_Fixed_Display { - - /** - * インスタンスを保持するためのプロパティ - * - * @var VK_Blocks_Fixed_Display|null - */ - private static $instance = null; - - /** - * シングルトンインスタンスを取得する初期化関数 - * - * @return VK_Blocks_Fixed_Display インスタンス - */ - public static function init() { - if ( ! self::$instance ) { - self::$instance = new self(); - add_filter( 'render_block', array( self::$instance, 'filter_block_opacity' ), 10, 2 ); - } - return self::$instance; - } - - /** - * ブロックに初期 opacity: 0 を適用 - * - * @param string $block_content ブロックのHTMLコンテンツ. - * @param array $block ブロックの情報. - * @return string 変更されたHTMLコンテンツ. - */ - public function filter_block_opacity( $block_content, $block ) { - if ( isset( $block['attrs']['mode'] ) && in_array( $block['attrs']['mode'], array( 'display-hide-after-time', 'show-on-scroll' ), true ) ) { - // 指定されたモードの場合、初期 opacity: 0 を適用 - $block_content = preg_replace( '/(]*class="[^"]*vk_fixed-display-mode-(display-hide-after-time|show-on-scroll)[^"]*")/i', '$1 style="opacity:0;"', $block_content ); - } - return $block_content; - } +function vk_blocks_fixed_display_add_opacity( $block_content, $block ) { + if ( isset( $block['attrs']['mode'] ) && in_array( $block['attrs']['mode'], array( 'display-hide-after-time', 'show-on-scroll' ), true ) ) { + // Apply opacity: 0 for specific modes + $block_content = preg_replace( '/(]*class="[^"]*vk_fixed-display-mode-(display-hide-after-time|show-on-scroll)[^"]*")/i', '$1 style="opacity:0;"', $block_content ); } - - VK_Blocks_Fixed_Display::init(); + return $block_content; } +add_filter( 'render_block', 'vk_blocks_fixed_display_add_opacity', 10, 2 ); /** - * Register Fixed display block. + * Registers the fixed display block. * * @return void */ function vk_blocks_register_block_fixed_display() { - // Register Style. + // Register Style if ( ! is_admin() ) { wp_register_style( 'vk-blocks/fixed-display', @@ -67,7 +37,7 @@ function vk_blocks_register_block_fixed_display() { ); } - // Register Script. + // Register Script if ( ! is_admin() ) { wp_register_script( 'vk-blocks/fixed-display-script', @@ -78,7 +48,7 @@ function vk_blocks_register_block_fixed_display() { ); } - // クラシックテーマ & 6.5 環境で $assets = array() のように空にしないと重複登録になるため + // Handle classic themes and separate asset loading $assets = array(); if ( method_exists( 'VK_Blocks_Block_Loader', 'should_load_separate_assets' ) && VK_Blocks_Block_Loader::should_load_separate_assets() ) { $assets = array( @@ -89,6 +59,7 @@ function vk_blocks_register_block_fixed_display() { ); } + // Register the block register_block_type( __DIR__, $assets From 5fd51090f26789b41d96aadc5460c0322444b210 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 19 Nov 2024 09:36:41 +0900 Subject: [PATCH 68/83] Fix: handleVisibility --- src/blocks/_pro/fixed-display/view.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/blocks/_pro/fixed-display/view.js b/src/blocks/_pro/fixed-display/view.js index aa9636834..b4f9bcf1f 100644 --- a/src/blocks/_pro/fixed-display/view.js +++ b/src/blocks/_pro/fixed-display/view.js @@ -73,24 +73,24 @@ function handleVisibility( // displayAfterSeconds が 0 以上の場合に表示 if (displayAfterSeconds >= 0) { setTimeout(() => { - item.classList.add('is-timed-visible'); - if (dontShowAgain) { - setSessionStorageFlag(`displayed_${blockId}`, 'true'); + if (!item.classList.contains('is-timed-visible')) { + item.classList.add('is-timed-visible'); + + if (dontShowAgain) { + setSessionStorageFlag(`displayed_${blockId}`, 'true'); + } } }, displayAfterSeconds * 1000); } // hideAfterSeconds が 0 より大きい場合に非表示 if (hideAfterSeconds > 0) { - setTimeout( - () => { - if (item.classList.contains('is-visible')) { - item.classList.remove('is-visible'); - item.classList.add('is-hidden'); - } - }, - (displayAfterSeconds || 0) * 1000 + hideAfterSeconds * 1000 - ); + setTimeout(() => { + if (item.classList.contains('is-timed-visible')) { + item.classList.remove('is-timed-visible'); + item.classList.add('is-hidden'); + } + }, (displayAfterSeconds || 0) * 1000 + hideAfterSeconds * 1000); } } From 4fbdfe1a7f7cb2f1d13da2c318444580b05c96dd Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 19 Nov 2024 09:47:51 +0900 Subject: [PATCH 69/83] Fix: lint --- src/blocks/_pro/fixed-display/view.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/blocks/_pro/fixed-display/view.js b/src/blocks/_pro/fixed-display/view.js index b4f9bcf1f..55519ea1a 100644 --- a/src/blocks/_pro/fixed-display/view.js +++ b/src/blocks/_pro/fixed-display/view.js @@ -85,12 +85,15 @@ function handleVisibility( // hideAfterSeconds が 0 より大きい場合に非表示 if (hideAfterSeconds > 0) { - setTimeout(() => { - if (item.classList.contains('is-timed-visible')) { - item.classList.remove('is-timed-visible'); - item.classList.add('is-hidden'); - } - }, (displayAfterSeconds || 0) * 1000 + hideAfterSeconds * 1000); + setTimeout( + () => { + if (item.classList.contains('is-timed-visible')) { + item.classList.remove('is-timed-visible'); + item.classList.add('is-hidden'); + } + }, + (displayAfterSeconds || 0) * 1000 + hideAfterSeconds * 1000 + ); } } From 42fc0b334766c7be31b5d0af3043e57684d3f5c9 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 19 Nov 2024 12:01:54 +0900 Subject: [PATCH 70/83] Undo getSessionStorageFlag' --- src/blocks/_pro/fixed-display/view.js | 51 ++++++++++++++------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/src/blocks/_pro/fixed-display/view.js b/src/blocks/_pro/fixed-display/view.js index 55519ea1a..62d840ca4 100644 --- a/src/blocks/_pro/fixed-display/view.js +++ b/src/blocks/_pro/fixed-display/view.js @@ -9,6 +9,9 @@ function getSessionStorageFlag(key) { return sessionStorage.getItem(key) !== null; } +// 状態管理用のマップを初期化 +const blockStates = new Map(); + // スクロールタイミング設定 window.addEventListener('scroll', function () { const items = document.querySelectorAll( @@ -17,12 +20,6 @@ window.addEventListener('scroll', function () { items.forEach((item) => { const blockId = item.getAttribute('data-block-id'); - const dontShowAgain = - item.getAttribute('data-dont-show-again') === 'true'; - - if (dontShowAgain && getSessionStorageFlag(`displayed_${blockId}`)) { - return; - } const timing = parseInt(item.getAttribute('data-scroll-timing'), 10); const unit = item.getAttribute('data-scroll-timing-unit'); @@ -30,32 +27,36 @@ window.addEventListener('scroll', function () { item.getAttribute('data-persist-visible') === 'true'; const timingInPixels = convertUnitToPixels(timing, unit); - // 一度非表示にされたら再表示しない - const wasHidden = item.getAttribute('data-hide-maintained') === 'true'; + // 初期状態をマップに設定 + if (!blockStates.has(blockId)) { + blockStates.set(blockId, { wasHidden: false }); + } + + // ブロックの状態を取得 + const blockState = blockStates.get(blockId); - // スクロール位置が指定したタイミングを超えた場合に要素を表示 - if (window.scrollY > timingInPixels && !wasHidden) { + // 一度非表示にされたら再表示しない (ページリロードでリセットされる) + if (window.scrollY > timingInPixels && !blockState.wasHidden) { if (!item.classList.contains('is-visible')) { item.classList.add('is-visible'); - // 非表示タイマーの処理 const hideAfterSecondsAttr = item.getAttribute( 'data-hide-after-seconds' ); const hideAfterSeconds = parseFloat(hideAfterSecondsAttr) || 0; - // `scrollPersistVisible` が無効な場合のみ非表示タイマーをセット + // 非表示タイマーの処理 if (hideAfterSeconds > 0 && !scrollPersistVisible) { setTimeout(() => { if (item.classList.contains('is-visible')) { item.classList.remove('is-visible'); item.classList.add('is-hidden'); - item.setAttribute('data-hide-maintained', 'true'); // 非表示状態を維持 + blockStates.set(blockId, { wasHidden: true }); } }, hideAfterSeconds * 1000); } } - } else if (!scrollPersistVisible && !wasHidden) { + } else if (!scrollPersistVisible && blockState.wasHidden) { // タイミングを超えなかった場合、Persistが無効な時に非表示 item.classList.remove('is-visible'); } @@ -75,7 +76,6 @@ function handleVisibility( setTimeout(() => { if (!item.classList.contains('is-timed-visible')) { item.classList.add('is-timed-visible'); - if (dontShowAgain) { setSessionStorageFlag(`displayed_${blockId}`, 'true'); } @@ -100,7 +100,7 @@ function handleVisibility( // DOM読み込み後に初期化関数を実行 function initializeDisplayHide() { const items = document.querySelectorAll( - '.vk_fixed-display-mode-display-hide-after-time' + '.vk_fixed-display-mode-display-hide-after-time, .vk_fixed-display-mode-show-on-scroll, .vk_fixed-display-mode-always-visible' ); items.forEach((item) => { @@ -116,18 +116,21 @@ function initializeDisplayHide() { const dontShowAgain = item.getAttribute('data-dont-show-again') === 'true'; + // dontShowAgain が有効で、セッションストレージに記録がある場合はスキップ if (dontShowAgain && getSessionStorageFlag(`displayed_${blockId}`)) { return; } - // handleVisibility関数を使用して表示・非表示を制御 - handleVisibility( - item, - displayAfterSeconds, - hideAfterSeconds, - blockId, - dontShowAgain - ); + // モードに応じて適切な処理を実行 + const mode = item.getAttribute('data-mode'); + + if (mode === 'show-on-scroll') { + // スクロール時の動作は scroll イベントで制御 + return; + } + + // 他のモードは初期表示とタイマーを適用 + handleVisibility(item, displayAfterSeconds, hideAfterSeconds, blockId, dontShowAgain); }); } From ccf8429148a57a813158380441ffab1861ff8c59 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 19 Nov 2024 12:09:47 +0900 Subject: [PATCH 71/83] Disable 'Hide after seconds' when Persist visibility is ON --- src/blocks/_pro/fixed-display/edit.js | 90 +++++++++++---------------- 1 file changed, 37 insertions(+), 53 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index b68b3b697..78d845283 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -268,36 +268,11 @@ export default function FixedDisplayEdit(props) { setAttributes({ scrollPersistVisible: value }) } /> - { - setTempHideAfterSeconds(value); - }} - onBlur={() => { - const parsedValue = - parseFloat(tempHideAfterSeconds); - const finalValue = - isNaN(parsedValue) || parsedValue < 0 - ? 0 - : parsedValue; - setAttributes({ - hideAfterSeconds: finalValue, - }); - setTempHideAfterSeconds(finalValue.toString()); - }} - type="number" - min="0" - step="0.1" - disabled={scrollPersistVisible} - /> )} - {mode === 'display-hide-after-time' && ( + {['display-hide-after-time', 'show-on-scroll'].includes( + mode + ) && (

@@ -307,31 +282,39 @@ export default function FixedDisplayEdit(props) { )}

- { - setTempDisplayAfterSeconds(value); - }} - onBlur={() => { - const parsedValue = parseFloat( - tempDisplayAfterSeconds - ); - const finalValue = - isNaN(parsedValue) || parsedValue < 0 - ? 0 - : parsedValue; - setAttributes({ - displayAfterSeconds: finalValue, - }); - setTempDisplayAfterSeconds( - finalValue.toString() - ); - }} - type="number" - min="0" - step="0.1" - /> + {mode === 'display-hide-after-time' && ( + <> + { + setTempDisplayAfterSeconds(value); + }} + onBlur={() => { + const parsedValue = parseFloat( + tempDisplayAfterSeconds + ); + const finalValue = + isNaN(parsedValue) || + parsedValue < 0 + ? 0 + : parsedValue; + setAttributes({ + displayAfterSeconds: finalValue, + }); + setTempDisplayAfterSeconds( + finalValue.toString() + ); + }} + type="number" + min="0" + step="0.1" + /> + + )}
)} From bf3c17c0ba9b455569fd72d69cd73a55bb1a6d0f Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 19 Nov 2024 12:10:10 +0900 Subject: [PATCH 72/83] Fix: lint --- src/blocks/_pro/fixed-display/view.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/blocks/_pro/fixed-display/view.js b/src/blocks/_pro/fixed-display/view.js index 62d840ca4..35d0c01ca 100644 --- a/src/blocks/_pro/fixed-display/view.js +++ b/src/blocks/_pro/fixed-display/view.js @@ -130,7 +130,13 @@ function initializeDisplayHide() { } // 他のモードは初期表示とタイマーを適用 - handleVisibility(item, displayAfterSeconds, hideAfterSeconds, blockId, dontShowAgain); + handleVisibility( + item, + displayAfterSeconds, + hideAfterSeconds, + blockId, + dontShowAgain + ); }); } From f431bafa24b5b7da3a7a8b728db185b4037d203b Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 19 Nov 2024 15:02:09 +0900 Subject: [PATCH 73/83] Refactor Fixed Display block to use render_callback instead of add_filter --- src/blocks/_pro/fixed-display/index.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/blocks/_pro/fixed-display/index.php b/src/blocks/_pro/fixed-display/index.php index dde6390f3..cbe981b06 100644 --- a/src/blocks/_pro/fixed-display/index.php +++ b/src/blocks/_pro/fixed-display/index.php @@ -8,18 +8,17 @@ /** * Adds initial opacity: 0 to blocks in specific modes. * - * @param string $block_content The HTML content of the block. - * @param array $block The block details array. + * @param array $attributes Block attributes. + * @param string $content Block content. * @return string The modified block content. */ -function vk_blocks_fixed_display_add_opacity( $block_content, $block ) { - if ( isset( $block['attrs']['mode'] ) && in_array( $block['attrs']['mode'], array( 'display-hide-after-time', 'show-on-scroll' ), true ) ) { - // Apply opacity: 0 for specific modes - $block_content = preg_replace( '/(]*class="[^"]*vk_fixed-display-mode-(display-hide-after-time|show-on-scroll)[^"]*")/i', '$1 style="opacity:0;"', $block_content ); +function vk_blocks_fixed_display_render_callback( $attributes, $content ) { + // Check for specific modes and apply opacity: 0 + if ( isset( $attributes['mode'] ) && in_array( $attributes['mode'], array( 'display-hide-after-time', 'show-on-scroll' ), true ) ) { + $content = preg_replace( '/(]*class="[^"]*vk_fixed-display-mode-(display-hide-after-time|show-on-scroll)[^"]*")/i', '$1 style="opacity:0;"', $content ); } - return $block_content; + return $content; } -add_filter( 'render_block', 'vk_blocks_fixed_display_add_opacity', 10, 2 ); /** * Registers the fixed display block. @@ -56,6 +55,7 @@ function vk_blocks_register_block_fixed_display() { 'script' => 'vk-blocks/fixed-display-script', 'editor_style' => 'vk-blocks-build-editor-css', 'editor_script' => 'vk-blocks-build-js', + 'render_callback' => 'vk_blocks_fixed_display_render_callback', ); } From 683bfd391c8284ac986f842eddc7c6a53a765f8d Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 19 Nov 2024 15:02:45 +0900 Subject: [PATCH 74/83] Fix: lint --- src/blocks/_pro/fixed-display/index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/blocks/_pro/fixed-display/index.php b/src/blocks/_pro/fixed-display/index.php index cbe981b06..66ce64912 100644 --- a/src/blocks/_pro/fixed-display/index.php +++ b/src/blocks/_pro/fixed-display/index.php @@ -51,10 +51,10 @@ function vk_blocks_register_block_fixed_display() { $assets = array(); if ( method_exists( 'VK_Blocks_Block_Loader', 'should_load_separate_assets' ) && VK_Blocks_Block_Loader::should_load_separate_assets() ) { $assets = array( - 'style' => 'vk-blocks/fixed-display', - 'script' => 'vk-blocks/fixed-display-script', - 'editor_style' => 'vk-blocks-build-editor-css', - 'editor_script' => 'vk-blocks-build-js', + 'style' => 'vk-blocks/fixed-display', + 'script' => 'vk-blocks/fixed-display-script', + 'editor_style' => 'vk-blocks-build-editor-css', + 'editor_script' => 'vk-blocks-build-js', 'render_callback' => 'vk_blocks_fixed_display_render_callback', ); } From 841dcf222a77d08bb46636ec40aab872a24f0fb8 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 19 Nov 2024 15:51:53 +0900 Subject: [PATCH 75/83] Undo block description --- src/blocks/_pro/fixed-display/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index 78d845283..486e47bd9 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -132,7 +132,7 @@ export default function FixedDisplayEdit(props) {

{__( - 'The fixed position of the block will not change on the edit screen. Please check on the front screen.', + 'The fixed position of the fixed position block will not change on the edit screen. Please check on the front screen.', 'vk-blocks-pro' )}

From 52fed21b31834a1b8a6cfd0f1fdd47e7c6512b2d Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 19 Nov 2024 15:53:07 +0900 Subject: [PATCH 76/83] Undo commentout --- src/blocks/_pro/fixed-display/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/blocks/_pro/fixed-display/index.php b/src/blocks/_pro/fixed-display/index.php index 66ce64912..c70216800 100644 --- a/src/blocks/_pro/fixed-display/index.php +++ b/src/blocks/_pro/fixed-display/index.php @@ -47,8 +47,11 @@ function vk_blocks_register_block_fixed_display() { ); } - // Handle classic themes and separate asset loading + // クラシックテーマ & 6.5 環境で $assets = array() のように空にしないと重複登録になるため + // ここで初期化しておく $assets = array(); + // Attend to load separate assets. + // 分割読み込みが有効な場合のみ、分割読み込み用のスクリプトを登録する if ( method_exists( 'VK_Blocks_Block_Loader', 'should_load_separate_assets' ) && VK_Blocks_Block_Loader::should_load_separate_assets() ) { $assets = array( 'style' => 'vk-blocks/fixed-display', From 51a8617636a697afd37cdda86fd31c1c01a77c8a Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 19 Nov 2024 15:54:00 +0900 Subject: [PATCH 77/83] Undo commentout --- src/blocks/_pro/fixed-display/index.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/blocks/_pro/fixed-display/index.php b/src/blocks/_pro/fixed-display/index.php index c70216800..6a7b5b590 100644 --- a/src/blocks/_pro/fixed-display/index.php +++ b/src/blocks/_pro/fixed-display/index.php @@ -62,7 +62,6 @@ function vk_blocks_register_block_fixed_display() { ); } - // Register the block register_block_type( __DIR__, $assets From dc5235135fd106433c115df4c65183838252a2d6 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 19 Nov 2024 15:59:24 +0900 Subject: [PATCH 78/83] Change label Settings to Setting --- src/blocks/_pro/fixed-display/edit.js | 8 ++++---- src/blocks/_pro/fixed-display/save.js | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index 486e47bd9..d7c82e777 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -127,7 +127,7 @@ export default function FixedDisplayEdit(props) { <>

@@ -238,7 +238,7 @@ export default function FixedDisplayEdit(props) { {mode === 'show-on-scroll' && ( +

{__( @@ -343,7 +343,7 @@ export default function FixedDisplayEdit(props) { {mode === 'display-hide-after-time' && ( diff --git a/src/blocks/_pro/fixed-display/save.js b/src/blocks/_pro/fixed-display/save.js index cdcb8ce2e..14fc8ddac 100644 --- a/src/blocks/_pro/fixed-display/save.js +++ b/src/blocks/_pro/fixed-display/save.js @@ -4,15 +4,15 @@ export default function save({ attributes }) { const { mode, position, - scrollTiming = 0, // デフォルト値を設定 - scrollTimingUnit = 'px', - scrollPersistVisible = false, - fixedPositionType = 'top', - fixedPositionValue = 50, - fixedPositionUnit = 'svh', - displayAfterSeconds = 0, - hideAfterSeconds = 0, - dontShowAgain = false, + scrollTiming, + scrollTimingUnit, + scrollPersistVisible, + fixedPositionType, + fixedPositionValue, + fixedPositionUnit, + displayAfterSeconds, + hideAfterSeconds, + dontShowAgain, blockId, } = attributes; From 8e007e0a64f5903bdeded44ba104da631d20cec5 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 19 Nov 2024 16:04:32 +0900 Subject: [PATCH 79/83] Add opacity:0 for show-on-scroll --- src/blocks/_pro/fixed-display/style.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/blocks/_pro/fixed-display/style.scss b/src/blocks/_pro/fixed-display/style.scss index 086015c84..15c11ac08 100644 --- a/src/blocks/_pro/fixed-display/style.scss +++ b/src/blocks/_pro/fixed-display/style.scss @@ -19,7 +19,8 @@ &-show-on-scroll { transition: opacity 0.3s ease; pointer-events: none; - + opacity: 0; + &.is-visible { opacity: 1 !important; pointer-events: auto; From ae6c96da0c6b8e0e35e981729a072381eda536f5 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 19 Nov 2024 16:07:35 +0900 Subject: [PATCH 80/83] Delete :not(.scrolled) admin-bar setting for logged-in --- src/blocks/_pro/fixed-display/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blocks/_pro/fixed-display/style.scss b/src/blocks/_pro/fixed-display/style.scss index 15c11ac08..8d2bcd119 100644 --- a/src/blocks/_pro/fixed-display/style.scss +++ b/src/blocks/_pro/fixed-display/style.scss @@ -156,7 +156,7 @@ /*-------------------------------------------*/ /* 管理画面用 /*-------------------------------------------*/ -.logged-in.admin-bar:not(.scrolled) { +.logged-in.admin-bar { .vk_fixed-display-position { &-top { From 83f632c59f4810a01d6bd84783336ede78072108 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 19 Nov 2024 16:08:02 +0900 Subject: [PATCH 81/83] Delete is-hidden --- src/blocks/_pro/fixed-display/view.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/blocks/_pro/fixed-display/view.js b/src/blocks/_pro/fixed-display/view.js index 35d0c01ca..d3700251a 100644 --- a/src/blocks/_pro/fixed-display/view.js +++ b/src/blocks/_pro/fixed-display/view.js @@ -50,7 +50,6 @@ window.addEventListener('scroll', function () { setTimeout(() => { if (item.classList.contains('is-visible')) { item.classList.remove('is-visible'); - item.classList.add('is-hidden'); blockStates.set(blockId, { wasHidden: true }); } }, hideAfterSeconds * 1000); @@ -89,7 +88,6 @@ function handleVisibility( () => { if (item.classList.contains('is-timed-visible')) { item.classList.remove('is-timed-visible'); - item.classList.add('is-hidden'); } }, (displayAfterSeconds || 0) * 1000 + hideAfterSeconds * 1000 From cb39c19401e7edfc3ae89bb1b23897e25fe59a02 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 19 Nov 2024 16:08:23 +0900 Subject: [PATCH 82/83] Undo label --- src/blocks/_pro/fixed-display/edit.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/blocks/_pro/fixed-display/edit.js b/src/blocks/_pro/fixed-display/edit.js index d7c82e777..83cbef1a9 100644 --- a/src/blocks/_pro/fixed-display/edit.js +++ b/src/blocks/_pro/fixed-display/edit.js @@ -126,9 +126,7 @@ export default function FixedDisplayEdit(props) { return ( <> - +

{__( From 045e745a3b901ecd625e81f28a063ef364209b08 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 19 Nov 2024 16:17:17 +0900 Subject: [PATCH 83/83] Set the margin of blocks directly under .vk_fixed-display to 0. --- src/blocks/_pro/fixed-display/style.scss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/blocks/_pro/fixed-display/style.scss b/src/blocks/_pro/fixed-display/style.scss index 8d2bcd119..a2b90f085 100644 --- a/src/blocks/_pro/fixed-display/style.scss +++ b/src/blocks/_pro/fixed-display/style.scss @@ -9,6 +9,16 @@ position: fixed; margin-block-start: 0; z-index: 99999; + + > * { + &:first-of-type { + margin-block-start: 0; + } + + &:last-of-type { + margin-block-end: 0; + } + } } .vk_fixed-display-mode {